Passed
Push — master ( 72ceee...7d97ae )
by Mihail
04:14
created
Apps/View/Front/default/content/read.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
 <?php
45 45
 $properties = [
46
-    'date' => (int)$model->getCategory()->getProperty('showDate') === 1,
47
-    'author' => (int)$model->getCategory()->getProperty('showAuthor') === 1,
48
-    'views' => (int)$model->getCategory()->getProperty('showViews') === 1,
49
-    'category' => (int)$model->getCategory()->getProperty('showCategory') === 1
46
+    'date' => (int) $model->getCategory()->getProperty('showDate') === 1,
47
+    'author' => (int) $model->getCategory()->getProperty('showAuthor') === 1,
48
+    'views' => (int) $model->getCategory()->getProperty('showViews') === 1,
49
+    'category' => (int) $model->getCategory()->getProperty('showCategory') === 1
50 50
 ];
51
-$showComments = (int)$model->getCategory()->getProperty('showComments') === 1;
52
-$showPoster = (int)$model->getCategory()->getProperty('showPoster') === 1;
51
+$showComments = (int) $model->getCategory()->getProperty('showComments') === 1;
52
+$showPoster = (int) $model->getCategory()->getProperty('showPoster') === 1;
53 53
 
54 54
 \App::$Cache->set('test.me.baby.1', ['key' => 'value']);
55 55
 ?>
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                     </div>
97 97
                 </div>
98 98
             </div>
99
-        <?php endif ;?>
99
+        <?php endif; ?>
100 100
         <?= $model->text ?>
101 101
     </div>
102 102
     <?php if ($model->galleryItems !== null && Obj::isArray($model->galleryItems)): ?>
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             </div>
122 122
         </div>
123 123
     <?php endif; ?>
124
-    <?php if ((int)$configs['keywordsAsTags'] === 1): ?>
124
+    <?php if ((int) $configs['keywordsAsTags'] === 1): ?>
125 125
     <div id="content-tags">
126 126
         <?php
127 127
         if (Obj::isArray($model->metaKeywords) && count($model->metaKeywords) > 0 && Str::length($model->metaKeywords[0]) > 0) {
Please login to merge, or discard this patch.
Extend/Core/Arch/FrontAppController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         }
52 52
 
53 53
         // check if disabled (0 = enabled, anything else = on)
54
-        return (int)$this->application->disabled === 0;
54
+        return (int) $this->application->disabled === 0;
55 55
     }
56 56
 
