Skip to content

Commit bb337c3

Browse files
committed
Merge branch 'master' of github.com:boring-dragon/msgowl-laravel-notification-channel
2 parents 03cc7ba + 7e8a770 commit bb337c3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/MsgOwlChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class MsgOwlChannel
1414

1515
private $dispatcher;
1616

17-
public function __construct(MsgOwlClient $client, Dispatcher $dispatcher = null)
17+
public function __construct(MsgOwlClient $client, ?Dispatcher $dispatcher = null)
1818
{
1919
$this->client = $client;
2020
$this->dispatcher = $dispatcher;

src/MsgOwlClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MsgOwlClient
1515
/**
1616
* MsglOwlClient constructor.
1717
*
18-
* @param $api_key string API Key from MsgOwl API
18+
* @param $api_key string API Key from MsgOwl API
1919
*/
2020
public function __construct(Client $client, $api_key)
2121
{

src/MsgOwlServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function boot()
1919
throw InvalidConfiguration::configurationNotSet();
2020
}
2121

22-
return new MsgOwlClient(new Client(), $config['api_key']);
22+
return new MsgOwlClient(new Client, $config['api_key']);
2323
});
2424
}
2525
}

tests/MsgOwlChannelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function setUp(): void
3030
$this->notification = new TestNotification;
3131
$this->string_notification = new TestStringNotification;
3232
$this->notifiable = new TestNotifiable;
33-
$this->guzzle = Mockery::mock(new Client());
33+
$this->guzzle = Mockery::mock(new Client);
3434
$this->client = Mockery::mock(new MsgOwlClient($this->guzzle, 'test_aabtyuendgdhdshjw'));
3535
$this->channel = new MsgOwlChannel($this->client);
3636
}

tests/MsgOwlClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MsgOwlClientTest extends TestCase
1818

1919
public function setUp(): void
2020
{
21-
$this->guzzle = Mockery::mock(new Client());
21+
$this->guzzle = Mockery::mock(new Client);
2222
$this->client = Mockery::mock(new MsgOwlClient($this->guzzle, 'test_aabtyuendgdhdshjw'));
2323
$this->message = (new MsgOwlMessage('Message content'))->setSenderId('Jinas')->setRecipients('9607777777');
2424
}

tests/MsgOwlMessageTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class MsgOwlMessageTest extends TestCase
1212
/** @test */
1313
public function it_can_be_instantiated()
1414
{
15-
$message = new MsgOwlMessage();
15+
$message = new MsgOwlMessage;
1616

1717
$this->assertInstanceOf(MsgOwlMessage::class, $message);
1818
}
@@ -41,7 +41,7 @@ public function it_can_call_the_create_method()
4141
/** @test */
4242
public function it_can_set_body()
4343
{
44-
$message = (new MsgOwlMessage())->setBody('Yolo');
44+
$message = (new MsgOwlMessage)->setBody('Yolo');
4545

4646
$this->assertEquals('Yolo', $message->body);
4747
}
@@ -50,32 +50,32 @@ public function it_can_set_body()
5050
public function it_can_set_sender_id()
5151
{
5252

53-
$message = (new MsgOwlMessage())->setSenderId('NeverGonnaGiveYouUp');
53+
$message = (new MsgOwlMessage)->setSenderId('NeverGonnaGiveYouUp');
5454

5555
$this->assertEquals('NeverGonnaGiveYouUp', $message->sender_id);
5656
}
5757

5858
/** @test */
5959
public function it_can_set_recipients_from_array()
6060
{
61-
$message = (new MsgOwlMessage())->setRecipients(['9607777777', '9607777778']);
61+
$message = (new MsgOwlMessage)->setRecipients(['9607777777', '9607777778']);
6262

6363
$this->assertEquals('9607777777,9607777778', $message->recipients);
6464
}
6565

6666
/** @test */
6767
public function it_can_set_recipients_from_integer()
6868
{
69-
$message = (new MsgOwlMessage())->setRecipients(9607777777);
69+
$message = (new MsgOwlMessage)->setRecipients(9607777777);
7070

7171
$this->assertEquals(9607777777, $message->recipients);
7272
}
7373

74-
/** @test */
75-
public function it_can_set_recipients_from_string()
76-
{
77-
$message = (new MsgOwlMessage())->setRecipients('9607777777');
74+
/** @test */
75+
public function it_can_set_recipients_from_string()
76+
{
77+
$message = (new MsgOwlMessage)->setRecipients('9607777777');
7878

79-
$this->assertEquals('9607777777', $message->recipients);
80-
}
79+
$this->assertEquals('9607777777', $message->recipients);
80+
}
8181
}

0 commit comments

Comments
 (0)