Passed
Push — master ( 1fadb0...f949a1 )
by Mihail
08:15
created
Extend/Core/Arch/FrontWidget.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * Check if widget is enabled
35 35
      * @param string|null $name
36
-     * @return bool
36
+     * @return null|boolean
37 37
      */
38 38
     public static function enabled($name = null)
39 39
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         }
52 52
 
53 53
         // if widget is disabled - lets return nothing
54
-        return !(bool)$wData->disabled;
54
+        return !(bool) $wData->disabled;
55 55
     }
56 56
 
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/Controller/Front/Content.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $path = $this->request->getPathWithoutControllerAction();
57 57
         $configs = $this->getConfigs();
58
-        $page = (int)$this->request->query->get('page', 0);
59
-        $sort = (string)$this->request->query->get('sort', 'newest');
60
-        $itemCount = (int)$configs['itemPerCategory'];
58
+        $page = (int) $this->request->query->get('page', 0);
59
+        $sort = (string) $this->request->query->get('sort', 'newest');
60
+        $itemCount = (int) $configs['itemPerCategory'];
61 61
 
62 62
         // build special model with content list and category list information
63 63
         $model = new EntityCategoryList($path, $configs, $page, $sort);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $model = new EntityContentRead($categoryRecord, $contentRecord->first());
138 138
         $search = null;
139 139
         // check if similar search is enabled for item category
140
-        if ((int)$model->getCategory()->getProperty('showSimilar') === 1 && $trash === false) {
140
+        if ((int) $model->getCategory()->getProperty('showSimilar') === 1 && $trash === false) {
141 141
             $search = new EntityContentSearch($model->title, $model->id);
142 142
         }
143 143
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         }
175 175
 
176 176
         // get equal rows order by creation date
177
-        $records = ContentEntity::where('meta_keywords', 'like', '%' . $tagName . '%')->orderBy('created_at', 'DESC')->take(self::TAG_PER_PAGE);
177
+        $records = ContentEntity::where('meta_keywords', 'like', '%'.$tagName.'%')->orderBy('created_at', 'DESC')->take(self::TAG_PER_PAGE);
178 178
         // check if result is not empty
