Failed Conditions
Push — 0.2 ( fc80e7...ae313c )
by Rafael
13:16 queued 05:41
created
src/Http/SwooleRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 
371 371
         $contentType = $this->getContentType();
372 372
         if (!empty($contentType)) {
373
-            return (bool) strpos($contentType, 'application/soap+xml') !== false;
373
+            return (bool)strpos($contentType, 'application/soap+xml') !== false;
374 374
         }
375 375
 
376 376
         return false;
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
             }
507 507
         }
508 508
 
509
-        return (string) $host;
509
+        return (string)$host;
510 510
     }
511 511
 
512 512
     /**
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
                 return 'https' === $this->getScheme() ? 443 : 80;
550 550
             }
551 551
         }
552
-        return (int) $this->getServer('SERVER_PORT');
552
+        return (int)$this->getServer('SERVER_PORT');
553 553
     }
554 554
 
555 555
     /**
Please login to merge, or discard this patch.
src/CustomFields/AbstractCustomFieldsModel.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
     }
63 63
 
64 64
     /**
65
-    * Before create.
66
-    *
67
-    * @return void
68
-    */
65
+     * Before create.
66
+     *
67
+     * @return void
68
+     */
69 69
     public function beforeCreate()
70 70
     {
71 71
         $this->created_at = date('Y-m-d H:i:s');
Please login to merge, or discard this patch.
src/Cli/tasks/PushNotificationTask.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $config = $this->config;
50 50
 
51 51
         //call que que tube
52
-        $queue->addWorker($queueName, function (Job $job) use ($config) {
52
+        $queue->addWorker($queueName, function(Job $job) use ($config) {
53 53
             try {
54 54
                 //get the array from the queue
55 55
                 $notificationInfo = $job->getBody();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
                         // Set the device(s) to push the notification to.
82 82
                         $devices = new DeviceCollection([
83
-                            new Device((string) $userDevice->source_users_id_text),
83
+                            new Device((string)$userDevice->source_users_id_text),
84 84
                         ]);
85 85
 
86 86
                         if (is_null($notificationInfo['id'])) {
Please login to merge, or discard this patch.
src/Cli/tasks/QueueTask.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -61,26 +61,26 @@  discard block
 block discarded – undo
61 61
             /**
62 62
              * Look for current user in database
63 63
              */
64
-             $currentUser =  Users::findFirst($msgObject->users_id);
64
+                $currentUser =  Users::findFirst($msgObject->users_id);
65 65
 
66 66
 
67 67
             /**
68 68
              * Lets determine what type of notification we are dealing with
69 69
              */
70 70
             switch ($msgObject->notification_type_id) {
71
-                 case 1:
71
+                    case 1:
72 72
                       $notification = new AppsPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
73
-                     break;
74
-                 case 2:
73
+                        break;
74
+                    case 2:
75 75
                     $notification = new UsersPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
76
-                     break;
76
+                        break;
77 77
 
78
-                 case 3:
78
+                    case 3:
79 79
                     $notification = new SystemPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
80
+                        break;
81
+                    default:
80 82
                      break;
81
-                 default:
82
-                     break;
83
-             }
83
+                }
84 84
 
85 85
 
86 86
             /**
@@ -152,19 +152,19 @@  discard block
 block discarded – undo
152 152
              * Lets determine what type of notification we are dealing with
153 153
              */
154 154
             switch ($msgObject->notification_type_id) {
155
-                 case 1:
155
+                    case 1:
156 156
                       $notification = new AppsEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
157
-                     break;
158
-                 case 2:
157
+                        break;
158
+                    case 2:
159 159
                     $notification = new UsersEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
160
-                     break;
160
+                        break;
161 161
 
162
-                 case 3:
162
+                    case 3:
163 163
                     $notification = new SystemEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
164
+                        break;
165
+                    default:
164 166
                      break;
165
-                 default:
166
-                     break;
167
-             }
167
+                }
168 168
 
169 169
 
170 170
             /**
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,18 +50,18 @@  discard block
 block discarded – undo
50 50
 
51 51
         echo ' [*] Waiting for notifications. To exit press CTRL+C', "\n";
52 52
 
53
-        $callback = function ($msg) {
53
+        $callback = function($msg) {
54 54
             $msgObject = json_decode($msg->body);
55 55
 
56 56
 
57 57
 
58
-            echo ' [x] Received from system module: ',$msgObject->system_module, "\n";
58
+            echo ' [x] Received from system module: ', $msgObject->system_module, "\n";
59 59
 
60 60
 
61 61
             /**
62 62
              * Look for current user in database
63 63
              */
64
-             $currentUser =  Users::findFirst($msgObject->users_id);
64
+             $currentUser = Users::findFirst($msgObject->users_id);
65 65
 
66 66
 
67 67
             /**
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
              */
70 70
             switch ($msgObject->notification_type_id) {
71 71
                  case 1:
72
-                      $notification = new AppsPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
72
+                      $notification = new AppsPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
73 73
                      break;
74 74
                  case 2:
75
-                    $notification = new UsersPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
75
+                    $notification = new UsersPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
76 76
                      break;
77 77
 
78 78
                  case 3:
79
-                    $notification = new SystemPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
79
+                    $notification = new SystemPushNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
80 80
                      break;
81 81
                  default:
82 82
                      break;
@@ -136,31 +136,31 @@  discard block
 block discarded – undo
136 136
 
137 137
         echo ' [*] Waiting for email notifications. To exit press CTRL+C', "\n";
138 138
 
139
-        $callback = function ($msg) {
139
+        $callback = function($msg) {
140 140
             $msgObject = json_decode($msg->body);
141 141
 
142 142
 
143 143
 
144
-            echo ' [x] Received from system module: ',$msgObject->system_module, "\n";
144
+            echo ' [x] Received from system module: ', $msgObject->system_module, "\n";
145 145
 
146 146
             /**
147 147
              * Look for current user in database
148 148
              */
149
-            $currentUser =  Users::findFirst($msgObject->users_id);
149
+            $currentUser = Users::findFirst($msgObject->users_id);
150 150
 
151 151
             /**
152 152
              * Lets determine what type of notification we are dealing with
153 153
              */
154 154
             switch ($msgObject->notification_type_id) {
155 155
                  case 1:
156
-                      $notification = new AppsEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
156
+                      $notification = new AppsEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
157 157
                      break;
158 158
                  case 2:
159
-                    $notification = new UsersEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
159
+                    $notification = new UsersEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
160 160
                      break;
161 161
 
162 162
                  case 3:
163
-                    $notification = new SystemEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module,$currentUser->toArray());
163
+                    $notification = new SystemEmailNotifications((array)$msgObject->entity, $msgObject->content, $msgObject->system_module, $currentUser->toArray());
164 164
                      break;
165 165
                  default:
166 166
                      break;
Please login to merge, or discard this patch.
src/Cli/tasks/ClearcacheTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
         ]);
110 110
 
111 111
         //call que que tube
112
-        $queue->addWorker(getenv('SESSION_QUEUE'), function (Job $job) {
112
+        $queue->addWorker(getenv('SESSION_QUEUE'), function(Job $job) {
113 113
             // Here we should collect the meta information, make the screenshots, convert the video to the FLV etc.
114 114
 
115 115
             $sessionId = $job->getBody();
Please login to merge, or discard this patch.
src/Middleware/AuthenticationMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
             $api->getDI()->setShared(
41 41
                 'userData',
42
-                function () use ($config, $data, $request) {
42
+                function() use ($config, $data, $request) {
43 43
                     $session = new Sessions();
44 44
 
45 45
                     //all is empty and is dev, ok take use the first user
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                         }
55 55
 
56 56
                         $ip = !defined('API_TESTS') ? $request->getClientAddress() : '127.0.0.1';
57
-                        return $session->check($user, $data->getClaim('sessionId'), (string) $ip, 1);
57
+                        return $session->check($user, $data->getClaim('sessionId'), (string)$ip, 1);
58 58
                     } else {
59 59
                         throw new UnauthorizedHttpException('User not found');
60 60
                     }
Please login to merge, or discard this patch.
src/Core/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
          * @todo look for a better solution , hate this
23 23
          */
24 24
         if (php_sapi_name() == 'cli') {
25
-            $currentDir = getcwd() . DIRECTORY_SEPARATOR. $path;
25
+            $currentDir = getcwd() . DIRECTORY_SEPARATOR . $path;
26 26
         }
27 27
 
28 28
         return $currentDir;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     function isJson(string $string): bool
100 100
     {
101 101
         json_decode($string);
102
-        return (bool ) (json_last_error() == JSON_ERROR_NONE);
102
+        return (bool)(json_last_error() == JSON_ERROR_NONE);
103 103
     }
104 104
 }
105 105
 
Please login to merge, or discard this patch.
src/Models/Roles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public static function isRole(string $roleName) : bool
167 167
     {
168
-        return (bool) self::count([
168
+        return (bool)self::count([
169 169
             'conditions' => 'name = ?0 AND apps_id in (?1, ?3) AND companies_id in (?2, ?3)',
170 170
             'bind' => [$roleName, Di::getDefault()->getAcl()->getApp()->getId(), Di::getDefault()->getAcl()->getCompany()->getId(), Apps::CANVAS_DEFAULT_APP_ID]
171 171
         ]);
@@ -287,10 +287,10 @@  discard block
 block discarded – undo
287 287
         if (!$inheritExist) {
288 288
             $rolesInHerits = new RolesInherits();
289 289
             $rolesInHerits->roles_id = $role->getId();
290
-            $rolesInHerits->roles_inherit = (int) $roleToInherit;
290
+            $rolesInHerits->roles_inherit = (int)$roleToInherit;
291 291
 
292 292
             if (!$rolesInHerits->save()) {
293
-                throw new ModelException((string) current($rolesInHerits->getMessages()));
293
+                throw new ModelException((string)current($rolesInHerits->getMessages()));
294 294
             }
295 295
 
296 296
             return true;
Please login to merge, or discard this patch.
src/Models/SystemModules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,6 +203,6 @@
 block discarded – undo
203 203
      */
204 204
     public function useElastic(): bool
205 205
     {
206
-        return (bool) $this->use_elastic;
206
+        return (bool)$this->use_elastic;
207 207
     }
208 208
 }
Please login to merge, or discard this patch.