diff --git a/src/Entities/Token.php b/src/Entities/Token.php index 98c8093..849f32e 100644 --- a/src/Entities/Token.php +++ b/src/Entities/Token.php @@ -150,7 +150,7 @@ protected function loadFromSession(string $tag) * Flush all the content and session of the instance * left only with phone number, tag and text * - * @return self $this; + * @return $this; */ public function flush() { @@ -193,7 +193,7 @@ protected function updateProperties() /** * Make the token an in-app token, Only for non-loaded instance of this class * - * @return self $this + * @return $this */ public function inApp() { @@ -209,7 +209,7 @@ public function inApp() /** * Set the phonenumber of the token * - * @return self $this + * @return $this */ public function to(string $phonenumber) { @@ -224,7 +224,7 @@ public function to(string $phonenumber) /** * Set the text of the token * - * @return self $this + * @return $this */ public function text(string $text) { @@ -239,7 +239,7 @@ public function text(string $text) /** * Dynamic function calls to set the pin option * - * @return self $this + * @return $this */ public function __call(string $name, array $parameters) { diff --git a/src/Messages/BaseMessage.php b/src/Messages/BaseMessage.php index 8692122..5dc77a5 100644 --- a/src/Messages/BaseMessage.php +++ b/src/Messages/BaseMessage.php @@ -56,7 +56,7 @@ public function __construct(string $content = '') * Set the message content. * * @param string $content - * @return self + * @return $this */ public function content(string $content): self { @@ -69,7 +69,7 @@ public function content(string $content): self * Set the sender id, Device id or phone number the message should be sent from. * * @param string $from - * @return self + * @return $this */ public function from($from): self { @@ -82,7 +82,7 @@ public function from($from): self * Set the message channel. * * @param string $from - * @return self + * @return $this */ public function channel(string $channel): self { @@ -94,7 +94,7 @@ public function channel(string $channel): self /** * Set the message type. * - * @return self + * @return $this */ public function unicode(): self { @@ -107,7 +107,7 @@ public function unicode(): self * Set the message type. * * @param string $type - * @return self + * @return $this */ public function type(string $type): self { @@ -120,7 +120,7 @@ public function type(string $type): self * Set the Termii client instance. * * @param \ManeOlawale\Termii\Client $client - * @return self + * @return $this */ public function client(Client $client): self { diff --git a/src/Messages/Message.php b/src/Messages/Message.php index c241fbf..2d77308 100644 --- a/src/Messages/Message.php +++ b/src/Messages/Message.php @@ -15,7 +15,7 @@ class Message extends BaseMessage * Add a line of text to the message content. * * @param string $text - * @return self + * @return $this */ public function line(string $text = null): self { diff --git a/src/Termii.php b/src/Termii.php index 0fbb5f4..d80253a 100644 --- a/src/Termii.php +++ b/src/Termii.php @@ -116,7 +116,7 @@ public function fake(array $fakes = null) * * @param string $alias * @param \ManeOlawale\Laravel\Termii\Testing\Sequence $sequence - * @return self + * @return $this */ public function mock(string $alias, Sequence $sequence = null) { diff --git a/src/Testing/Sequence.php b/src/Testing/Sequence.php index c6f37a3..de615d8 100644 --- a/src/Testing/Sequence.php +++ b/src/Testing/Sequence.php @@ -33,7 +33,7 @@ protected function __construct(array $items) * * @param array ...$item * - * @return self + * @return $this */ public static function create(...$item) { diff --git a/tests/TermiiTest.php b/tests/TermiiTest.php index 105788b..b69addb 100644 --- a/tests/TermiiTest.php +++ b/tests/TermiiTest.php @@ -30,7 +30,16 @@ public function testSendMethodCall() ]) ))); - $this->assertEquals($data, $termii->send('2347041945964', 'Lotus give me my phone', 'Olawale', 'generic')); + /** + * @var \ManeOlawale\RestResponse\AbstractResponse + */ + $response = $termii->send('2347041945964', 'Lotus give me my phone', 'Olawale', 'generic'); + $this->assertEquals( + $data, + $response->toArray() + ); + + $this->assertSame($data['message_id'], $response['message_id']); } public function testGetServices()