Completed
Pull Request — master (#26)
by Tomas
02:18
created
src/Notifications.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
     public function getAll($limit = self::NOTIFICATIONS_LIMIT, $offset = 0)
58 58
     {
59 59
         return $this->api->request('GET', '/notifications?' . http_build_query([
60
-             'limit' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($limit, FILTER_VALIDATE_INT))),
61
-             'offset' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($offset, FILTER_VALIDATE_INT))),
60
+                'limit' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($limit, FILTER_VALIDATE_INT))),
61
+                'offset' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($offset, FILTER_VALIDATE_INT))),
62 62
         ]), [
63 63
             'headers' => [
64 64
                 'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(),
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             ->setAllowedTypes('app_ids', 'array')
184 184
             ->setDefined('tags')
185 185
             ->setAllowedTypes('tags', 'array')
186
-            ->setNormalizer('tags', function (Options $options, array $value) {
186
+            ->setNormalizer('tags', function(Options $options, array $value) {
187 187
                 $tags = [];
188 188
 
189 189
                 foreach ($value as $tag) {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             ->setAllowedTypes('data', 'array')
220 220
             ->setDefined('buttons')
221 221
             ->setAllowedTypes('buttons', 'array')
222
-            ->setNormalizer('buttons', function (Options $options, array $value) {
222
+            ->setNormalizer('buttons', function(Options $options, array $value) {
223 223
                 $buttons = [];
224 224
 
225 225
                 foreach ($value as $button) {
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
             ->setAllowedTypes('chrome_web_icon', 'string')
257 257
             ->setDefined('url')
258 258
             ->setAllowedTypes('url', 'string')
259
-            ->setAllowedValues('url', function ($value) {
259
+            ->setAllowedValues('url', function($value) {
260 260
                 // https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Constraints/UrlValidator.php
261 261
                 $pattern = '~^(http|https)://(([\pL\pN-]+:)?([\pL\pN-]+)@)?(([\pL\pN\pS-\.])+(\.?([\pL]|xn\-\-[\pL\pN-]+)+\.?)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[(?:(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-f]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){4})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,1}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){3})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,2}(?:(?:[0-9a-f]{1,4})))?::(?:(?:(?:[0-9a-f]{1,4})):){2})(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,3}(?:(?:[0-9a-f]{1,4})))?::(?:(?:[0-9a-f]{1,4})):)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,4}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:(?:(?:(?:[0-9a-f]{1,4})):(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,5}(?:(?:[0-9a-f]{1,4})))?::)(?:(?:[0-9a-f]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-f]{1,4})):){0,6}(?:(?:[0-9a-f]{1,4})))?::))))\])(:[0-9]+)?(/?|/\S+)$~ixu';
262 262
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             })
265 265
             ->setDefined('send_after')
266 266
             ->setAllowedTypes('send_after', '\DateTime')
267
-            ->setNormalizer('send_after', function (Options $options, \DateTime $value) {
267
+            ->setNormalizer('send_after', function(Options $options, \DateTime $value) {
268 268
                 //Fri May 02 2014 00:00:00 GMT-0700 (PDT)
269 269
                 return $value->format('D M d Y H:i:s eO (T)');
270 270
             })
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             ->setAllowedValues('delayed_option', ['timezone', 'last-active'])
274 274
             ->setDefined('delivery_time_of_day')
275 275
             ->setAllowedTypes('delivery_time_of_day', '\DateTime')
276
-            ->setNormalizer('delivery_time_of_day', function (Options $options, \DateTime $value) {
276
+            ->setNormalizer('delivery_time_of_day', function(Options $options, \DateTime $value) {
277 277
                 return $value->format('g:iA');
278 278
             })
279 279
             ->setDefined('android_led_color')
Please login to merge, or discard this patch.
src/Devices.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function add(array $data)
71 71
     {
72
-        $data = $this->resolve($data, function (OptionsResolver $resolver) {
72
+        $data = $this->resolve($data, function(OptionsResolver $resolver) {
73 73
             $resolver
74 74
                 ->setRequired('device_type')
75 75
                 ->setAllowedTypes('device_type', 'int')
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function update($id, array $data)
104 104
     {
105
-        $data = $this->resolve($data, function (OptionsResolver $resolver) {
105
+        $data = $this->resolve($data, function(OptionsResolver $resolver) {
106 106
             $resolver
107 107
                 ->setDefined('notification_types')
108 108
                 ->setAllowedTypes('notification_types', 'int')
Please login to merge, or discard this patch.