Passed
Push — master ( d2190f...e6812d )
by Mihail
05:34
created
Apps/Model/Admin/Content/FormContentUpdate.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Ffcms\Core\Helper\Date;
10 10
 use Ffcms\Core\Helper\FileSystem\Directory;
11 11
 use Ffcms\Core\Helper\FileSystem\File;
12
-use Ffcms\Core\Helper\Type\Integer;
13 12
 use Ffcms\Core\Helper\Type\Obj;
14 13
 use Ffcms\Core\Helper\Serialize;
15 14
 use Ffcms\Core\Helper\Type\Str;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         if ($this->_content->id === null) {
60 60
             $this->_new = true;
61 61
             if (null === $this->galleryFreeId) {
62
-                $this->galleryFreeId = '_tmp_' . Str::randomLatin(mt_rand(16, 32));
62
+                $this->galleryFreeId = '_tmp_'.Str::randomLatin(mt_rand(16, 32));
63 63
             }
64 64
             if (null === $this->authorId) {
65 65
                 $this->authorId = App::$User->identity()->getId();
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
     public function rules()
92 92
     {
93 93
         $res = [
94
-            ['title.' . App::$Request->getLanguage(), 'required'],
95
-            ['text.' . App::$Request->getLanguage(), 'required'],
94
+            ['title.'.App::$Request->getLanguage(), 'required'],
95
+            ['text.'.App::$Request->getLanguage(), 'required'],
96 96
             ['text', 'used'],
97 97
             ['path', 'reverse_match', '/[\/\'~`\!@#\$%\^&\*\(\)+=\{\}\[\]\|;:"\<\>,\?\\\]/'],
98 98
             [['path', 'categoryId', 'authorId', 'display', 'galleryFreeId', 'title'], 'required'],
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         ];
106 106
 
107 107
         foreach (App::$Properties->get('languages') as $lang) {
108
-            $res[] = ['title.' . $lang, 'length_max', 120, null, true, true];
109
-            $res[] = ['keywords.' . $lang, 'length_max', 150];
110
-            $res[] = ['description.' . $lang, 'length_max', 250];
108
+            $res[] = ['title.'.$lang, 'length_max', 120, null, true, true];
109
+            $res[] = ['keywords.'.$lang, 'length_max', 150];
110
+            $res[] = ['description.'.$lang, 'length_max', 250];
111 111
         }
112 112
 
113 113
         return $res;
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $this->_content->meta_description = Serialize::encode($this->metaDescription);
164 164
         $this->_content->source = $this->source;
165 165
         // check if rating is changed
166
-        if ((int)$this->addRating !== 0) {
167
-            $this->_content->rating += (int)$this->addRating;
166
+        if ((int) $this->addRating !== 0) {
167
+            $this->_content->rating += (int) $this->addRating;
168 168
         }
169 169
         // check if special comment hash is exist
170 170
         if ($this->_new || Str::length($this->_content->comment_hash) < 32) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         }
177 177
 
178 178
         // save poster data
179
-        $posterPath = '/upload/gallery/' . $this->galleryFreeId . '/orig/' . $this->poster;
179
+        $posterPath = '/upload/gallery/'.$this->galleryFreeId.'/orig/'.$this->poster;
180 180
         if (File::exist($posterPath)) {
181 181
             $this->_content->poster = $this->poster;
182 182
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         // move files
213 213
         if ($tmpGalleryId !== $this->_content->id) {
214
-            Directory::rename('/upload/gallery/' . $tmpGalleryId, $this->_content->id);
214
+            Directory::rename('/upload/gallery/'.$tmpGalleryId, $this->_content->id);
215 215
         }
216 216
     }
217 217
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $data = ContentCategory::getSortedCategories();
225 225
         $response = [];
226 226
         foreach ($data as $key=>$val) {
227
-            $response[] = (string)$key;
227
+            $response[] = (string) $key;
228 228
         }
229 229
         return $response;
230 230
     }
Please login to merge, or discard this patch.
Apps/Controller/Api/Profile.php 3 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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use Ffcms\Core\Helper\Date;
16 16
 use Ffcms\Core\Helper\Type\Obj;
17 17
 use Ffcms\Core\Helper\Type\Str;
18
-use Ffcms\Core\Interfaces\iUser;
19 18
 use Illuminate\Database\Capsule\Manager as Capsule;
20 19
 use Ffcms\Core\Exception\NativeException;
21 20
 use Ffcms\Core\Exception\ForbiddenException;
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/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.
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.
Apps/View/Front/default/layout/main.php 3 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,13 +109,16 @@
 block discarded – undo
109 109
                 <?php foreach ($this->breadcrumbs as $bUrl => $bText): ?>
110 110
                     <?php if (Obj::isLikeInt($bUrl)): // only text ?>
111 111
                     <li class="active"><?= \App::$Security->strip_tags($bText) ?></li>
112
-                    <?php else: ?>
112
+                    <?php else {
113
+    : ?>
113 114
                     <li>
114 115
                         <a href="<?= \App::$Security->strip_tags($bUrl) ?>">
115 116
                             <?= \App::$Security->strip_tags($bText) ?>
116 117
                         </a>
117 118
                     </li>
118
-                    <?php endif; ?>
119
+                    <?php endif;
120
+}
121
+?>
119 122
                 <?php endforeach; ?>
120 123
             </ol>
121 124
             <?php endif; ?>
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 /** @var $body string */
3 3
 use Ffcms\Core\Helper\Type\Obj;
4 4
 use Widgets\Basic\LanguageSwitcher;
5
-use Ffcms\Core\Arch\Widget;
6 5
 use Ffcms\Core\Helper\HTML\Bootstrap\Navbar;
7 6
 
8 7
 ?>
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     <?php
24 24
     $customCssCode = \App::$View->showPlainCode('css');
25 25
     if ($customCssCode !== null) {
26
-        echo '<style>' . $customCssCode . '</style>';
26
+        echo '<style>'.$customCssCode.'</style>';
27 27
     } ?>
28 28
     <script>
29 29
         window.jQ = [];
@@ -40,32 +40,32 @@  discard block
 block discarded – undo
40 40
 if (\App::$User->isAuth()) {
41 41
     $userId = \App::$User->identity()->getId();
42 42
     // show 'add content' button if current controller is Content and user add is enabled
43
-    if (\App::$Request->getController() === 'Content' && (bool)AppRecord::getConfig('app', 'Content', 'userAdd')) {
44
-        $items[] = ['type' => 'link', 'link' => ['content/update'], 'text' => '<i class="fa fa-plus"></i> ' . __('Add content'), 'html' => true, 'position' => 'right'];
43
+    if (\App::$Request->getController() === 'Content' && (bool) AppRecord::getConfig('app', 'Content', 'userAdd')) {
44
+        $items[] = ['type' => 'link', 'link' => ['content/update'], 'text' => '<i class="fa fa-plus"></i> '.__('Add content'), 'html' => true, 'position' => 'right'];
45 45
     }
46 46
     $accountDropdown[] = ['link' => ['profile/show', $userId], 'text' => __('My profile')];
47
-    $accountDropdown[] = ['link' => ['profile/messages'], 'text' => __('Messages') . ' <span class="badge" id="pm-count-block">0</span>', 'html' => true, '!secure' => true];
48
-    $accountDropdown[] = ['link' => ['profile/notifications'], 'text' => __('Notifications') . ' <span class="badge" id="notify-count-block">0</span>', 'html' => true, '!secure' => true];
49
-    if ((bool)AppRecord::getConfig('app', 'Content', 'userAdd')) {
47
+    $accountDropdown[] = ['link' => ['profile/messages'], 'text' => __('Messages').' <span class="badge" id="pm-count-block">0</span>', 'html' => true, '!secure' => true];
48
+    $accountDropdown[] = ['link' => ['profile/notifications'], 'text' => __('Notifications').' <span class="badge" id="notify-count-block">0</span>', 'html' => true, '!secure' => true];
49
+    if ((bool) AppRecord::getConfig('app', 'Content', 'userAdd')) {
50 50
         $accountDropdown[] = ['link' => ['content/my'], 'text' => __('My content')];
51 51
     }
52 52
     $accountDropdown[] = ['link' => ['profile/settings'], 'text' => __('Settings')];
53 53
 
54 54
     $items[] = [
55 55
         'type' => 'dropdown',
56
-        'text' => '<i class="fa fa-user"></i> ' . __('Account') . ' <span class="badge" id="summary-count-block">0</span>',
56
+        'text' => '<i class="fa fa-user"></i> '.__('Account').' <span class="badge" id="summary-count-block">0</span>',
57 57
         'html' => true,
58 58
         '!secure' => true,
59 59
         'position' => 'right',
60 60
         'items' => $accountDropdown
61 61
     ];
62 62
     if (\App::$User->identity()->getRole()->can('Admin/Main/Index')) {
63
-        $items[] = ['type' => 'link', 'link' => \App::$Alias->scriptUrl . '/admin/', 'text' => '<i class="fa fa-cogs"></i> Admin', 'position' => 'right', 'html' => true];
63
+        $items[] = ['type' => 'link', 'link' => \App::$Alias->scriptUrl.'/admin/', 'text' => '<i class="fa fa-cogs"></i> Admin', 'position' => 'right', 'html' => true];
64 64
     }
65
-    $items[] = ['type' => 'link', 'link' => ['user/logout'], 'text' => '<i class="fa fa-user-times"></i> ' . __('Logout'), 'html' => true, 'position' => 'right'];
65
+    $items[] = ['type' => 'link', 'link' => ['user/logout'], 'text' => '<i class="fa fa-user-times"></i> '.__('Logout'), 'html' => true, 'position' => 'right'];
66 66
 } else {
67
-    $items[] = ['type' => 'link', 'link' => ['user/login'], 'text' => '<i class="fa fa-sign-in"></i> ' . __('Sign in'), 'position' => 'right', 'html' => true];
68
-    $items[] = ['type' => 'link', 'link' => ['user/signup'], 'text' => '<i class="fa fa-check-square-o"></i> ' . __('Sign up'), 'position' => 'right', 'html' => true];
67
+    $items[] = ['type' => 'link', 'link' => ['user/login'], 'text' => '<i class="fa fa-sign-in"></i> '.__('Sign in'), 'position' => 'right', 'html' => true];
68
+    $items[] = ['type' => 'link', 'link' => ['user/signup'], 'text' => '<i class="fa fa-check-square-o"></i> '.__('Sign up'), 'position' => 'right', 'html' => true];
69 69
 }
70 70
 
71 71
 echo Navbar::display([
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     'container' => 'container',
76 76
     'collapseId' => 'collapse-object',
77 77
     'items' => $items
78
-]);?>
78
+]); ?>
79 79
 </header>
80 80
 
81 81
 <div class="container body-container">
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                 echo $body;
151 151
             } else {
152 152
                 \App::$Response->setStatusCode(404);
153
-                echo '<p>' . __('Page is not founded!') . '</p>';
153
+                echo '<p>'.__('Page is not founded!').'</p>';
154 154
             }
155 155
             ?>
156 156
         </div>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 <?php
244 244
 $customJsCode = \App::$View->showPlainCode('js');
245 245
 if ($customJsCode !== null) {
246
-    echo '<script>' . $customJsCode . '</script>';
246
+    echo '<script>'.$customJsCode.'</script>';
247 247
 }
248 248
 // render google analytics code here
249 249
 echo \App::$View->render('blocks/googleanalytics');
Please login to merge, or discard this patch.