Passed
Push — master ( 02a4a5...734a7e )
by Mihail
05:36
created
Apps/Controller/Admin/Feedback.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function actionIndex()
34 34
     {
35 35
         // set current page and offset
36
-        $page = (int)$this->request->query->get('page');
36
+        $page = (int) $this->request->query->get('page');
37 37
         $offset = $page * self::ITEM_PER_PAGE;
38 38
 
39 39
         // get feedback posts AR table
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         // initialize model with answer add if thread is not closed
77 77
         $model = null;
78
-        if ((int)$record->closed !== 1) {
78
+        if ((int) $record->closed !== 1) {
79 79
             $model = new FormAnswerAdd($record, App::$User->identity()->getId());
80 80
             if ($model->send()) {
81 81
                 if ($model->validate()) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             case 'answer':
116 116
                 $record = FeedbackAnswer::find($id);
117 117
                 if ($record !== null && $record !== false) {
118
-                    $postId = (int)$record->getFeedbackPost()->id;
118
+                    $postId = (int) $record->getFeedbackPost()->id;
119 119
                 }
120 120
                 break;
121 121
         }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             if ($model->validate()) {
132 132
                 $model->make();
133 133
                 App::$Session->getFlashBag()->add('success', __('Feedback item are successful changed'));
134
-                $this->response->redirect('feedback/read/' . $postId);
134
+                $this->response->redirect('feedback/read/'.$postId);
135 135
             } else {
136 136
                 App::$Session->getFlashBag()->add('danger', __('Updating is failed'));
137 137
             }
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         App::$Session->getFlashBag()->add('success', __('Feedback request is changed!'));
182 182
 
183 183
         // redirect to feedback post read
184
-        $this->response->redirect('feedback/read/' . $id);
184
+        $this->response->redirect('feedback/read/'.$id);
185 185
         return null;
186 186
     }
187 187
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 // its a answer, lets remove it and redirect back in post
227 227
                 $postId = $record->feedback_id;
228 228
                 $record->delete();
229
-                $this->response->redirect('feedback/read/' . $postId);
229
+                $this->response->redirect('feedback/read/'.$postId);
230 230
             }
231 231
         }
232 232
 
Please login to merge, or discard this patch.
Apps/Controller/Admin/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $query = new UserRecords();
41 41
 
42 42
         // set current page and offset
43
-        $page = (int)$this->request->query->get('page', 0);
43
+        $page = (int) $this->request->query->get('page', 0);
44 44
         $offset = $page * self::ITEM_PER_PAGE;
45 45
 