57 57
     /**
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
         if ($this->configs !== null) {
64 64
             return $this->configs;
65 65
         }
66
-        $configs = (array)unserialize($this->application->configs); // data always stored like a "string" objects
66
+        $configs = (array) unserialize($this->application->configs); // data always stored like a "string" objects
67 67
         foreach ($configs as $cfg => $value) {
68 68
             if (Obj::isLikeInt($value)) {
69
-                $configs[$cfg] = (int)$value; // convert string 1 "1" to int 1 1
69
+                $configs[$cfg] = (int) $value; // convert string 1 "1" to int 1 1
70 70
             }
71 71
         }
72 72
         $this->configs = $configs;
Please login to merge, or discard this patch.
Extend/Core/Arch/FrontWidget.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         }
29 29
 
30 30
         // if widget is disabled - lets return nothing
31
-        if ((int)$wData->disabled === 1) {
31
+        if ((int) $wData->disabled === 1) {
32 32
             return null;
33 33
         }
34 34
 
Please login to merge, or discard this patch.
Private/Config/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-return array (
3
+return array(
4 4
   0 => 'global/write',
5 5
   1 => 'global/modify',
6 6
   2 => 'global/file',
Please login to merge, or discard this patch.
Apps/Controller/Admin/Profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $query = new UserRecords();
27 27
 
28 28
         // set current page and offset
29
-        $page = (int)App::$Request->query->get('page');
29
+        $page = (int) App::$Request->query->get('page');
30 30
         $offset = $page * self::ITEM_PER_PAGE;
31 31
 
32 32
         // build pagination
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/_tabs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,4 +9,4 @@
 block discarded – undo
9 9
         ['type' => 'link', 'text' => __('Group management'), 'link' => ['user/grouplist']],
10 10
         ['type' => 'link', 'text' => __('Settings'), 'link' => ['user/settings']]
11 11
     ]
12
-]);?>
13 12
\ No newline at end of file
13
+]); ?>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Model/Install/Main/FormInstall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
         $cfg['database'] = $this->db;
71 71
         $cfg['adminEmail'] = $this->email;
72 72
         $cfg['singleLanguage'] = $this->singleLanguage;
73
-        $cfg['multiLanguage'] = (bool)$this->multiLanguage;
73
+        $cfg['multiLanguage'] = (bool) $this->multiLanguage;
74 74
         $cfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$';
75 75
         $cfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(4, 16));
76 76
         $cfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128));
Please login to merge, or discard this patch.
Apps/Controller/Api/Profile.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             $answerTime = Date::convertToTimestamp($lastAnswer->created_at);
148 148
             $cfgs = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
149 149
             // hmm, maybe past less then delay required?
150
-            if ($now - (int)$cfgs['delayBetweenPost'] < $answerTime) {
150
+            if ($now - (int) $cfgs['delayBetweenPost'] < $answerTime) {
151 151
                 throw new JsonException('Delay between answers not pass');
152 152
             }
153 153
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $postInfo = $findAnswer->getWallPost();
195 195
 
196 196
         // if not a target user of answer and not answer owner - lets throw exception
197
-        if($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
197
+        if ($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
198 198
             throw new JsonException('Access declined!');
199 199
         }
200 200
 
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             // sender is not myself? then i'm - target (remote user is sender user->to_me)
255 255
             if ($row->sender_id !== $user->id) {
256 256
                 $userList[] = $row->sender_id;
257
-                if ((int)$row->tread === 0) {
257
+                if ((int) $row->tread === 0) {
258 258
                     $unreadList[] = $row->sender_id;
259 259
                 }
260 260
             }
@@ -272,8 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
             $response[] = [
274 274
                 'user_id' => $user_id,
275
-                'user_nick' => $identity->getProfile()->nick === null ? 'id' . $identity->getId() :
276
-                    App::$Security->strip_tags($identity->getProfile()->nick),
275
+                'user_nick' => $identity->getProfile()->nick === null ? 'id' . $identity->getId() : App::$Security->strip_tags($identity->getProfile()->nick),
277 276
                 'user_avatar' => $identity->getProfile()->getAvatarUrl('small'),
278 277
                 'message_new' => Arr::in($user_id, $unreadList),
279 278
                 'user_block' => !Blacklist::check($user->id, $identity->id)
@@ -323,7 +322,7 @@  discard block
 block discarded – undo
323 322
 
324 323
         // get special types for this action
325 324
         $queryType = App::$Request->get('type');
326
-        $queryId = (int)App::$Request->get('id');
325
+        $queryId = (int) App::$Request->get('id');
327 326
         // get current user object
328 327
         $user = App::$User->identity();
329 328
 
@@ -339,11 +338,11 @@  discard block
 block discarded – undo
339 338
         switch ($queryType) {
340 339
             case 'after':
341 340
                 $messages = Message::where('id', '>', $queryId)
342
-                    ->where(function ($query) use ($cor_id, $user) {
343
-                        $query->where(function ($q) use ($cor_id, $user){
341
+                    ->where(function($query) use ($cor_id, $user) {
342
+                        $query->where(function($q) use ($cor_id, $user){
344 343
                             $q->where('target_id', '=', $user->getId())
345 344
                                 ->where('sender_id', '=', $cor_id);
346
-                        })->orWhere(function ($q) use ($cor_id, $user){
345
+                        })->orWhere(function($q) use ($cor_id, $user){
347 346
                             $q->where('target_id', '=', $cor_id)
348 347
                                 ->where('sender_id', '=', $user->getId());
349 348
                         });
@@ -351,11 +350,11 @@  discard block
 block discarded – undo
351 350
                 break;
352 351
             case 'before':
353 352
                 $messages = Message::where('id', '<', $queryId)
354
-                    ->where(function ($query) use ($cor_id, $user) {
355
-                        $query->where(function ($q) use ($cor_id, $user){
353
+                    ->where(function($query) use ($cor_id, $user) {
354
+                        $query->where(function($q) use ($cor_id, $user){
356 355
                             $q->where('target_id', '=', $user->getId())
357 356
                                 ->where('sender_id', '=', $cor_id);
358
-                        })->orWhere(function ($q) use ($cor_id, $user){
357
+                        })->orWhere(function($q) use ($cor_id, $user){
359 358
                             $q->where('target_id', '=', $cor_id)
360 359
                                 ->where('sender_id', '=', $user->getId());
361 360
                         });
@@ -454,7 +453,7 @@  discard block
 block discarded – undo
454 453
         $this->setJsonHeader();
455 454
 
456 455
         // get operation type and target user id
457
-        $target_id = (int)App::$Request->get('target');
456
+        $target_id = (int) App::$Request->get('target');
458 457
         $type = App::$Request->get('type');
459 458
 
460 459
         // check type of query
@@ -469,7 +468,7 @@  discard block
 block discarded – undo
469 468
 
470 469
         $cfg = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
471 470
         // check if rating is enabled for website
472
-        if ((int)$cfg['rating'] !== 1) {
471
+        if ((int) $cfg['rating'] !== 1) {
473 472
             throw new JsonException('Rating is disabled');
474 473
         }
475 474
 
Please login to merge, or discard this patch.