Passed
Push — master ( 7068ce...7cf734 )
by Mihail
04:39
created
Apps/Controller/Api/Comments.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $this->setJsonHeader();
33 33
         $configs = AppRecord::getConfigs('widget', 'Comments');
34 34
 
35
-        $replayTo = (int)App::$Request->request->get('replay-to');
35
+        $replayTo = (int) App::$Request->request->get('replay-to');
36 36
         $model = null;
37 37
         // check if its a answer (comment answer type)
38 38
         if ($replayTo > 0) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         // pass general comment params to model
47
-        $model->message = App::$Security->secureHtml((string)App::$Request->request->get('message'));
47
+        $model->message = App::$Security->secureHtml((string) App::$Request->request->get('message'));
48 48
         $model->guestName = App::$Security->strip_tags(App::$Request->request->get('guest-name'));
49 49
 
50 50
         // check model conditions before add new row
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
         // get configs
77 77
         $configs = AppRecord::getConfigs('widget', 'Comments');
78 78
         // items per page
79
-        $perPage = (int)$configs['perPage'];
79
+        $perPage = (int) $configs['perPage'];
80 80
         // offset can be only integer
81
-        $index = (int)$index;
81
+        $index = (int) $index;
82 82
         $offset = $perPage * $index;
83 83
         // get comment target path and check
84
-        $path = (string)App::$Request->query->get('path');
84
+        $path = (string) App::$Request->query->get('path');
85 85
         if (Str::likeEmpty($path)) {
86 86
             throw new NotFoundException('Wrong path');
87 87
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $query = CommentPost::where('pathway', '=', $path);
91 91
 
92 92
         // check if comments is depend of language locale
93
-        if ((int)$configs['onlyLocale'] === 1) {
93
+        if ((int) $configs['onlyLocale'] === 1) {
94 94
             $query = $query->where('lang', '=', App::$Request->getLanguage());
95 95
         }
96 96
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     {
141 141
         $this->setJsonHeader();
142 142
         // check input data
143
-        if (!Obj::isLikeInt($commentId) || (int)$commentId < 1) {
143
+        if (!Obj::isLikeInt($commentId) || (int) $commentId < 1) {
144 144
             throw new ForbiddenException('Input data is incorrect');
145 145
         }
146 146
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         // get data from db by comment id
151 151
         $records = CommentAnswer::where('comment_id', '=', $commentId);
152
-        if ((int)$configs['onlyLocale'] === 1) {
152
+        if ((int) $configs['onlyLocale'] === 1) {
153 153
             $records = $records->where('lang', '=', App::$Request->getLanguage());
154 154
         }
155 155
 
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
         foreach ($path as $id => $uri) {
194 194
             $query = CommentPost::where('pathway', '=', $uri);
195 195
             // check if comments is depend of language locale
196
-            if ((int)$configs['onlyLocale'] === 1) {
196
+            if ((int) $configs['onlyLocale'] === 1) {
197 197
                 $query = $query->where('lang', '=', App::$Request->getLanguage());
198 198
             }
199 199
             // set itemId => count
200
-            $count[(int)$id] = $query->count();
200
+            $count[(int) $id] = $query->count();
201 201
         }
202 202
         // render json response
203 203
         return json_encode(['status' => 1, 'count' => $count]);
Please login to merge, or discard this patch.
Apps/Model/Admin/Newcontent/FormSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
     public function before()
31 31
     {
32 32
         $this->categories = Serialize::decode($this->_configs['categories']);
33
-        $this->count = (int)$this->_configs['count'];
34
-        $this->cache = (int)$this->_configs['cache'];
33
+        $this->count = (int) $this->_configs['count'];
34
+        $this->cache = (int) $this->_configs['cache'];
35 35
     }
36 36
 
37 37
     /**
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public function getResult()
65 65
     {
66 66
         return [
67
-            'count' => (int)$this->count,
68
-            'cache' => (int)$this->cache,
67
+            'count' => (int) $this->count,
68
+            'cache' => (int) $this->cache,
69 69
             'categories' => Serialize::encode($this->categories)
70 70
         ];
71 71
     }
Please login to merge, or discard this patch.
Private/Database/Tables/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 ]);
47 47
 
48 48
 $configs->newcontent = serialize([
49
-    'categories' => serialize(['2','3']),
49
+    'categories' => serialize(['2', '3']),
50 50
     'count' => '5',
51 51
     'cache' => '60'
52 52
 ]);
Please login to merge, or discard this patch.
Apps/View/Admin/default/user/group_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 <?php
26 26
 $items = [];
27
-foreach($records as $role) {
27
+foreach ($records as $role) {
28 28
     $permissions = explode(';', $role->permissions);
29 29
     $permissionsLabel = null;
30 30
     foreach ($permissions as $perm) {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         } else {
37 37
             $labelMark = 'label-default';
38 38
         }
39
-        $permissionsLabel .= '<span class="label ' . $labelMark . '">' . $perm . '</span> ';
39
+        $permissionsLabel .= '<span class="label '.$labelMark.'">'.$perm.'</span> ';
40 40
     }
41 41
     $items[] = [
42 42
         ['text' => $role->id],
Please login to merge, or discard this patch.
Apps/View/Admin/default/native/macro/widget_actions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 use Ffcms\Core\Helper\Url;
3 3
 
4 4
 if (isset($controller)): ?>
5
-<a href="<?= Url::to($controller . '/index') ?>"><i class="fa fa-cogs"></i></a>&nbsp;
5
+<a href="<?= Url::to($controller.'/index') ?>"><i class="fa fa-cogs"></i></a>&nbsp;
6 6
 <a href="<?= Url::to('widget/turn', $controller) ?>"><i class="fa fa-power-off"></i></a>
7 7
 <?php endif; ?>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/View/Admin/default/layout/main.php 1 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_update.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
 foreach (\App::$Properties->get('languages') as $lang) {
34 34
     $nameTab[] = [
35 35
         'type' => 'tab',
36
-        'text' => __('Lang') . ': ' . Str::upperCase($lang),
37
-        'content' => $form->field('name.' . $lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')),
36
+        'text' => __('Lang').': '.Str::upperCase($lang),
37
+        'content' => $form->field('name.'.$lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')),
38 38
         'active' => $lang === \App::$Request->getLanguage(),
39 39
         'html' => true,
40 40
         '!secure' => true
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
 foreach ($records as $profile) {
28 28
     $items[] = [
29 29
         ['text' => $profile->id],
30
-        ['text' => $profile->User()->login . '/' . $profile->User()->email],
30
+        ['text' => $profile->User()->login.'/'.$profile->User()->email],
31 31
         ['text' => $profile->nick],
32 32
         ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)],
33
-        ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating],
34
-        ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> ') .
33
+        ['text' => ($profile->rating > 0 ? '+' : null).$profile->rating],
34
+        ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> ').
35 35
             Url::link(['user/delete', $profile->User()->id], '<i class="fa fa-trash-o fa-lg"></i>'),
36 36
             'html' => true, 'property' => ['class' => 'text-center']]
37 37
     ];
Please login to merge, or discard this patch.
Apps/View/Admin/default/profile/field_list.php 1 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.