@@ -26,7 +26,7 @@ |
||
26 | 26 | $route = $widget->sys_name . '/index'; |
27 | 27 | $icoStatus = null; |
28 | 28 | $actions = $this->render('macro/widget_actions', ['controller' => $widget->sys_name]); |
29 | - if ((int)$widget->disabled !== 0) { |
|
29 | + if ((int) $widget->disabled !== 0) { |
|
30 | 30 | $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>'; |
31 | 31 | } elseif ($widget->checkVersion() !== true) { |
32 | 32 | $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>'; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * Get single row by defined type and sys_name with query caching |
60 | 60 | * @param string $type |
61 | 61 | * @param string $sys_name |
62 | - * @return mixed|null |
|
62 | + * @return App |
|
63 | 63 | * @throws SyntaxException |
64 | 64 | */ |
65 | 65 | public static function getItem($type, $sys_name) |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | $scriptVersion = $this->getScriptVersion(); |
126 | 126 | |
127 | - return $scriptVersion === (float)$this->version; |
|
127 | + return $scriptVersion === (float) $this->version; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | return false; |
143 | 143 | } |
144 | 144 | |
145 | - return (float)constant($class . '::VERSION'); |
|
145 | + return (float) constant($class . '::VERSION'); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | } |
149 | 149 | \ No newline at end of file |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Apps\ActiveRecord\App as AppRecord; |
6 | 6 | use Ffcms\Core\Arch\Model; |
7 | 7 | use Ffcms\Core\Exception\ForbiddenException; |
8 | -use Ffcms\Core\Exception\NativeException; |
|
9 | 8 | use Ffcms\Core\Exception\NotFoundException; |
10 | 9 | use Ffcms\Core\Helper\Date; |
11 | 10 |
@@ -28,8 +28,8 @@ |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | - * Magic method before |
|
32 | - */ |
|
31 | + * Magic method before |
|
32 | + */ |
|
33 | 33 | public function before() |
34 | 34 | { |
35 | 35 | // get full name of update object |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $status = $object->disabled; |
14 | 14 | |
15 | - $object->disabled = (int)!$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
15 | + $object->disabled = (int) !$status; // magic inside: bool to int and reverse - 0 => 1, 1 => 0 |
|
16 | 16 | $object->save(); |
17 | 17 | } |
18 | 18 | } |
19 | 19 | \ No newline at end of file |
@@ -31,7 +31,7 @@ |
||
31 | 31 | [['text' => __('Name')], ['text' => $widget->getLocaleName()]], |
32 | 32 | [['text' => __('System name')], ['text' => $widget->sys_name]], |
33 | 33 | [['text' => __('Last update')], ['text' => Date::convertToDatetime($widget->updated_at, DATE::FORMAT_TO_SECONDS)]], |
34 | - [['text' => __('Status')], ['text' => ((int)$widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' => ((int)$widget->disabled === 0) ? 'alert-success' : 'alert-danger']] |
|
34 | + [['text' => __('Status')], ['text' => ((int) $widget->disabled === 0) ? 'On' : 'Off'], 'property' => ['class' => ((int) $widget->disabled === 0) ? 'alert-success' : 'alert-danger']] |
|
35 | 35 | ] |
36 | 36 | ] |
37 | 37 | ]); ?> |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $search = \Apps\ActiveRecord\App::getItem('app', $controller); |
72 | 72 | |
73 | 73 | // check what we got |
74 | - if ($search === null || (int)$search->id < 1) { |
|
74 | + if ($search === null || (int) $search->id < 1) { |
|
75 | 75 | throw new ForbiddenException('App is not founded'); |
76 | 76 | } |
77 | 77 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controllerName)->where('type', '=', 'app')->first(); |
98 | 98 | |
99 | - if ($search === null || (int)$search->id < 1) { |
|
99 | + if ($search === null || (int) $search->id < 1) { |
|
100 | 100 | throw new ForbiddenException('App is not founded'); |
101 | 101 | } |
102 | 102 |
@@ -9,4 +9,4 @@ |
||
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 |
@@ -3,9 +3,8 @@ |
||
3 | 3 | namespace Apps\Model\Front\Content; |
4 | 4 | |
5 | 5 | |
6 | -use Apps\ActiveRecord\Content; |
|
7 | -use Apps\ActiveRecord\ContentCategory; |
|
8 | 6 | use Apps\ActiveRecord\Content as ContentRecord; |
7 | +use Apps\ActiveRecord\ContentCategory; |
|
9 | 8 | use Apps\ActiveRecord\User; |
10 | 9 | use Ffcms\Core\App; |
11 | 10 | use Ffcms\Core\Arch\Model; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $this->_path = $path; |
55 | 55 | $this->_configs = $configs; |
56 | - $this->_page = (int)$offset; |
|
56 | + $this->_page = (int) $offset; |
|
57 | 57 | parent::__construct(); |
58 | 58 | } |
59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function before() |
66 | 66 | { |
67 | 67 | // find one or more categories where we must looking for content items |
68 | - if ((int)$this->_configs['multiCategories'] === 1) { |
|
68 | + if ((int) $this->_configs['multiCategories'] === 1) { |
|
69 | 69 | $this->findCategories(); |
70 | 70 | } else { |
71 | 71 | $this->findCategory(); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | } |
136 | 136 | |
137 | 137 | // calculate selection offset |
138 | - $itemPerPage = (int)$this->_configs['itemPerCategory']; |
|
138 | + $itemPerPage = (int) $this->_configs['itemPerCategory']; |
|
139 | 139 | if ($itemPerPage < 1) { |
140 | 140 | $itemPerPage = 1; |
141 | 141 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ]; |
169 | 169 | |
170 | 170 | // check if this category is hidden |
171 | - if ((int)$this->category['configs']['showCategory'] !== 1) { |
|
171 | + if ((int) $this->category['configs']['showCategory'] !== 1) { |
|
172 | 172 | throw new ForbiddenException(__('This category is not available to view')); |
173 | 173 | } |
174 | 174 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | // check if current user can rate item |
213 | 213 | $ignoredRate = App::$Session->get('content.rate.ignore'); |
214 | 214 | $canRate = true; |
215 | - if (Obj::isArray($ignoredRate) && Arr::in((string)$row->id, $ignoredRate)) { |
|
215 | + if (Obj::isArray($ignoredRate) && Arr::in((string) $row->id, $ignoredRate)) { |
|
216 | 216 | $canRate = false; |
217 | 217 | } |
218 | 218 | if (!App::$User->isAuth()) { |
@@ -229,8 +229,8 @@ discard block |
||
229 | 229 | 'poster' => $row->getPosterUri(), |
230 | 230 | 'thumb' => $row->getPosterThumbUri(), |
231 | 231 | 'thumbSize' => File::size($row->getPosterThumbUri()), |
232 | - 'views' => (int)$row->views, |
|
233 | - 'rating' => (int)$row->rating, |
|
232 | + 'views' => (int) $row->views, |
|
233 | + 'rating' => (int) $row->rating, |
|
234 | 234 | 'canRate' => $canRate, |
235 | 235 | 'category' => $this->categories[$row->category_id], |
236 | 236 | 'uri' => '/content/read/' . $itemPath, |
@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * EntityContentSearch constructor. Pass search terms (query string) to model and used items to skip it by id. |
27 | 27 | * @param $terms |
28 | - * @param int|array $skipIds |
|
28 | + * @param integer $skipIds |
|
29 | 29 | */ |
30 | 30 | public function __construct($terms, $skipIds = 0) |
31 | 31 | { |