Passed
Push — master ( 28a360...d194a0 )
by Mihail
11:20
created
Apps/Model/Admin/User/FormUserUpdate.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
     /**
38
-    * Load user data on before method
39
-    */
38
+     * Load user data on before method
39
+     */
40 40
     public function before()
41 41
     {
42 42
         foreach ($this->getAllProperties() as $property => $old_data) {
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     }
65 65
 
66 66
     /**
67
-    * Example of usage magic rules for future usage in condition $model->validate()
68
-    */
67
+     * Example of usage magic rules for future usage in condition $model->validate()
68
+     */
69 69
     public function rules()
70 70
     {
71 71
         return [
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
                 if ($this->newpassword !== null && Str::length($this->newpassword) >= 3) {
99 99
                     $this->_user->password = App::$Security->password_hash($this->newpassword);
100 100
                 }
101
-            } elseif($property === 'approve_token') {
101
+            } elseif ($property === 'approve_token') {
102 102
                 if ($value == "1") {
103 103
                     $this->_user->approve_token = '0';
104 104
                 } else {
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 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-    * Validation rules
37
-    */
36
+     * Validation rules
37
+     */
38 38
     public function rules()
39 39
     {
40 40
         return [
Please login to merge, or discard this 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/Model/Front/Profile/FormSettings.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-    * Set default data
34
-    */
33
+     * Set default data
34
+     */
35 35
     public function before()
36 36
     {
37 37
         $profile = $this->_user->getProfile()->toArray(); // object to array (property's is protected of access)
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     /**
55
-    * Labels
56
-    */
55
+     * Labels
56
+     */
57 57
     public function labels()
58 58
     {
59 59
         $labels =  [
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
     }
76 76
 
77 77
     /**
78
-    * Rules for validation
79
-    */
78
+     * Rules for validation
79
+     */
80 80
     public function rules()
81 81
     {
82 82
         $rules = [
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     */
57 57
     public function labels()
58 58
     {
59
-        $labels =  [
59
+        $labels = [
60 60
             'nick' => __('Nickname'),
61 61
             'sex' => __('Sex'),
62 62
             'birthday' => __('Birthday'),
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         // labels for custom fields
70 70
         foreach (ProfileField::getAll() as $custom) {
71
-            $labels['custom_data.' . $custom->id] = Serialize::getDecodeLocale($custom->name);
71
+            $labels['custom_data.'.$custom->id] = Serialize::getDecodeLocale($custom->name);
72 72
         }
73 73
 
74 74
         return $labels;
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
         // custom profile fields
94 94
         foreach (ProfileField::getAll() as $custom) {
95 95
             $rules[] = [
96
-                'custom_data.' . $custom->id,
96
+                'custom_data.'.$custom->id,
97 97
                 'used'
98 98
             ];
99 99
             $rules[] = [
100
-                'custom_data.' . $custom->id,
101
-                (int)$custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
100
+                'custom_data.'.$custom->id,
101
+                (int) $custom->reg_cond === 1 ? 'direct_match' : 'reverse_match',
102 102
                 $custom->reg_exp
103 103
             ];
104 104
         }
Please login to merge, or discard this patch.
Apps/Model/Front/Profile/FormWallPostDelete.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 
21 21
 
22 22
     /**
23
-    * Set post id based on post active record
24
-    */
23
+     * Set post id based on post active record
24
+     */
25 25
     public function before()
26 26
     {
27 27
         $this->id = $this->_post->id;
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 
30 30
 
31 31
     /**
32
-    * Pseudo-rules, here is not required
33
-    */
32
+     * Pseudo-rules, here is not required
33
+     */
34 34
     public function rules()
35 35
     {
36 36
         return [];
Please login to merge, or discard this patch.
Apps/Model/Front/User/FormRecovery.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     public $captcha;
18 18
 
19 19
     /**
20
-    * Labels
21
-    */
20
+     * Labels
21
+     */
22 22
     public function labels()
23 23
     {
24 24
         return [
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     }
29 29
 
30 30
     /**
31
-    * Validation rules
32
-    */
31
+     * Validation rules
32
+     */
33 33
     public function rules()
34 34
     {
35 35
         return [
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/layout/main.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -188,13 +188,16 @@
 block discarded – undo
188 188
                             <?php foreach ($this->breadcrumbs as $bUrl => $bText): ?>
189 189
                                 <?php if (Obj::isLikeInt($bUrl)): // only text ?>
190 190
                                     <li class="active"><?= \App::$Security->strip_tags($bText) ?></li>
191
-                                <?php else: ?>
191
+                                <?php else {
192
+    : ?>
192 193
                                     <li>
193 194
                                         <a href="<?= \App::$Security->strip_tags($bUrl) ?>">
194 195
                                             <?= \App::$Security->strip_tags($bText) ?>
195 196
                                         </a>
196 197
                                     </li>
197
-                                <?php endif; ?>
198
+                                <?php endif;
199
+}
200
+?>
198 201
                             <?php endforeach; ?>
199 202
                         </ol>
200 203
                     <?php endif; ?>
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     <?php
23 23
     $customCssCode = \App::$View->showPlainCode('css');
24 24
     if ($customCssCode !== null) {
25
-        echo '<style>' . $customCssCode . '</style>';
25
+        echo '<style>'.$customCssCode.'</style>';
26 26
     } ?>
27 27
     <script>
28 28
         window.jQ = [];
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
                             'type' => 'ul',
131 131
                             'property' => ['class' => 'nav nav-second-level'],
132 132
                             'items' => [
133
-                                ['type' => 'link', 'link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> ' . __('Settings'), 'html' => true],
134
-                                ['type' => 'link', 'link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> ' . __('Files'), 'html' => true],
135
-                                ['type' => 'link', 'link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> ' . __('Antivirus'), 'html' => true],
136
-                                ['type' => 'link', 'link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> ' . __('Routing'), 'html' => true],
137
-                                ['type' => 'link', 'link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> ' . __('Updates'), 'html' => true]
133
+                                ['type' => 'link', 'link' => ['main/settings'], 'text' => '<i class="fa fa-cogs"></i> '.__('Settings'), 'html' => true],
134
+                                ['type' => 'link', 'link' => ['main/files'], 'text' => '<i class="fa fa-file-o"></i> '.__('Files'), 'html' => true],
135
+                                ['type' => 'link', 'link' => ['main/antivirus'], 'text' => '<i class="fa fa-shield"></i> '.__('Antivirus'), 'html' => true],
136
+                                ['type' => 'link', 'link' => ['main/routing'], 'text' => '<i class="fa fa-code"></i> '.__('Routing'), 'html' => true],
137
+                                ['type' => 'link', 'link' => ['main/updates'], 'text' => '<i class="fa fa-gavel"></i> '.__('Updates'), 'html' => true]
138 138
                             ]
139 139
                         ]) ?>
140 140
                         <!-- /.nav-second-level -->
@@ -154,22 +154,22 @@  discard block
 block discarded – undo
154 154
                     foreach ($extTable as $item) {
155 155
                         $menuItem = [
156 156
                             'type' => 'link',
157
-                            'link' => [Str::lowerCase($item->sys_name) . '/index'],
158
-                            'text' => $item->getLocaleName() . (!$item->checkVersion() ? ' <i class="fa fa-wrench" style="color: #ffbd26;"></i>' : null),
157
+                            'link' => [Str::lowerCase($item->sys_name).'/index'],
158
+                            'text' => $item->getLocaleName().(!$item->checkVersion() ? ' <i class="fa fa-wrench" style="color: #ffbd26;"></i>' : null),
159 159
                             'html' => true
160 160
                         ];
161 161
                         if ($item->type === 'app') {
162 162
                             $appControllers[] = $item->sys_name;
163 163
                             $appMenuItems[] = $menuItem;
164
-                        } elseif($item->type === 'widget') {
164
+                        } elseif ($item->type === 'widget') {
165 165
                             $widgetControllers[] = $item->sys_name;
166 166
                             $widgetMenuItems[] = $menuItem;
167 167
                         }
168 168
                     }
169 169
 
170
-                    $appMenuItems[] = ['type' => 'link', 'link' => ['application/index'], 'text' => __('All apps') . '...'];
170
+                    $appMenuItems[] = ['type' => 'link', 'link' => ['application/index'], 'text' => __('All apps').'...'];
171 171
                     $appControllers[] = 'Application';
172
-                    $widgetMenuItems[] = ['type' => 'link', 'link' => ['widget/index'], 'text' => __('All widgets') . '...'];
172
+                    $widgetMenuItems[] = ['type' => 'link', 'link' => ['widget/index'], 'text' => __('All widgets').'...'];
173 173
                     $widgetControllers[] = 'Widget';
174 174
                     ?>
175 175
                     <li<?= Arr::in(\App::$Request->getController(), $appControllers) ? ' class="active"' : null ?>>
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
                             echo $body;
231 231
                         } else {
232 232
                             \App::$Response->setStatusCode(404);
233
-                            echo '<p>' . __('Page is not founded!') . '</p>';
233
+                            echo '<p>'.__('Page is not founded!').'</p>';
234 234
                         }
235 235
                         ?>
236 236
                     </article>
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 <?php
262 262
 $customJsCode = \App::$View->showPlainCode('js');
263 263
 if ($customJsCode !== null) {
264
-    echo '<script>' . $customJsCode . '</script>';
264
+    echo '<script>'.$customJsCode.'</script>';
265 265
 }
266 266
 ?>
267 267
 </body>
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/field_list.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,6 +66,9 @@
 block discarded – undo
66 66
     ]
67 67
 ]);
68 68
     ?>
69
-<?php else: ?>
69
+<?php else {
70
+    : ?>
70 71
     <p>No additional fields is added!</p>
71
-<?php endif; ?>
72 72
\ No newline at end of file
73
+<?php endif;
74
+}
75
+?>
73 76
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 <hr />
24 24
     <div class="row">
25 25
         <div class="col-md-12">
26
-            <?= Url::link(['profile/fieldupdate', 0], '<i class="fa fa-plus"></i> ' . __('Add field'), ['class' => 'btn btn-primary pull-right']) ?>
26
+            <?= Url::link(['profile/fieldupdate', 0], '<i class="fa fa-plus"></i> '.__('Add field'), ['class' => 'btn btn-primary pull-right']) ?>
27 27
         </div>
28 28
     </div>
29 29
 <?php if ($records->count() > 0):
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         $items[] = [
39 39
             ['text' => $row->id],
40 40
             ['text' => Serialize::getDecodeLocale($row->name)],
41
-            ['text' => '<span class="' . $labelClass . '">' . $row->type . '</span>', 'html' => true],
42
-            ['text' => '<code>' . ($row->reg_cond == 0 ? '!' : null) . 'preg_match("' . $row->reg_exp . '", input)' . '</code>', 'html' => true],
41
+            ['text' => '<span class="'.$labelClass.'">'.$row->type.'</span>', 'html' => true],
42
+            ['text' => '<code>'.($row->reg_cond == 0 ? '!' : null).'preg_match("'.$row->reg_exp.'", input)'.'</code>', 'html' => true],
43 43
             [
44
-                'text' => Url::link(['profile/fieldupdate', $row->id], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]) .
44
+                'text' => Url::link(['profile/fieldupdate', $row->id], '<i class="fa fa-pencil fa-lg"></i> ', ['html' => true]).
45 45
                 Url::link(['profile/fielddelete', $row->id], '<i class="fa fa-trash-o fa-lg"></i>', ['html' => true]),
46 46
                 'html' => true,
47 47
                 'property' => ['class' => 'text-center']
Please login to merge, or discard this patch.