Failed Conditions
Push — 0.2 ( fc80e7...ae313c )
by Rafael
13:16 queued 05:41
created
src/Models/AppsPlans.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
         ]);
171 171
 
172 172
         if (is_object($setting)) {
173
-            return (string) $setting->value;
173
+            return (string)$setting->value;
174 174
         }
175 175
 
176 176
         return null;
Please login to merge, or discard this patch.
src/Models/Resources.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      */
87 87
     public static function isResource(string $resourceName) : bool
88 88
     {
89
-        return (bool) self::count([
89
+        return (bool)self::count([
90 90
             'conditions' => 'name = ?0 AND apps_id in (?1, ?2)',
91 91
             'bind' => [$resourceName, Di::getDefault()->getApp()->getId(), Apps::CANVAS_DEFAULT_APP_ID]
92 92
         ]);
Please login to merge, or discard this patch.
src/Models/Apps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
      */
153 153
     public function isActive(): bool
154 154
     {
155
-        return (bool) $this->is_actived;
155
+        return (bool)$this->is_actived;
156 156
     }
157 157
 
158 158
     /**
Please login to merge, or discard this patch.
src/Models/Users.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
      */
390 390
     public function currentCompanyId(): int
391 391
     {
392
-        return (int) $this->default_company;
392
+        return (int)$this->default_company;
393 393
     }
394 394
 
395 395
     /**
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
      */
401 401
     public function currentCompanyBranchId(): int
402 402
     {
403
-        return (int) $this->default_company_branch;
403
+        return (int)$this->default_company_branch;
404 404
     }
405 405
 
406 406
     /**
@@ -432,13 +432,13 @@  discard block
 block discarded – undo
432 432
             $company->users_id = $this->getId();
433 433
 
434 434
             if (!$company->save()) {
435
-                throw new Exception((string) current($company->getMessages()));
435
+                throw new Exception((string)current($company->getMessages()));
436 436
             }
437 437
 
438 438
             $this->default_company = $company->getId();
439 439
 
440 440
             if (!$this->update()) {
441
-                throw new ServerErrorHttpException((string) current($this->getMessages()));
441
+                throw new ServerErrorHttpException((string)current($this->getMessages()));
442 442
             }
443 443
 
444 444
             $this->stripe_id = $company->getPaymentGatewayCustomerId();
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
      */
495 495
     public function getAssociatedApps(): array
496 496
     {
497
-        return array_map(function ($apps) {
497
+        return array_map(function($apps) {
498 498
             return $apps['apps_id'];
499 499
         }, $this->getApps(['columns' => 'apps_id', 'group' => 'apps_id'])->toArray());
500 500
     }
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
      */
507 507
     public function getAssociatedCompanies(): array
508 508
     {
509
-        return array_map(function ($company) {
509
+        return array_map(function($company) {
510 510
             return $company['companies_id'];
511 511
         }, $this->getCompanies(['columns' => 'companies_id'])->toArray());
512 512
     }
Please login to merge, or discard this patch.
src/Models/Companies.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -315,12 +315,12 @@  discard block
 block discarded – undo
315 315
     }
316 316
 
317 317
     /**
318
-    * Register a company given a user and name.
319
-    *
320
-    * @param  Users  $user
321
-    * @param  string $name
322
-    * @return Companies
323
-    */
318
+     * Register a company given a user and name.
319
+     *
320
+     * @param  Users  $user
321
+     * @param  string $name
322
+     * @return Companies
323
+     */
324 324
     public static function register(Users $user, string $name): Companies
325 325
     {
326 326
         $company = new self();
@@ -525,10 +525,10 @@  discard block
 block discarded – undo
525 525
     }
526 526
 
527 527
     /**
528
-    * Get an array of the associates users for this company.
529
-    *
530
-    * @return array
531
-    */
528
+     * Get an array of the associates users for this company.
529
+     *
530
+     * @return array
531
+     */
532 532
     public function getAssociatedUsersByApp(): array
533 533
     {
534 534
         return array_map(function ($users) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@
 block discarded – undo
531 531
     */
532 532
     public function getAssociatedUsersByApp(): array
533 533
     {
534
-        return array_map(function ($users) {
534
+        return array_map(function($users) {
535 535
             return $users['users_id'];
536 536
         }, $this->getUsersAssociatedByApps(['columns' => 'users_id'])->toArray());
537 537
     }
Please login to merge, or discard this patch.
src/Traits/PermissionsTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
             $userRole->apps_id = $role->apps_id;
44 44
             $userRole->companies_id = $this->currentCompanyId();
45 45
             if (!$userRole->save()) {
46
-                throw new ModelException((string) current($userRole->getMessages()));
46
+                throw new ModelException((string)current($userRole->getMessages()));
47 47
             }
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Traits/SocialLoginTrait.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
         $userProfile = current($data);
54 54
 
55 55
         /**
56
-        * Lets find if user has a linked source by social network id
57
-        */
56
+         * Lets find if user has a linked source by social network id
57
+         */
58 58
         $userLinkedSource =  UserLinkedSources::findFirst([
59 59
             'conditions'=>'source_id = ?0 and source_users_id_text = ?1 and is_deleted = 0',
60 60
             'bind'=>[
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         /**
56 56
         * Lets find if user has a linked source by social network id
57 57
         */
58
-        $userLinkedSource =  UserLinkedSources::findFirst([
58
+        $userLinkedSource = UserLinkedSources::findFirst([
59 59
             'conditions'=>'source_id = ?0 and source_users_id_text = ?1 and is_deleted = 0',
60 60
             'bind'=>[
61 61
                     $source->id,
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
             $newUser->signup();
91 91
 
92 92
             $newLinkedSource = new UserLinkedSources();
93
-            $newLinkedSource->users_id =  $newUser->id;
94
-            $newLinkedSource->source_id =  $source->id;
93
+            $newLinkedSource->users_id = $newUser->id;
94
+            $newLinkedSource->source_id = $source->id;
95 95
             $newLinkedSource->source_users_id = $userProfile->identifier ? $userProfile->identifier : 'asdakelkmaefa';
96 96
             $newLinkedSource->source_users_id_text = $userProfile->identifier ? $userProfile->identifier : 'asdakelkmaefa';
97 97
             $newLinkedSource->source_username = $userProfile->displayName ? $userProfile->displayName : 'exampleasdadas';
Please login to merge, or discard this patch.
src/Traits/NotificationsTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
      * @param string $systemModule
33 33
      * @return void
34 34
      */
35
-    public static function create(array $entity,array $user, string $content, int $notificationTypeId, string $systemModule): void
35
+    public static function create(array $entity, array $user, string $content, int $notificationTypeId, string $systemModule): void
36 36
     {
37
-        $notification =  new Notifications();
37
+        $notification = new Notifications();
38 38
         $notification->users_id = $user['id'];
39 39
         $notification->companies_id = $user['default_company'];
40 40
         $notification->apps_id = Di::getDefault()->getApp()->getId();
Please login to merge, or discard this patch.
src/Traits/SubscriptionPlanLimitTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     public $bypassRoutes = [
34 34
         '/v1/auth/logout'=> ['PUT'],
35 35
         '/v1/auth'=> ['POST'],
36
-        '/v1/companies'=> ['GET','POST'],
37
-        '/v1/apps-plans'=> ['PUT','POST'],
36
+        '/v1/companies'=> ['GET', 'POST'],
37
+        '/v1/apps-plans'=> ['PUT', 'POST'],
38 38
     ];
39 39
 
40 40
     /**
Please login to merge, or discard this patch.