@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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; |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 | /** |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -14,7 +14,7 @@ discard block |
||
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 |
||
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 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | } |
32 | 32 | |
33 | 33 | // add localizations |
34 | - App::$Translate->append(App::$Alias->currentViewPath . '/I18n/' . App::$Request->getLanguage() . '.php'); |
|
34 | + App::$Translate->append(App::$Alias->currentViewPath.'/I18n/'.App::$Request->getLanguage().'.php'); |
|
35 | 35 | |
36 | 36 | parent::__construct(); |
37 | 37 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // check if disabled (0 = enabled, anything else = on) |
57 | - return (int)$this->application->disabled === 0; |
|
57 | + return (int) $this->application->disabled === 0; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | if ($this->configs !== null) { |
67 | 67 | return $this->configs; |
68 | 68 | } |
69 | - $configs = (array)unserialize($this->application->configs); // data always stored like a "string" objects |
|
69 | + $configs = (array) unserialize($this->application->configs); // data always stored like a "string" objects |
|
70 | 70 | foreach ($configs as $cfg => $value) { |
71 | 71 | if (Obj::isLikeInt($value)) { |
72 | - $configs[$cfg] = (int)$value; // convert string 1 "1" to int 1 1 |
|
72 | + $configs[$cfg] = (int) $value; // convert string 1 "1" to int 1 1 |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | $this->configs = $configs; |