Completed
Pull Request — master (#6)
by Mark
08:53 queued 04:35
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   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
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
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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, [
Please login to merge, or discard this patch.