@@ -48,7 +48,7 @@ discard block |
||
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 |
||
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) |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public static function all($columns = ['*']) |
35 | 35 | { |
36 | - $cacheName = 'activercord.app.all.' . implode('.', $columns); |
|
36 | + $cacheName = 'activercord.app.all.'.implode('.', $columns); |
|
37 | 37 | $records = MemoryObject::instance()->get($cacheName); |
38 | 38 | if ($records === null) { |
39 | 39 | $records = parent::all($columns); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | $scriptVersion = $this->getScriptVersion(); |
166 | 166 | |
167 | - return $scriptVersion === (float)$this->version; |
|
167 | + return $scriptVersion === (float) $this->version; |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function getScriptVersion() |
175 | 175 | { |
176 | - $class = 'Apps\Controller\Admin\\' . $this->sys_name; |
|
176 | + $class = 'Apps\Controller\Admin\\'.$this->sys_name; |
|
177 | 177 | if (!class_exists($class)) { |
178 | 178 | return false; |
179 | 179 | } |
180 | 180 | |
181 | - if (!defined($class . '::VERSION')) { |
|
181 | + if (!defined($class.'::VERSION')) { |
|
182 | 182 | return false; |
183 | 183 | } |
184 | 184 | |
185 | - return (float)constant($class . '::VERSION'); |
|
185 | + return (float) constant($class.'::VERSION'); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | } |
189 | 189 | \ No newline at end of file |
@@ -26,7 +26,7 @@ discard block |
||
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 |
||
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 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public static function all($columns = ['*']) |
31 | 31 | { |
32 | - $cacheName = 'activerecord.contentcategory.all.' . implode('.', $columns); |
|
32 | + $cacheName = 'activerecord.contentcategory.all.'.implode('.', $columns); |
|
33 | 33 | $records = MemoryObject::instance()->get($cacheName); |
34 | 34 | if ($records === null) { |
35 | 35 | $records = parent::all($columns); |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public static function getByPath($path = '') |
47 | 47 | { |
48 | - if (MainApp::$Memory->get('cache.content.category.path.' . $path) !== null) { |
|
49 | - return MainApp::$Memory->get('cache.content.category.path.' . $path); |
|
48 | + if (MainApp::$Memory->get('cache.content.category.path.'.$path) !== null) { |
|
49 | + return MainApp::$Memory->get('cache.content.category.path.'.$path); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $record = self::where('path', '=', $path)->first(); |
53 | - MainApp::$Memory->set('cache.content.category.path.' . $path, $record); |
|
53 | + MainApp::$Memory->set('cache.content.category.path.'.$path, $record); |
|
54 | 54 | return $record; |
55 | 55 | } |
56 | 56 | |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public static function getById($id) |
63 | 63 | { |
64 | - if (MainApp::$Memory->get('cache.content.category.id.' . $id) !== null) { |
|
65 | - return MainApp::$Memory->get('cache.content.category.id.' . $id); |
|
64 | + if (MainApp::$Memory->get('cache.content.category.id.'.$id) !== null) { |
|
65 | + return MainApp::$Memory->get('cache.content.category.id.'.$id); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | $record = self::find($id); |
69 | - MainApp::$Memory->set('cache.content.category.id.' . $id, $record); |
|
69 | + MainApp::$Memory->set('cache.content.category.id.'.$id, $record); |
|
70 | 70 | return $record; |
71 | 71 | } |
72 | 72 | |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | } else { |
95 | 95 | // set level marker based on slashes count in pathway |
96 | 96 | $slashCount = Str::entryCount($path, '/'); |
97 | - for ($i=-1; $i <= $slashCount; $i++) { |
|
97 | + for ($i = -1; $i <= $slashCount; $i++) { |
|
98 | 98 | $title .= '--'; |
99 | 99 | } |
100 | 100 | } |
101 | 101 | // add canonical title from db |
102 | - $title .= ' ' . Serialize::getDecodeLocale($data->title); |
|
102 | + $title .= ' '.Serialize::getDecodeLocale($data->title); |
|
103 | 103 | // set response as array [id => title, ... ] |
104 | 104 | $response[$data->id] = $title; |
105 | 105 | } |
@@ -28,7 +28,7 @@ |
||
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); |