46 46
         // build pagination
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     public function actionDelete($id = null)
105 105
     {
106 106
         // check if id is passed or get data from GET as array ids
107
-        if ($id === 0 || (int)$id < 1) {
107
+        if ($id === 0 || (int) $id < 1) {
108 108
             $ids = $this->request->query->get('selected');
109 109
             if (Obj::isArray($ids) && Arr::onlyNumericValues($ids)) {
110 110
                 $id = $ids;
Please login to merge, or discard this patch.
Apps/Controller/Admin/Profile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $query = new ProfileRecords();
34 34
 
35 35
         // set current page and offset
36
-        $page = (int)$this->request->query->get('page');
36
+        $page = (int) $this->request->query->get('page');
37 37
         $offset = $page * self::ITEM_PER_PAGE;
38 38
 
39 39
         // build pagination
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function actionDelete($id)
62 62
     {
63
-        $this->response->redirect('user/delete/' . $id);
63
+        $this->response->redirect('user/delete/'.$id);
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.
Apps/Controller/Admin/Main.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
         // cache some data
38 38
         $rootSize = App::$Cache->get('root.size');
39 39
         if ($rootSize === null) {
40
-            $rootSize = round(Directory::getSize('/') / (1024*1000), 2) . ' mb';
40
+            $rootSize = round(Directory::getSize('/') / (1024 * 1000), 2).' mb';
41 41
             App::$Cache->set('root.size', $rootSize, 86400); // 24 hours caching = 60 * 60 * 24
42 42
         }
43 43
         $loadAvg = App::$Cache->get('load.average');
44 44
         if ($loadAvg === null) {
45 45
             $loadAvg = Environment::loadAverage();
46
-            App::$Cache->set('load.average', $loadAvg, 60*5); // 5 min cache
46
+            App::$Cache->set('load.average', $loadAvg, 60 * 5); // 5 min cache
47 47
         }
48 48
 
49 49
         // prepare system statistic
50 50
         $stats = [
51
-            'ff_version' => App::$Properties->version['num'] . ' (' . App::$Properties->version['date'] . ')',
52
-            'php_version' => Environment::phpVersion() . ' (' . Environment::phpSAPI() . ')',
51
+            'ff_version' => App::$Properties->version['num'].' ('.App::$Properties->version['date'].')',
52
+            'php_version' => Environment::phpVersion().' ('.Environment::phpSAPI().')',
53 53
             'os_name' => Environment::osName(),
54
-            'database_name' => App::$Database->connection()->getDatabaseName() . ' (' . App::$Database->connection()->getDriverName() . ')',
54
+            'database_name' => App::$Database->connection()->getDatabaseName().' ('.App::$Database->connection()->getDriverName().')',
55 55
             'file_size' => $rootSize,
56 56
             'load_avg' => $loadAvg
57 57
         ];
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     public function actionFiles()
104 104
     {
105 105
         return $this->view->render('files', [
106
-            'connector' => App::$Alias->scriptUrl . '/api/main/files?lang=' . $this->request->getLanguage()
106
+            'connector' => App::$Alias->scriptUrl.'/api/main/files?lang='.$this->request->getLanguage()
107 107
         ]);
108 108
     }
109 109
 
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function actionDeleteroute()
176 176
     {
177
-        $type = (string)$this->request->query->get('type');
178
-        $loader = (string)$this->request->query->get('loader');
179
-        $source = Str::lowerCase((string)$this->request->query->get('path'));
177
+        $type = (string) $this->request->query->get('type');
178
+        $loader = (string) $this->request->query->get('loader');
179
+        $source = Str::lowerCase((string) $this->request->query->get('path'));
180 180
 
181 181
         $model = new EntityDeleteRoute($type, $loader, $source);
182 182
         if ($model->send() && $model->validate()) {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     {
200 200
         $stats = App::$Cache->stats();
201 201
         // get size in mb from cache stats
202
-        $size = round((int)$stats['size'] / (1024*1024), 2);
202
+        $size = round((int) $stats['size'] / (1024 * 1024), 2);
203 203
 
204 204
         // check if submited
205 205
         if ($this->request->request->get('clearcache', false)) {
Please login to merge, or discard this patch.
Apps/Controller/Admin/Comments.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function actionIndex()
41 41
     {
42 42
         // set current page and offset
43
-        $page = (int)$this->request->query->get('page');
43
+        $page = (int) $this->request->query->get('page');
44 44
         $offset = $page * self::ITEM_PER_PAGE;
45 45
 
46 46
         // initialize active record model
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function actionDelete($type, $id = 0)
141 141
     {
142 142
         // sounds like a multiply delete definition
143
-        if ($id === 0 || (int)$id < 1) {
143
+        if ($id === 0 || (int) $id < 1) {
144 144
             $ids = $this->request->query->get('selected');
145 145
             if (Obj::isArray($ids) && Arr::onlyNumericValues($ids)) {
146 146
                 $id = $ids;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         if ($model->send() && $model->validate()) {
175 175
             $model->make();
176 176
             App::$Session->getFlashBag()->add('success', __('Comments or answers are successful deleted!'));
177
-            $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index'));
177
+            $this->response->redirect('comments/'.($type === 'answer' ? 'answerlist' : 'index'));
178 178
         }
179 179
 
180 180
         // render view
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     public function actionPublish($type, $id = 0)
196 196
     {
197 197
         // check if it multiple accept ids
198
-        if ($id === 0 || (int)$id < 1) {
198
+        if ($id === 0 || (int) $id < 1) {
199 199
             $ids = $this->request->query->get('selected');
200 200
             if (Obj::isArray($ids) && Arr::onlyNumericValues($ids)) {
201 201
                 $id = $ids;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         if ($model->send()) {
230 230
             $model->make();
231 231
             App::$Session->getFlashBag()->add('success', __('Comments or answers are successful published'));
232
-            $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index'));
232
+            $this->response->redirect('comments/'.($type === 'answer' ? 'answerlist' : 'index'));
233 233
         }
234 234
 
235 235
         return $this->view->render('publish', [
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     public function actionAnswerlist()
247 247
     {
248 248
         // set current page and offset
249
-        $page = (int)$this->request->query->get('page');
249
+        $page = (int) $this->request->query->get('page');
250 250
         $offset = $page * self::ITEM_PER_PAGE;
251 251
 
252 252
         // initialize ar answers model
Please login to merge, or discard this patch.
Loader/Cron/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 /** set default locale */
15 15
 $_GET['lang'] = 'en';
16 16
 
17
-require_once(root . '/Loader/Autoload.php');
17
+require_once(root.'/Loader/Autoload.php');
18 18
 
19 19
 // make fast-access alias \App::$Object
20 20
 // class_alias('Ffcms\Core\App', 'App');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     $logs = $cronManager->run();
43 43
     if (PHP_SAPI === 'cli') {
44 44
         if ($logs !== null && \Ffcms\Core\Helper\Type\Obj::isArray($logs) && count($logs) > 0) {
45
-            echo 'Run cron tasks: ' . PHP_EOL . implode(PHP_EOL, $logs);
45
+            echo 'Run cron tasks: '.PHP_EOL.implode(PHP_EOL, $logs);
46 46
         } else {
47 47
             echo 'No tasks runned';
48 48
         }
Please login to merge, or discard this patch.