179 179
         if ($records->count() < 1) {
180 180
             throw new NotFoundException(__('Nothing founded'));
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $this->layout = null;
209 209
 
210 210
         // check if rss display allowed for this category
211
-        if ((int)$model->category['configs']['showRss'] !== 1) {
211
+        if ((int) $model->category['configs']['showRss'] !== 1) {
212 212
             throw new ForbiddenException(__('Rss feed is disabled for this category'));
213 213
         }
214 214
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         // set channel data
220 220
         $channel->title($model->category['title'])
221 221
             ->description($model->category['description'])
222
-            ->url(App::$Alias->baseUrl . '/content/list/' . $model->category['path'])
222
+            ->url(App::$Alias->baseUrl.'/content/list/'.$model->category['path'])
223 223
             ->appendTo($feed);
224 224
 
225 225
         // add content data
@@ -229,10 +229,10 @@  discard block
 block discarded – undo
229 229
                 // add title, short text, url
230 230
                 $item->title($row['title'])
231 231
                     ->description($row['text'])
232
-                    ->url(App::$Alias->baseUrl . $row['uri']);
232
+                    ->url(App::$Alias->baseUrl.$row['uri']);
233 233
                 // add poster
234 234
                 if ($row['thumb'] !== null) {
235
-                    $item->enclosure(App::$Alias->scriptUrl . $row['thumb'], $row['thumbSize'], 'image/jpeg');
235
+                    $item->enclosure(App::$Alias->scriptUrl.$row['thumb'], $row['thumbSize'], 'image/jpeg');
236 236
                 }
237 237
 
238 238
                 // append response to channel
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
 
268 268
         // check if user add enabled
269 269
         $configs = $this->getConfigs();
270
-        if (!(bool)$configs['userAdd']) {
270
+        if (!(bool) $configs['userAdd']) {
271 271
             throw new NotFoundException(__('User add is disabled'));
272 272
         }
273 273
 
274 274
         // prepare query
275
-        $page = (int)$this->request->query->get('page', 0);
275
+        $page = (int) $this->request->query->get('page', 0);
276 276
         $offset = $page * 10;
277 277
         $query = ContentRecord::where('author_id', '=', App::$User->identity()->getId());
278 278
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
         // check if user add enabled
314 314
         $configs = $this->getConfigs();
315
-        if (!(bool)$configs['userAdd']) {
315
+        if (!(bool) $configs['userAdd']) {
316 316
             throw new NotFoundException(__('User add is disabled'));
317 317
         }
318 318
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $new = $record->id === null;
322 322
 
323 323
         // reject edit published items and items from other authors
324
-        if (($new === false && (int)$record->author_id !== App::$User->identity()->getId()) || (int)$record->display === 1) {
324
+        if (($new === false && (int) $record->author_id !== App::$User->identity()->getId()) || (int) $record->display === 1) {
325 325
             throw new ForbiddenException(__('You have no permissions to edit this content'));
326 326
         }
327 327
 
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
             $category = $content->getCategory();
371 371
             $uri = '/content/read/';
372 372
             if (!Str::likeEmpty($category->path)) {
373
-                $uri .= $category->path . '/';
373
+                $uri .= $category->path.'/';
374 374
             }
375 375
             $uri .= $content->path;
376 376
             $sitemap->add($uri, $content->created_at, 'weekly', 0.7);
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
         // add categories
379 379
         $categories = ContentCategory::getAll();
380 380
         foreach ($categories as $item) {
381
-            if ((bool)$item->getProperty('showCategory')) {
382
-                $uri = '/content/list/' . $item->path;
381
+            if ((bool) $item->getProperty('showCategory')) {
382
+                $uri = '/content/list/'.$item->path;
383 383
                 $sitemap->add($uri, date('c'), 'daily', 0.9);
384 384
             }
385 385
         }
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
 
3 3
 namespace Apps\Controller\Front;
4 4
 
5
-use Apps\ActiveRecord\Content as ContentEntity;
6 5
 use Apps\ActiveRecord\Content as ContentRecord;
7 6
 use Apps\ActiveRecord\ContentCategory;
8 7
 use Apps\Model\Front\Content\EntityCategoryList;
Please login to merge, or discard this patch.
Apps/View/Admin/default/content/content_update.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 foreach (\App::$Properties->get('languages') as $lang) {
43 43
     $generalItems[] = [
44 44
         'type' => 'tab',
45
-        'text' => __('Lang') . ': ' . Str::upperCase($lang),
46
-        'content' => $form->field('title.' . $lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale'), 'content/form/tab_content_update') .
47
-            $form->field('text.' . $lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true], null, 'content/form/tab_content_update'),
45
+        'text' => __('Lang').': '.Str::upperCase($lang),
46
+        'content' => $form->field('title.'.$lang, 'text', ['class' => 'form-control'], __('Please, enter the title of your material for current language locale'), 'content/form/tab_content_update').
47
+            $form->field('text.'.$lang, 'textarea', ['class' => 'form-control wysiwyg', 'rows' => 7, 'html' => true], null, 'content/form/tab_content_update'),
48 48
         'html' => true,
49 49
         'active' => $lang === \App::$Request->getLanguage(),
50 50
         '!secure' => true
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 
53 53
     $propertiesItems[] = [
54 54
         'type' => 'tab',
55
-        'text' => __('Lang') . ': ' . Str::upperCase($lang),
56
-        'content' => $form->field('metaTitle.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param title for page title. Recoomended: 50-70 characters')) .
57
-            $form->field('metaKeywords.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param keywords for this content, separated by comma. Example: home, door, dog')) .
58
-            $form->field('metaDescription.' . $lang, 'text', ['class' => 'form-control'], __('Enter meta param description for this content. Recommended is 100-150 characters')),
55
+        'text' => __('Lang').': '.Str::upperCase($lang),
56
+        'content' => $form->field('metaTitle.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param title for page title. Recoomended: 50-70 characters')).
57
+            $form->field('metaKeywords.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param keywords for this content, separated by comma. Example: home, door, dog')).
58
+            $form->field('metaDescription.'.$lang, 'text', ['class' => 'form-control'], __('Enter meta param description for this content. Recommended is 100-150 characters')),
59 59
         'html' => true,
60 60
         '!secure' => true,
61 61
         'active' => $lang === \App::$Request->getLanguage()
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     <div class="dropzone dropzone-previews" id="ffcms-dropzone"></div>
91 91
 </div>
92 92
 <div class="col-md-4">
93
-    ' . $form->field('poster', 'select', ['options' => [__('Not selected...')], 'class' => 'form-control'], __('Select image from gallery as a poster for this content')) . '
93
+    ' . $form->field('poster', 'select', ['options' => [__('Not selected...')], 'class' => 'form-control'], __('Select image from gallery as a poster for this content')).'
94 94
 </div>
95 95
 </div><br/><br/>';
96 96
 ?>
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         ['type' => 'tab', 'text' => __('Gallery'), 'content' => $galleryTab, 'html' => true, '!secure' => true],
104 104
         ['type' => 'tab', 'text' => __('Other'), 'content' => $otherTab, 'html' => true, '!secure' => true]
105 105
     ]
106
-]);?>
106
+]); ?>
107 107
 
