Completed
Push — master ( a04ab5...d152b9 )
by Mark
05:05
created
src/IonicPushChannel.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 namespace NotificationChannels\IonicPushNotifications;
4 4
 
5 5
 use GuzzleHttp\Client;
6
-use NotificationChannels\IonicPushNotifications\Exceptions\CouldNotSendNotification;
7 6
 use Illuminate\Notifications\Notification;
7
+use NotificationChannels\IonicPushNotifications\Exceptions\CouldNotSendNotification;
8 8
 use NotificationChannels\IonicPushNotifications\Exceptions\InvalidConfiguration;
9 9
 
10 10
 class IonicPushChannel
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $message = $notification->toIonicPush($notifiable);
47 47
 
48 48
         $ionicPushData = array_merge(
49
-            [$message->getSendToType() => $routing->first()],
49
+            [ $message->getSendToType() => $routing->first() ],
50 50
             $message->toArray()
51 51
         );
52 52
 
Please login to merge, or discard this patch.
src/IonicPushMessage.php 2 patches
Doc Comments   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@  discard block
 block discarded – undo
29 29
     public $androidData = [];
30 30
 
31 31
     /**
32
-     * @param array $data
33 32
      *
34 33
      * @return static
35 34
      */
@@ -49,7 +48,6 @@  discard block
 block discarded – undo
49 48
     /**
50 49
      * Set the method of targeting users - tokens (default), user_ids, or emails.
51 50
      *
52
-     * @param  string  $profile
53 51
      *
54 52
      * @return $this
55 53
      */
@@ -122,7 +120,7 @@  discard block
 block discarded – undo
122 120
      * @param string $method
123 121
      * @param array  $args
124 122
      *
125
-     * @return object
123
+     * @return IonicPushMessage
126 124
      */
127 125
     public function __call($method, $args)
128 126
     {
@@ -156,7 +154,7 @@  discard block
 block discarded – undo
156 154
     /**
157 155
      * List of allowed Android options.
158 156
      * 
159
-     * @return array
157
+     * @return string[]
160 158
      */
161 159
     public function allowedAndroidOptions()
162 160
     {
@@ -179,7 +177,7 @@  discard block
 block discarded – undo
179 177
     /**
180 178
      * List of allowed iOS options.
181 179
      * 
182
-     * @return array
180
+     * @return string[]
183 181
      */
184 182
     public function allowediOSOptions()
185 183
     {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
     public $sound = '';
21 21
 
22 22
     /** @var array */
23
-    public $payload = [];
23
+    public $payload = [ ];
24 24
 
25 25
     /** @var array */
26
-    public $iosData = [];
26
+    public $iosData = [ ];
27 27
 
28 28
     /** @var array */
29
-    public $androidData = [];
29
+    public $androidData = [ ];
30 30
 
31 31
     /**
32 32
      * @param array $data
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
             $key = snake_case(substr($method, 3));
131 131
 
132 132
             if (in_array($key, $this->allowediOSOptions())) {
133
-                $this->iosData[$key] = $args[0];
133
+                $this->iosData[ $key ] = $args[ 0 ];
134 134
             }
135 135
         } elseif (substr($method, 0, 7) == 'android') {
136 136
             $key = snake_case(substr($method, 7));
137 137
 
138 138
             if (in_array($key, $this->allowedAndroidOptions())) {
139
-                $this->androidData[$key] = $args[0];
139
+                $this->androidData[ $key ] = $args[ 0 ];
140 140
             }
141 141
         }
142 142
 
@@ -207,24 +207,24 @@  discard block
 block discarded – undo
207 207
             ],
208 208
         ];
209 209
 
210
-        if (! empty($this->title)) {
211
-            $data['notification']['title'] = $this->title;
210
+        if (!empty($this->title)) {
211
+            $data[ 'notification' ][ 'title' ] = $this->title;
212 212
         }
213 213
 
214
-        if (! empty($this->sound)) {
215
-            $data['notification']['sound'] = $this->sound;
214
+        if (!empty($this->sound)) {
215
+            $data[ 'notification' ][ 'sound' ] = $this->sound;
216 216
         }
217 217
 
218
-        if (! empty($this->iosData)) {
219
-            $data['notification']['ios'] = $this->iosData;
218
+        if (!empty($this->iosData)) {
219
+            $data[ 'notification' ][ 'ios' ] = $this->iosData;
220 220
         }
221 221
 
222
-        if (! empty($this->androidData)) {
223
-            $data['notification']['android'] = $this->androidData;
222
+        if (!empty($this->androidData)) {
223
+            $data[ 'notification' ][ 'android' ] = $this->androidData;
224 224
         }
225 225
 
226
-        if (! empty($this->payload)) {
227
-            $data['notification']['payload'] = $this->payload;
226
+        if (!empty($this->payload)) {
227
+            $data[ 'notification' ][ 'payload' ] = $this->payload;
228 228
         }
229 229
 
230 230
         return $data;
Please login to merge, or discard this patch.