Passed
Push — master ( 6042d7...377078 )
by Mihail
04:38
created
Apps/Controller/Api/Profile.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
         $findAnswer->delete();
203 203
 
204 204
         $this->response = json_encode([
205
-           'status' => 1,
205
+            'status' => 1,
206 206
             'message' => 'ok'
207 207
         ]);
208 208
     }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             $answerTime = Date::convertToTimestamp($lastAnswer->created_at);
161 161
             $cfgs = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
162 162
             // hmm, maybe past less then delay required?
163
-            if ($now - (int)$cfgs['delayBetweenPost'] < $answerTime) {
163
+            if ($now - (int) $cfgs['delayBetweenPost'] < $answerTime) {
164 164
                 throw new ForbiddenException('Delay between answers not pass');
165 165
             }
166 166
         }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         // add notification for target user
176 176
         if ($viewer->id !== $target_id) {
177 177
             $notify = new EntityAddNotification($target_id);
178
-            $notify->add('/profile/show/' . $target_id . '#wall-post-' . $wallRow->id, EntityAddNotification::MSG_ADD_WALLANSWER, [
178
+            $notify->add('/profile/show/'.$target_id.'#wall-post-'.$wallRow->id, EntityAddNotification::MSG_ADD_WALLANSWER, [
179 179
                 'snippet' => Text::snippet($message, 50),
180 180
                 'post' => $wallRow->message
181 181
             ]);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $postInfo = $findAnswer->getWallPost();
220 220
 
221 221
         // if not a target user of answer and not answer owner - lets throw exception
222
-        if($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
222
+        if ($postInfo->target_id !== $viewer->id && $findAnswer->user_id !== $viewer->id) {
223 223
             throw new ForbiddenException('Access declined!');
224 224
         }
225 225
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             // sender is not myself? then i'm - target (remote user is sender user->to_me)
281 281
             if ($row->sender_id !== $user->id) {
282 282
                 $userList[] = $row->sender_id;
283
-                if ((int)$row->tread === 0) {
283
+                if ((int) $row->tread === 0) {
284 284
                     $unreadList[] = $row->sender_id;
285 285
                 }
286 286
             }
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
         // get special types for this action
362 362
         $queryType = $this->request->get('type');
363
-        $queryId = (int)$this->request->get('id');
363
+        $queryId = (int) $this->request->get('id');
364 364
         // get current user object
365 365
         $user = App::$User->identity();
366 366
 
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
         switch ($queryType) {
377 377
             case 'after':
378 378
                 $messages = Message::where('id', '>', $queryId)
379
-                    ->where(function ($query) use ($cor_id, $user) {
380
-                        $query->where(function ($q) use ($cor_id, $user){
379
+                    ->where(function($query) use ($cor_id, $user) {
380
+                        $query->where(function($q) use ($cor_id, $user){
381 381
                             $q->where('target_id', '=', $user->getId())
382 382
                                 ->where('sender_id', '=', $cor_id);
383
-                        })->orWhere(function ($q) use ($cor_id, $user){
383
+                        })->orWhere(function($q) use ($cor_id, $user){
384 384
                             $q->where('target_id', '=', $cor_id)
385 385
                                 ->where('sender_id', '=', $user->getId());
386 386
                         });
@@ -388,11 +388,11 @@  discard block
 block discarded – undo
388 388
                 break;
389 389
             case 'before':
390 390
                 $messages = Message::where('id', '<', $queryId)
391
-                    ->where(function ($query) use ($cor_id, $user) {
392
-                        $query->where(function ($q) use ($cor_id, $user){
391
+                    ->where(function($query) use ($cor_id, $user) {
392
+                        $query->where(function($q) use ($cor_id, $user){
393 393
                             $q->where('target_id', '=', $user->getId())
394 394
                                 ->where('sender_id', '=', $cor_id);
395
-                        })->orWhere(function ($q) use ($cor_id, $user){
395
+                        })->orWhere(function($q) use ($cor_id, $user){
396 396
                             $q->where('target_id', '=', $cor_id)
397 397
                                 ->where('sender_id', '=', $user->getId());
398 398
                         });
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
         $this->setJsonHeader();
501 501
 
502 502
         // get operation type and target user id
503
-        $target_id = (int)$this->request->get('target');
503
+        $target_id = (int) $this->request->get('target');
504 504
         $type = $this->request->get('type');
505 505
 
506 506
         // check type of query
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 
516 516
         $cfg = \Apps\ActiveRecord\App::getConfigs('app', 'Profile');
517 517
         // check if rating is enabled for website
518
-        if ((int)$cfg['rating'] !== 1) {
518
+        if ((int) $cfg['rating'] !== 1) {
519 519
             throw new NativeException('Rating is disabled');
520 520
         }
521 521
 
Please login to merge, or discard this patch.
Apps/Model/Front/Content/EntityContentRead.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * Prepare model attributes from passed objects
59 59
      * @throws ForbiddenException
60
-    */
60
+     */
61 61
     public function before()
62 62
     {
63 63
         $this->title = Serialize::getDecodeLocale($this->_content->title);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         $this->source = $this->_content->source;
98
-        $this->views = $this->_content->views+1;
98
+        $this->views = $this->_content->views + 1;
99 99
         // check for dependence, add '' for general cat, ex: general/depend1/depend2/.../depend-n
100 100
         $catNestingArray = Arr::merge([0 => ''], explode('/', $this->catPath));
101 101
         if ($catNestingArray > 1) {
@@ -127,15 +127,15 @@  discard block
 block discarded – undo
127 127
         ];
128 128
 
129 129
         // get gallery images and poster data
130
-        $galleryPath = '/upload/gallery/' . $this->_content->id;
130
+        $galleryPath = '/upload/gallery/'.$this->_content->id;
131 131
         // check if gallery folder is exist
132 132
         if (Directory::exist($galleryPath)) {
133
-            $originImages = File::listFiles($galleryPath . '/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
133
+            $originImages = File::listFiles($galleryPath.'/orig/', ['.jpg', '.png', '.gif', '.jpeg', '.bmp', '.webp'], true);
134 134
             // generate poster data
135 135
             if (Arr::in($this->_content->poster, $originImages)) {
136 136
                 // original poster
137 137
                 $posterName = $this->_content->poster;
138
-                $this->posterFull = $galleryPath . '/orig/' . $posterName;
138
+                $this->posterFull = $galleryPath.'/orig/'.$posterName;
139 139
                 if (!File::exist($this->posterFull)) {
140 140
                     $this->posterFull = null;
141 141
                 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $posterSplit = explode('.', $posterName);
144 144
                 array_pop($posterSplit);
145 145
                 $posterCleanName = implode('.', $posterSplit);
146
-                $this->posterThumb = $galleryPath . '/thumb/' . $posterCleanName . '.jpg';
146
+                $this->posterThumb = $galleryPath.'/thumb/'.$posterCleanName.'.jpg';
147 147
                 if (!File::exist($this->posterThumb)) {
148 148
                     $this->posterThumb = null;
149 149
                 }
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
                 if (Str::startsWith($imageClearName, $this->_content->poster)) {
159 159
                     continue;
160 160
                 }
161
-                $thumbPath = $galleryPath . '/thumb/' . $imageClearName . '.jpg';
161
+                $thumbPath = $galleryPath.'/thumb/'.$imageClearName.'.jpg';
162 162
                 if (File::exist($thumbPath)) {
163
-                    $this->galleryItems[$thumbPath] = $galleryPath . '/orig/' . $image;
163
+                    $this->galleryItems[$thumbPath] = $galleryPath.'/orig/'.$image;
164 164
                 }
165 165
             }
166 166
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $this->rating = $this->_content->rating;
170 170
         $ignoredRate = App::$Session->get('content.rate.ignore');
171 171
         $this->canRate = true;
172
-        if (Obj::isArray($ignoredRate) && Arr::in((string)$this->id, $ignoredRate)) {
172
+        if (Obj::isArray($ignoredRate) && Arr::in((string) $this->id, $ignoredRate)) {
173 173
             $this->canRate = false;
174 174
         }
175 175
         if (!App::$User->isAuth()) {
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormIgnoreAdd.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function save()
53 53
     {
54 54
         // check if target is myself or always exist in block list
55
-        if ($this->_user->getId() === (int)$this->id || Blacklist::have($this->_user->getId(), $this->id)) {
55
+        if ($this->_user->getId() === (int) $this->id || Blacklist::have($this->_user->getId(), $this->id)) {
56 56
             return false;
57 57
         }
58 58
 
Please login to merge, or discard this patch.
Apps/View/Admin/default/application/turn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             [['text' => __('Name')], ['text' => $app->getLocaleName()]],
32 32
             [['text' => __('System name')], ['text' => $app->sys_name]],
33 33
             [['text' => __('Last update')], ['text' => Date::convertToDatetime($app->updated_at, DATE::FORMAT_TO_SECONDS)]],
34
-            [['text' => __('Status')], ['text' => ((int)$app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int)$app->disabled === 0) ? 'alert-success' : 'alert-danger']]
34
+            [['text' => __('Status')], ['text' => ((int) $app->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' =>  ((int) $app->disabled === 0) ? 'alert-success' : 'alert-danger']]
35 35
         ]
36 36
     ]
37 37
 ]); ?>
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/_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.
Private/Config/Permissions.php 2 patches
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.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,69 +1,69 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3 3
 return array (
4
-  0 => 'global/write',
5
-  1 => 'global/modify',
6
-  2 => 'global/file',
7
-  3 => 'global/all',
8
-  4 => 'Admin/Application/Index',
9
-  5 => 'Admin/Application/Install',
10
-  6 => 'Admin/Application/Update',
11
-  7 => 'Admin/Application/Turn',
12
-  8 => 'Admin/Comments/Index',
13
-  9 => 'Admin/Comments/Read',
14
-  10 => 'Admin/Comments/Edit',
15
-  11 => 'Admin/Comments/Delete',
16
-  12 => 'Admin/Comments/Publish',
17
-  13 => 'Admin/Comments/Answerlist',
18
-  14 => 'Admin/Comments/Settings',
19
-  15 => 'Admin/Content/Index',
20
-  16 => 'Admin/Content/Update',
21
-  17 => 'Admin/Content/Delete',
22
-  18 => 'Admin/Content/Restore',
23
-  19 => 'Admin/Content/Clear',
24
-  20 => 'Admin/Content/Categories',
25
-  21 => 'Admin/Content/Categorydelete',
26
-  22 => 'Admin/Content/Categoryupdate',
27
-  23 => 'Admin/Content/Globdelete',
28
-  24 => 'Admin/Content/Publish',
29
-  25 => 'Admin/Content/Settings',
30
-  26 => 'Admin/Contenttag/Index',
31
-  27 => 'Admin/Feedback/Index',
32
-  28 => 'Admin/Feedback/Read',
33
-  29 => 'Admin/Feedback/Update',
34
-  30 => 'Admin/Feedback/Turn',
35
-  31 => 'Admin/Feedback/Delete',
36
-  32 => 'Admin/Feedback/Settings',
37
-  33 => 'Admin/Main/Index',
38
-  34 => 'Admin/Main/Settings',
39
-  35 => 'Admin/Main/Files',
40
-  36 => 'Admin/Main/Antivirus',
41
-  37 => 'Admin/Main/Debugcookie',
42
-  38 => 'Admin/Main/Routing',
43
-  39 => 'Admin/Main/Addroute',
44
-  40 => 'Admin/Main/Deleteroute',
45
-  41 => 'Admin/Main/Cache',
46
-  42 => 'Admin/Main/Sessions',
47
-  43 => 'Admin/Newcomment/Index',
48
-  44 => 'Admin/Newcontent/Index',
49
-  45 => 'Admin/Profile/Index',
50
-  46 => 'Admin/Profile/Delete',
51
-  47 => 'Admin/Profile/Update',
52
-  48 => 'Admin/Profile/Fieldlist',
53
-  49 => 'Admin/Profile/Fieldupdate',
54
-  50 => 'Admin/Profile/Fielddelete',
55
-  51 => 'Admin/Profile/Settings',
56
-  52 => 'Admin/Search/Index',
57
-  53 => 'Admin/Sitemap/Index',
58
-  54 => 'Admin/User/Index',
59
-  55 => 'Admin/User/Update',
60
-  56 => 'Admin/User/Delete',
61
-  57 => 'Admin/User/Grouplist',
62
-  58 => 'Admin/User/GroupUpdate',
63
-  59 => 'Admin/User/Settings',
64
-  60 => 'Admin/User/Invite',
65
-  61 => 'Admin/Widget/Index',
66
-  62 => 'Admin/Widget/Install',
67
-  63 => 'Admin/Widget/Update',
68
-  64 => 'Admin/Widget/Turn',
4
+    0 => 'global/write',
5
+    1 => 'global/modify',
6
+    2 => 'global/file',
7
+    3 => 'global/all',
8
+    4 => 'Admin/Application/Index',
9
+    5 => 'Admin/Application/Install',
10
+    6 => 'Admin/Application/Update',
11
+    7 => 'Admin/Application/Turn',
12
+    8 => 'Admin/Comments/Index',
13
+    9 => 'Admin/Comments/Read',
14
+    10 => 'Admin/Comments/Edit',
15
+    11 => 'Admin/Comments/Delete',
16
+    12 => 'Admin/Comments/Publish',
17
+    13 => 'Admin/Comments/Answerlist',
18
+    14 => 'Admin/Comments/Settings',
19
+    15 => 'Admin/Content/Index',
20
+    16 => 'Admin/Content/Update',
21
+    17 => 'Admin/Content/Delete',
22
+    18 => 'Admin/Content/Restore',
23
+    19 => 'Admin/Content/Clear',
24
+    20 => 'Admin/Content/Categories',
25
+    21 => 'Admin/Content/Categorydelete',
26
+    22 => 'Admin/Content/Categoryupdate',
27
+    23 => 'Admin/Content/Globdelete',
28
+    24 => 'Admin/Content/Publish',
29
+    25 => 'Admin/Content/Settings',
30
+    26 => 'Admin/Contenttag/Index',
31
+    27 => 'Admin/Feedback/Index',
32
+    28 => 'Admin/Feedback/Read',
33
+    29 => 'Admin/Feedback/Update',
34
+    30 => 'Admin/Feedback/Turn',
35
+    31 => 'Admin/Feedback/Delete',
36
+    32 => 'Admin/Feedback/Settings',
37
+    33 => 'Admin/Main/Index',
38
+    34 => 'Admin/Main/Settings',
39
+    35 => 'Admin/Main/Files',
40
+    36 => 'Admin/Main/Antivirus',
41
+    37 => 'Admin/Main/Debugcookie',
42
+    38 => 'Admin/Main/Routing',
43
+    39 => 'Admin/Main/Addroute',
44
+    40 => 'Admin/Main/Deleteroute',
45
+    41 => 'Admin/Main/Cache',
46
+    42 => 'Admin/Main/Sessions',
47
+    43 => 'Admin/Newcomment/Index',
48
+    44 => 'Admin/Newcontent/Index',
49
+    45 => 'Admin/Profile/Index',
50
+    46 => 'Admin/Profile/Delete',
51
+    47 => 'Admin/Profile/Update',
52
+    48 => 'Admin/Profile/Fieldlist',
53
+    49 => 'Admin/Profile/Fieldupdate',
54
+    50 => 'Admin/Profile/Fielddelete',
55
+    51 => 'Admin/Profile/Settings',
56
+    52 => 'Admin/Search/Index',
57
+    53 => 'Admin/Sitemap/Index',
58
+    54 => 'Admin/User/Index',
59
+    55 => 'Admin/User/Update',
60
+    56 => 'Admin/User/Delete',
61
+    57 => 'Admin/User/Grouplist',
62
+    58 => 'Admin/User/GroupUpdate',
63
+    59 => 'Admin/User/Settings',
64
+    60 => 'Admin/User/Invite',
65
+    61 => 'Admin/Widget/Index',
66
+    62 => 'Admin/Widget/Install',
67
+    63 => 'Admin/Widget/Update',
68
+    64 => 'Admin/Widget/Turn',
69 69
 );
70 70
\ No newline at end of file
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/EntityCheck.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
     public $chmodCheck = [];
21 21
 
22 22
     /**
23
-    * Get default server information and prepare chmod info
24
-    */
23
+     * Get default server information and prepare chmod info
24
+     */
25 25
     public function before()
26 26
     {
27 27
         $this->phpVersion = phpversion();
Please login to merge, or discard this patch.