@@ -71,7 +71,7 @@ |
||
71 | 71 | } else { |
72 | 72 | // set level marker based on slashes count in pathway |
73 | 73 | $slashCount = Str::entryCount($path, '/'); |
74 | - for ($i=-1; $i <= $slashCount; $i++) { |
|
74 | + for ($i = -1; $i <= $slashCount; $i++) { |
|
75 | 75 | $title .= '--'; |
76 | 76 | } |
77 | 77 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | // convert id to real integer |
26 | - $user_id = (int)$user_id; |
|
26 | + $user_id = (int) $user_id; |
|
27 | 27 | |
28 | 28 | if (!Obj::isInt($user_id) || $user_id < 1) { |
29 | 29 | return null; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function getId() |
53 | 53 | { |
54 | - return (int)$this->id; |
|
54 | + return (int) $this->id; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | { |
74 | 74 | // get data from session |
75 | 75 | $session_token = MainApp::$Session->get('ff_user_token', null); |
76 | - $session_id = (int)MainApp::$Session->get('ff_user_id', 0); |
|
76 | + $session_id = (int) MainApp::$Session->get('ff_user_id', 0); |
|
77 | 77 | |
78 | 78 | // validate session data |
79 | 79 | if (null === $session_token || $session_id < 1 || Str::length($session_token) < 64) { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | // convert id to real integer |
110 | - $id = (int)$id; |
|
110 | + $id = (int) $id; |
|
111 | 111 | |
112 | 112 | $find = MainApp::$Memory->get('user.counter.cache.' . $id); |
113 | 113 | if ($find === null) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | $search = \Apps\ActiveRecord\App::where('sys_name', '=', $controller_name)->first(); |
27 | 27 | |
28 | - if ($search === null || (int)$search->id < 1) { |
|
28 | + if ($search === null || (int) $search->id < 1) { |
|
29 | 29 | throw new ForbiddenException(); |
30 | 30 | } |
31 | 31 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function actionIndex() |
33 | 33 | { |
34 | 34 | // set current page and offset |
35 | - $page = (int)App::$Request->query->get('page'); |
|
35 | + $page = (int) App::$Request->query->get('page'); |
|
36 | 36 | $offset = $page * self::ITEM_PER_PAGE; |
37 | 37 | |
38 | 38 | $query = null; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($type === 'trash') { |
42 | 42 | $query = ContentEntity::onlyTrashed(); |
43 | 43 | } elseif (Obj::isLikeInt($type)) { // sounds like category id ;) |
44 | - $query = ContentEntity::where('category_id', '=', (int)$type); |
|
44 | + $query = ContentEntity::where('category_id', '=', (int) $type); |
|
45 | 45 | } else { |
46 | 46 | $query = new ContentEntity(); |
47 | 47 | $type = 'all'; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | if ($model->send() && $model->validate()) { |
184 | 184 | // remove all trashed items |
185 | 185 | foreach ($records->get() as $item) { |
186 | - $galleryPath = '/upload/gallery/' . (int)$item->id; |
|
186 | + $galleryPath = '/upload/gallery/' . (int) $item->id; |
|
187 | 187 | if (Directory::exist($galleryPath)) { |
188 | 188 | Directory::remove($galleryPath); |
189 | 189 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | public function actionCategoryupdate($id = null) |
254 | 254 | { |
255 | 255 | // get owner id for new rows |
256 | - $parentId = (int)App::$Request->query->get('parent'); |
|
256 | + $parentId = (int) App::$Request->query->get('parent'); |
|
257 | 257 | |
258 | 258 | // get relation and pass to model |
259 | 259 | $record = ContentCategory::findOrNew($id); |
@@ -117,9 +117,9 @@ |
||
117 | 117 | */ |
118 | 118 | public function actionDeleteroute() |
119 | 119 | { |
120 | - $type = (string)App::$Request->query->get('type'); |
|
121 | - $loader = (string)App::$Request->query->get('loader'); |
|
122 | - $source = Str::lowerCase((string)App::$Request->query->get('path')); |
|
120 | + $type = (string) App::$Request->query->get('type'); |
|
121 | + $loader = (string) App::$Request->query->get('loader'); |
|
122 | + $source = Str::lowerCase((string) App::$Request->query->get('path')); |
|
123 | 123 | |
124 | 124 | $model = new EntityDeleteRoute($type, $loader, $source); |
125 | 125 | if ($model->send()) { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $query = new ProfileRecords(); |
26 | 26 | |
27 | 27 | // set current page and offset |
28 | - $page = (int)App::$Request->query->get('page'); |
|
28 | + $page = (int) App::$Request->query->get('page'); |
|
29 | 29 | $offset = $page * self::ITEM_PER_PAGE; |
30 | 30 | |
31 | 31 | // build pagination |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $query = new UserRecords(); |
27 | 27 | |
28 | 28 | // set current page and offset |
29 | - $page = (int)App::$Request->query->get('page'); |
|
29 | + $page = (int) App::$Request->query->get('page'); |
|
30 | 30 | $offset = $page * self::ITEM_PER_PAGE; |
31 | 31 | |
32 | 32 | // build pagination |
@@ -19,9 +19,9 @@ |
||
19 | 19 | // set header |
20 | 20 | $this->setJsonHeader(); |
21 | 21 | // offset can be only integer |
22 | - $offset = (int)$offset; |
|
22 | + $offset = (int) $offset; |
|
23 | 23 | // get comment target path and check |
24 | - $path = (string)App::$Request->query->get('path'); |
|
24 | + $path = (string) App::$Request->query->get('path'); |
|
25 | 25 | if (Str::likeEmpty($path)) { |
26 | 26 | throw new JsonException('Wrong path'); |
27 | 27 | } |
@@ -26,12 +26,12 @@ |
||
26 | 26 | parent::before(); |
27 | 27 | $configs = AppRecord::getConfigs('app', 'Content'); |
28 | 28 | // prevent null-type config data |
29 | - if ((int)$configs['gallerySize'] > 0) { |
|
30 | - $this->maxSize = (int)$configs['gallerySize'] * 1024; |
|
29 | + if ((int) $configs['gallerySize'] > 0) { |
|
30 | + $this->maxSize = (int) $configs['gallerySize'] * 1024; |
|
31 | 31 | } |
32 | 32 | |
33 | - if ((int)$configs['galleryResize'] > 0) { |
|
34 | - $this->maxResize = (int)$configs['galleryResize']; |
|
33 | + if ((int) $configs['galleryResize'] > 0) { |
|
34 | + $this->maxResize = (int) $configs['galleryResize']; |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 |