Completed
Pull Request — master (#6)
by Mark
05:29 queued 02:30
created
src/IonicPushMessage.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
     /**
35
-     * @param array $data
36 35
      *
37 36
      * @return static
38 37
      */
@@ -67,7 +66,6 @@  discard block
 block discarded – undo
67 66
     /**
68 67
      * Set the method of targeting users - tokens (default), user_ids, or emails.
69 68
      *
70
-     * @param  string  $profile
71 69
      *
72 70
      * @return $this
73 71
      */
@@ -110,7 +108,7 @@  discard block
 block discarded – undo
110 108
      * @param string $method
111 109
      * @param array  $args
112 110
      *
113
-     * @return object
111
+     * @return IonicPushMessage
114 112
      */
115 113
     public function __call($method, $args)
116 114
     {
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
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
         if (substr($method, 0, 3) == 'ios') {
130 130
             $key = snake_case(substr($method, 3));
131 131
 
132
-            $this->iosData[$key] = $args[0];
132
+            $this->iosData[ $key ] = $args[ 0 ];
133 133
         } elseif (substr($method, 0, 7) == 'android') {
134 134
             $key = snake_case(substr($method, 7));
135 135
 
136
-            $this->androidData[$key] = $args[0];
136
+            $this->androidData[ $key ] = $args[ 0 ];
137 137
         }
138 138
 
139 139
         return $this;
@@ -161,24 +161,24 @@  discard block
 block discarded – undo
161 161
             ],
162 162
         ];
163 163
 
164
-        if (! empty($this->title)) {
165
-            $data['notification']['title'] = $this->title;
164
+        if (!empty($this->title)) {
165
+            $data[ 'notification' ][ 'title' ] = $this->title;
166 166
         }
167 167
 
168
-        if (! empty($this->sound)) {
169
-            $data['notification']['sound'] = $this->sound;
168
+        if (!empty($this->sound)) {
169
+            $data[ 'notification' ][ 'sound' ] = $this->sound;
170 170
         }
171 171
 
172
-        if (! empty($this->iosData)) {
173
-            $data['notification']['ios'] = $this->iosData;
172
+        if (!empty($this->iosData)) {
173
+            $data[ 'notification' ][ 'ios' ] = $this->iosData;
174 174
         }
175 175
 
176
-        if (! empty($this->androidData)) {
177
-            $data['notification']['android'] = $this->androidData;
176
+        if (!empty($this->androidData)) {
177
+            $data[ 'notification' ][ 'android' ] = $this->androidData;
178 178
         }
179 179
 
180
-        if (! empty($this->payload)) {
181
-            $data['notification']['payload'] = $this->payload;
180
+        if (!empty($this->payload)) {
181
+            $data[ 'notification' ][ 'payload' ] = $this->payload;
182 182
         }
183 183
 
184 184
         return $data;
Please login to merge, or discard this patch.
src/IonicPushChannel.php 1 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.