@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | const DEFAULT_ERROR_MESSAGE = 'Slack incoming webhook error'; |
| 11 | 11 | |
| 12 | - public function send($message, $username=null, $emoji=null, $channel=null) |
|
| 12 | + public function send($message, $username = null, $emoji = null, $channel = null) |
|
| 13 | 13 | { |
| 14 | - if (! config('slack.incoming-webhook')) { |
|
| 14 | + if (!config('slack.incoming-webhook')) { |
|
| 15 | 15 | return; |
| 16 | 16 | } |
| 17 | 17 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | $channel = trim($channel); |
| 20 | 20 | $username = trim($username); |
| 21 | 21 | |
| 22 | - $payload['text'] = $message; |
|
| 23 | - $payload['username'] = empty($username) ? config('slack.default_username') : $username; |
|
| 24 | - $payload['icon_emoji'] = empty($emoji) ? config('slack.default_emoji') : $emoji; |
|
| 25 | - $payload['channel'] = $channel; |
|
| 22 | + $payload[ 'text' ] = $message; |
|
| 23 | + $payload[ 'username' ] = empty($username) ? config('slack.default_username') : $username; |
|
| 24 | + $payload[ 'icon_emoji' ] = empty($emoji) ? config('slack.default_emoji') : $emoji; |
|
| 25 | + $payload[ 'channel' ] = $channel; |
|
| 26 | 26 | |
| 27 | 27 | $headers = [ |
| 28 | 28 | 'Content-Type' => 'application/json', |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | { |
| 14 | 14 | // Publish Config |
| 15 | 15 | $this->publishes([ |
| 16 | - __DIR__ . '/../config/slack.php' => config_path('slack.php'), |
|
| 16 | + __DIR__.'/../config/slack.php' => config_path('slack.php'), |
|
| 17 | 17 | ]); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function register() |
| 24 | 24 | { |
| 25 | 25 | // Register Facade |
| 26 | - $this->app->bind('gahlawat.slack', function ($app) { |
|
| 26 | + $this->app->bind('gahlawat.slack', function($app) { |
|
| 27 | 27 | return new Slack; |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -7,10 +7,10 @@ |
||
| 7 | 7 | |
| 8 | 8 | class ObjectTest extends TestCase |
| 9 | 9 | { |
| 10 | - public function testObjectCreation() |
|
| 11 | - { |
|
| 12 | - $slack = new Slack; |
|
| 10 | + public function testObjectCreation() |
|
| 11 | + { |
|
| 12 | + $slack = new Slack; |
|
| 13 | 13 | |
| 14 | - $this->assertInstanceOf(Slack::class, $slack); |
|
| 15 | - } |
|
| 14 | + $this->assertInstanceOf(Slack::class, $slack); |
|
| 15 | + } |
|
| 16 | 16 | } |