108 108
 <?= $form->field('galleryFreeId', 'hidden') ?>
109 109
 <?= $form->submitButton(__('Save'), ['class' => 'btn btn-primary']) ?>&nbsp;
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 
113 113
 <?php
114 114
 // load max length display plugin
115
-\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl . '/assets/js/plugins/maxlength.js');
115
+\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl.'/assets/js/plugins/maxlength.js');
116 116
 // load datapicker plugin
117
-\App::$Alias->setCustomLibrary('css', \App::$Alias->currentViewUrl . '/assets/css/plugins/datapick/datapick.css');
118
-\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl . '/assets/js/plugins/datapick.js');
117
+\App::$Alias->setCustomLibrary('css', \App::$Alias->currentViewUrl.'/assets/css/plugins/datapick/datapick.css');
118
+\App::$Alias->setCustomLibrary('js', \App::$Alias->currentViewUrl.'/assets/js/plugins/datapick.js');
119 119
 // load jquery-upload plugin
120
-\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/dropzone.min.css');
121
-\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/basic.min.css');
122
-\App::$Alias->setCustomLibrary('js', \App::$Alias->scriptUrl . '/vendor/bower/dropzone/dist/min/dropzone.min.js');
120
+\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/dropzone.min.css');
121
+\App::$Alias->setCustomLibrary('css', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/basic.min.css');
122
+\App::$Alias->setCustomLibrary('js', \App::$Alias->scriptUrl.'/vendor/bower/dropzone/dist/min/dropzone.min.js');
123 123
 ?>
124 124
 
125 125
 <script>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             var DropzoneFiles = [];
217 217
             $('#ffcms-dropzone').dropzone({
218 218
                 url: script_url+'/api/content/galleryupload/<?= $model->galleryFreeId ?>?lang='+script_lang,
219
-                dictDefaultMessage: '<?= __('Drop files here to upload in gallery') . '<br />' . __('(or click here)') ?>',
219
+                dictDefaultMessage: '<?= __('Drop files here to upload in gallery').'<br />'.__('(or click here)') ?>',
220 220
                 acceptedFiles: ".jpeg,.jpg,.png,.gif,.webp",
221 221
                 addRemoveLinks: true,
222 222
                 removedfile: function (file) { // file remove click, lets try to remove file from server & make visual changes
Please login to merge, or discard this patch.
Apps/Controller/Console/Main.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -28,20 +28,20 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function actionHelp()
30 30
     {
31
-        $text = "You are using FFCMS console application." . PHP_EOL;
32
-        $text .= "This application support next basic commands:" . PHP_EOL;
33
-        $text .= "\t main/info - show info about CMS" . PHP_EOL;
34
-        $text .= "\t main/install - install FFCMS from console line." . PHP_EOL;
35
-        $text .= "\t main/update - update package to current minor version if available." . PHP_EOL;
36
-        $text .= "\t main/chmod - update chmod for ffcms special folders. Can be used after project deployment." . PHP_EOL;
37
-        $text .= "\t main/buildperms - build and update permissions map for applications." . PHP_EOL;
38
-        $text .= "\t create/model workground/modelName - create model carcase default." . PHP_EOL;
39
-        $text .= "\t create/ar activeRecordName - create active record table and model." . PHP_EOL;
40
-        $text .= "\t create/controller workground/controllerName - create default controller carcase." . PHP_EOL;
41
-        $text .= "\t create/widget workground/widgetName/widgetName - create default widget carcase." . PHP_EOL;
42
-        $text .= "\t db/import activeRecordName - import to database single schema from ar model." . PHP_EOL;
43
-        $text .= "\t db/importAll - import all active record tables to database." . PHP_EOL;
44
-        $text .= "\t db/adduser - add new user into database." . PHP_EOL;
31
+        $text = "You are using FFCMS console application.".PHP_EOL;
32
+        $text .= "This application support next basic commands:".PHP_EOL;
33
+        $text .= "\t main/info - show info about CMS".PHP_EOL;
34
+        $text .= "\t main/install - install FFCMS from console line.".PHP_EOL;
35
+        $text .= "\t main/update - update package to current minor version if available.".PHP_EOL;
36
+        $text .= "\t main/chmod - update chmod for ffcms special folders. Can be used after project deployment.".PHP_EOL;
37
+        $text .= "\t main/buildperms - build and update permissions map for applications.".PHP_EOL;
38
+        $text .= "\t create/model workground/modelName - create model carcase default.".PHP_EOL;
39
+        $text .= "\t create/ar activeRecordName - create active record table and model.".PHP_EOL;
40
+        $text .= "\t create/controller workground/controllerName - create default controller carcase.".PHP_EOL;
41
+        $text .= "\t create/widget workground/widgetName/widgetName - create default widget carcase.".PHP_EOL;
42
+        $text .= "\t db/import activeRecordName - import to database single schema from ar model.".PHP_EOL;
43
+        $text .= "\t db/importAll - import all active record tables to database.".PHP_EOL;
44
+        $text .= "\t db/adduser - add new user into database.".PHP_EOL;
45 45
         return $text;
46 46
     }
47 47
 
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function actionInfo()
53 53
     {
54
-        $text = "Information about FFCMS package and environment:" . PHP_EOL;
55
-        $text .= "\t PHP version: " . phpversion() . PHP_EOL;
56
-        $text .= "\t Dist path: " . root . PHP_EOL;
57
-        $text .= "\t Used version: " . Console::$Properties->version['num'] . ' [build: ' . Console::$Properties->version['date'] . ']' . PHP_EOL;
58
-        $text .= "Information about FFCMS cmf packages:" . PHP_EOL;
54
+        $text = "Information about FFCMS package and environment:".PHP_EOL;
55
+        $text .= "\t PHP version: ".phpversion().PHP_EOL;
56
+        $text .= "\t Dist path: ".root.PHP_EOL;
57
+        $text .= "\t Used version: ".Console::$Properties->version['num'].' [build: '.Console::$Properties->version['date'].']'.PHP_EOL;
58
+        $text .= "Information about FFCMS cmf packages:".PHP_EOL;
59 59
 
60 60
         $composerInfo = File::read('/composer.lock');
61 61
         if (false !== $composerInfo) {
62 62
             $jsonInfo = json_decode($composerInfo);
63 63
             foreach ($jsonInfo->packages as $item) {
64
-                $text .= "\t Package: " . $item->name . ' => ' . $item->version . PHP_EOL;
64
+                $text .= "\t Package: ".$item->name.' => '.$item->version.PHP_EOL;
65 65
             }
66 66
         } else {
67 67
             $text .= "\t Composer is never be used - no information available.";
@@ -97,16 +97,16 @@  discard block
 block discarded – undo
97 97
             preg_match_all('/public function action(\w*?)\(/', $byte, $matches); // matches[0] contains all methods ;)
98 98
             if (Obj::isArray($matches[1]) && count($matches[1]) > 0) {
99 99
                 foreach ($matches[1] as $perm) {
100
-                    $permissions[] = 'Admin/' . $className . '/' . $perm;
100
+                    $permissions[] = 'Admin/'.$className.'/'.$perm;
101 101
                 }
102 102
             }
103 103
         }
104 104
 
105 105
         // prepare save string
106
-        $stringSave = "<?php \n\nreturn " . var_export($permissions, true) . ';';
106
+        $stringSave = "<?php \n\nreturn ".var_export($permissions, true).';';
107 107
         File::write('/Private/Config/Permissions.php', $stringSave);
108 108
 
109
-        return 'Permissions configuration is successful updated! Founded permissions: ' . count($permissions);
109
+        return 'Permissions configuration is successful updated! Founded permissions: '.count($permissions);
110 110
     }
111 111
 
112 112
     /**
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
             if (Directory::exist($obj)) {
121 121
                 Directory::recursiveChmod($obj, 0777);
122 122
             } elseif (File::exist($obj)) {
123
-                chmod(root . $obj, 0777);
123
+                chmod(root.$obj, 0777);
124 124
             } else {
125
-                $errors .= Console::$Output->write('Filesystem object is not founded: ' . $obj);
125
+                $errors .= Console::$Output->write('Filesystem object is not founded: '.$obj);
126 126
             }
127 127
         }
128 128
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         }
142 142
 
143 143
         echo Console::$Output->writeHeader('License start');
144
-        echo File::read('/LICENSE') . PHP_EOL;
144
+        echo File::read('/LICENSE').PHP_EOL;
145 145
         echo Console::$Output->writeHeader('License end');
146 146
 
147 147
         $config = Console::$Properties->get('database');
@@ -160,38 +160,38 @@  discard block
 block discarded – undo
160 160
 
161 161
         // database config from input
162 162
         echo Console::$Output->writeHeader('Database connection configuration');
163
-        echo 'Driver(default:' . $config['driver'] . '):';
163
+        echo 'Driver(default:'.$config['driver'].'):';
164 164
         $dbDriver = Console::$Input->read();
165 165
         if (Arr::in($dbDriver, ['mysql', 'pgsql', 'sqlite'])) {
166 166
             $newConfig['driver'] = $dbDriver;
167 167
         }
168 168
 
169 169
         // for sqlite its would be a path
170
-        echo 'Host(default:' . $config['host'] . '):';
170
+        echo 'Host(default:'.$config['host'].'):';
171 171
         $dbHost = Console::$Input->read();
172 172
         if (!Str::likeEmpty($dbHost)) {
173 173
             $newConfig['host'] = $dbHost;
174 174
         }
175 175
 
176
-        echo 'Database name(default:' . $config['database'] . '):';
176
+        echo 'Database name(default:'.$config['database'].'):';
177 177
         $dbName = Console::$Input->read();
178 178
         if (!Str::likeEmpty($dbName)) {
179 179
             $newConfig['database'] = $dbName;
180 180
         }
181 181
 
182
-        echo 'User(default:' . $config['username'] . '):';
182
+        echo 'User(default:'.$config['username'].'):';
183 183
         $dbUser = Console::$Input->read();
184 184
         if (!Str::likeEmpty($dbUser)) {
185 185
             $newConfig['username'] = $dbUser;
186 186
         }
187 187
 
188
-        echo 'Password(default:' . $config['password'] . '):';
188
+        echo 'Password(default:'.$config['password'].'):';
189 189
         $dbPwd = Console::$Input->read();
190 190
         if (!Str::likeEmpty($dbPwd)) {
191 191
             $newConfig['password'] = $dbPwd;
192 192
         }
193 193
 
194
-        echo 'Table prefix(default:' . $config['prefix'] . '):';
194
+        echo 'Table prefix(default:'.$config['prefix'].'):';
195 195
         $dbPrefix = Console::$Input->read();
196 196
         if (!Str::likeEmpty($dbPrefix)) {
197 197
             $newConfig['prefix'] = $dbPrefix;
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
         try {
205 205
             Console::$Database->connection('install')->getDatabaseName();
206 206
         } catch (\Exception $e) {
207
-            return 'Testing database connection is failed! Run installer again and pass tested connection data! Log: ' . $e->getMessage();
207
+            return 'Testing database connection is failed! Run installer again and pass tested connection data! Log: '.$e->getMessage();
208 208
         }
209 209
 
210 210
         // autoload isn't work here
211
-        include(root . '/Apps/Controller/Console/Db.php');
211
+        include(root.'/Apps/Controller/Console/Db.php');
212 212
 
213 213
         // import db data
214 214
         $dbController = new DbController();
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         // set website send from email from input
218 218
         $emailConfig = Console::$Properties->get('adminEmail');
219
-        echo 'Website sendFrom email(default: ' . $emailConfig . '):';
219
+        echo 'Website sendFrom email(default: '.$emailConfig.'):';
220 220
         $email = Console::$Input->read();
221 221
         if (!Str::isEmail($email)) {
222 222
             $email = $emailConfig;
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
         $allCfg['adminEmail'] = $email;
238 238
         $allCfg['baseDomain'] = $baseDomain;
239 239
         echo Console::$Output->write('Generate password salt for BLOWFISH crypt');
240
-        $allCfg['passwordSalt'] = '$2a$07$' . Str::randomLatinNumeric(mt_rand(21, 30)) . '$';
240
+        $allCfg['passwordSalt'] = '$2a$07$'.Str::randomLatinNumeric(mt_rand(21, 30)).'$';
241 241
         echo Console::$Output->write('Generate security cookies for debug panel');
242
-        $allCfg['debug']['cookie']['key'] = 'fdebug_' . Str::randomLatinNumeric(mt_rand(8, 32));
242
+        $allCfg['debug']['cookie']['key'] = 'fdebug_'.Str::randomLatinNumeric(mt_rand(8, 32));
243 243
         $allCfg['debug']['cookie']['value'] = Str::randomLatinNumeric(mt_rand(32, 128));
244 244
 
245 245
         // write config data
Please login to merge, or discard this patch.
Apps/ActiveRecord/App.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     /**
50 50
      * @deprecated
51
-     * @return \Illuminate\Database\Eloquent\Collection|mixed
51
+     * @return \Illuminate\Database\Eloquent\Collection
52 52
      * @throws SyntaxException
53 53
      */
54 54
     public static function getAll()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * Get single row by defined type and sys_name with query caching
79 79
      * @param string $type
80 80
      * @param string|array $sys_name
81
-     * @return mixed|null
81
+     * @return App
82 82
      * @throws SyntaxException
83 83
      */
84 84
     public static function getItem($type, $sys_name)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function all($columns = ['*'])
39 39
     {
40
-        $cacheName = 'activercord.app.all.' . implode('.', $columns);
40
+        $cacheName = 'activercord.app.all.'.implode('.', $columns);
41 41
         $records = MemoryObject::instance()->get($cacheName);
42 42
         if ($records === null) {
43 43
             $records = parent::all($columns);
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getScriptVersion()
177 177
     {
178
-        $class = 'Apps\Controller\Admin\\' . $this->sys_name;
178
+        $class = 'Apps\Controller\Admin\\'.$this->sys_name;
179 179
         if (!class_exists($class)) {
180 180
             return false;
181 181
         }
182 182
 
183
-        if (!defined($class . '::VERSION')) {
183
+        if (!defined($class.'::VERSION')) {
184 184
             return false;
185 185
         }
186 186
 
187
-        return constant($class . '::VERSION');
187
+        return constant($class.'::VERSION');
188 188
     }
189 189
 
190 190
 }
191 191
\ No newline at end of file
Please login to merge, or discard this patch.
Apps/ActiveRecord/Role.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public static function all($columns = ['*'])
28 28
     {
29
-        $cacheName = 'activerecords.role.all.' . implode('.', $columns);
29
+        $cacheName = 'activerecords.role.all.'.implode('.', $columns);
30 30
         $records = MemoryObject::instance()->get($cacheName);
31 31
         if ($records === null) {
32 32
             $records = parent::all($columns);
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public static function get($role_id)
45 45
     {
46
-        $role = MainApp::$Memory->get('user.role.cache.' . $role_id);
46
+        $role = MainApp::$Memory->get('user.role.cache.'.$role_id);
47 47
 
48 48
         // not founded in cache
49 49
         if ($role === null) {
50 50
             $role = self::find($role_id);
51
-            MainApp::$Memory->set('user.role.cache.' . $role_id, $role);
51
+            MainApp::$Memory->set('user.role.cache.'.$role_id, $role);
52 52
         }
53 53
         return $role;
54 54
     }
Please login to merge, or discard this patch.
Apps/ActiveRecord/ProfileField.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
     public static function all($columns = ['*'])
30 30
     {
31
-        $cacheName = 'activerecord.profilefield.all.' . implode('.', $columns);
31
+        $cacheName = 'activerecord.profilefield.all.'.implode('.', $columns);
32 32
         $records = MemoryObject::instance()->get($cacheName);
33 33
         if ($records === null) {
34 34
             $records = parent::all($columns);
Please login to merge, or discard this patch.
Apps/Model/Admin/Comments/FormCommentUpdate.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     /**
21 21
      * FormCommentUpdate constructor. Pass record inside the model.
22
-     * @param \Apps\ActiveRecord\CommentPost|\Apps\ActiveRecord\CommentAnswer $record
22
+     * @param \Ffcms\Core\Arch\ActiveModel $record
23 23
      */
24 24
     public function __construct($record, $type = 'comment')
25 25
     {
Please login to merge, or discard this patch.
Apps/Controller/Admin/Content.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function actionIndex()
44 44
     {
45 45
         // set current page and offset
46
-        $page = (int)$this->request->query->get('page');
46
+        $page = (int) $this->request->query->get('page');
47 47
         $offset = $page * self::ITEM_PER_PAGE;
48 48
 
49 49
         $query = null;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         } elseif ($type === 'moderate') { // only items on moderate
55 55
             $query = ContentEntity::where('display', '=', 0);
56 56
         } elseif (Obj::isLikeInt($type)) { // sounds like category id ;)
57
-            $query = ContentEntity::where('category_id', '=', (int)$type);
57
+            $query = ContentEntity::where('category_id', '=', (int) $type);
58 58
         } else {
59 59
             $query = new ContentEntity();
60 60
             $type = 'all';
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     public function actionCategoryupdate($id = null)
269 269
     {
270 270
         // get owner id for new rows
271
-        $parentId = (int)$this->request->query->get('parent');
271
+        $parentId = (int) $this->request->query->get('parent');
272 272
 
273 273
         // get relation and pass to model
274 274
         $record = ContentCategory::findOrNew($id);
Please login to merge, or discard this patch.