@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function send($notifiable, Notification $notification) |
| 35 | 35 | { |
| 36 | - if (! $routing = collect($notifiable->routeNotificationFor('IonicPush'))) { |
|
| 36 | + if (!$routing = collect($notifiable->routeNotificationFor('IonicPush'))) { |
|
| 37 | 37 | return; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $ionicPushData = array_merge( |
| 49 | 49 | $message->toArray(), |
| 50 | - [$message->getSendToType() => $routing->first()] |
|
| 50 | + [ $message->getSendToType() => $routing->first() ] |
|
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | 53 | $response = $this->client->post(self::API_ENDPOINT, [ |
@@ -20,13 +20,13 @@ discard block |
||
| 20 | 20 | protected $sound = ''; |
| 21 | 21 | |
| 22 | 22 | /** @var array */ |
| 23 | - protected $payload = []; |
|
| 23 | + protected $payload = [ ]; |
|
| 24 | 24 | |
| 25 | 25 | /** @var array */ |
| 26 | - protected $iosData = []; |
|
| 26 | + protected $iosData = [ ]; |
|
| 27 | 27 | |
| 28 | 28 | /** @var array */ |
| 29 | - protected $androidData = []; |
|
| 29 | + protected $androidData = [ ]; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @param array $data |
@@ -117,11 +117,11 @@ discard block |
||
| 117 | 117 | if (substr($method, 0, 3) == 'ios') { |
| 118 | 118 | $key = snake_case(substr($method, 3)); |
| 119 | 119 | |
| 120 | - $this->iosData[$key] = $args[0]; |
|
| 120 | + $this->iosData[ $key ] = $args[ 0 ]; |
|
| 121 | 121 | } elseif (substr($method, 0, 7) == 'android') { |
| 122 | 122 | $key = snake_case(substr($method, 7)); |
| 123 | 123 | |
| 124 | - $this->androidData[$key] = $args[0]; |
|
| 124 | + $this->androidData[ $key ] = $args[ 0 ]; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | return $this; |
@@ -151,16 +151,16 @@ discard block |
||
| 151 | 151 | ], |
| 152 | 152 | ]; |
| 153 | 153 | |
| 154 | - if (! empty($this->iosData)) { |
|
| 155 | - $data['notification']['ios'] = $this->iosData; |
|
| 154 | + if (!empty($this->iosData)) { |
|
| 155 | + $data[ 'notification' ][ 'ios' ] = $this->iosData; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - if (! empty($this->androidData)) { |
|
| 159 | - $data['notification']['android'] = $this->androidData; |
|
| 158 | + if (!empty($this->androidData)) { |
|
| 159 | + $data[ 'notification' ][ 'android' ] = $this->androidData; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - if (! empty($this->payload)) { |
|
| 163 | - $data['notification']['payload'] = $this->payload; |
|
| 162 | + if (!empty($this->payload)) { |
|
| 163 | + $data[ 'notification' ][ 'payload' ] = $this->payload; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | return $data; |