Skip to content

Commit

Permalink
Merge pull request #17 from Mane-Olawale/fix-doc-block
Browse files Browse the repository at this point in the history
fix: doc block for child classes
  • Loading branch information
Mane-Olawale authored Aug 12, 2022
2 parents 1f85dbc + cff5c90 commit cc68203
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/Entities/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down Expand Up @@ -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()
{
Expand All @@ -209,7 +209,7 @@ public function inApp()
/**
* Set the phonenumber of the token
*
* @return self $this
* @return $this
*/
public function to(string $phonenumber)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down
12 changes: 6 additions & 6 deletions src/Messages/BaseMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -94,7 +94,7 @@ public function channel(string $channel): self
/**
* Set the message type.
*
* @return self
* @return $this
*/
public function unicode(): self
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Messages/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Termii.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Testing/Sequence.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected function __construct(array $items)
*
* @param array ...$item
*
* @return self
* @return $this
*/
public static function create(...$item)
{
Expand Down
11 changes: 10 additions & 1 deletion tests/TermiiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cc68203

Please sign in to comment.