@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | // cache some data |
33 | 33 | $rootSize = App::$Cache->get('root.size'); |
34 | 34 | if ($rootSize === null) { |
35 | - $rootSize = round(Directory::getSize('/') / (1024*1000), 2) . ' mb'; |
|
35 | + $rootSize = round(Directory::getSize('/') / (1024 * 1000), 2) . ' mb'; |
|
36 | 36 | App::$Cache->set('root.size', $rootSize, 60 * 60 * 24); // 24 hours caching |
37 | 37 | } |
38 | 38 | $loadAvg = App::$Cache->get('load.average'); |
39 | 39 | if ($loadAvg === null) { |
40 | 40 | $loadAvg = Environment::loadAverage(); |
41 | - App::$Cache->set('load.average', $loadAvg, 60*5); // 5 min cache |
|
41 | + App::$Cache->set('load.average', $loadAvg, 60 * 5); // 5 min cache |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $stats = [ |
@@ -145,9 +145,9 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function actionDeleteroute() |
147 | 147 | { |
148 | - $type = (string)App::$Request->query->get('type'); |
|
149 | - $loader = (string)App::$Request->query->get('loader'); |
|
150 | - $source = Str::lowerCase((string)App::$Request->query->get('path')); |
|
148 | + $type = (string) App::$Request->query->get('type'); |
|
149 | + $loader = (string) App::$Request->query->get('loader'); |
|
150 | + $source = Str::lowerCase((string) App::$Request->query->get('path')); |
|
151 | 151 | |
152 | 152 | $model = new EntityDeleteRoute($type, $loader, $source); |
153 | 153 | if ($model->send()) { |
@@ -32,11 +32,11 @@ |
||
32 | 32 | } |
33 | 33 | // check cache is defined |
34 | 34 | if ($this->cache === null || !Obj::isLikeInt($this->cache)) { |
35 | - $this->cache = (int)$cfg['cache']; |
|
35 | + $this->cache = (int) $cfg['cache']; |
|
36 | 36 | } |
37 | 37 | // check item count is defined |
38 | 38 | if ($this->count === null || !Obj::isLikeInt($this->count)) { |
39 | - $this->count = (int)$cfg['count']; |
|
39 | + $this->count = (int) $cfg['count']; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | public function before() |
31 | 31 | { |
32 | 32 | $this->categories = Serialize::decode($this->_configs['categories']); |
33 | - $this->count = (int)$this->_configs['count']; |
|
34 | - $this->cache = (int)$this->_configs['cache']; |
|
33 | + $this->count = (int) $this->_configs['count']; |
|
34 | + $this->cache = (int) $this->_configs['cache']; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -64,8 +64,8 @@ discard block |
||
64 | 64 | public function getResult() |
65 | 65 | { |
66 | 66 | return [ |
67 | - 'count' => (int)$this->count, |
|
68 | - 'cache' => (int)$this->cache, |
|
67 | + 'count' => (int) $this->count, |
|
68 | + 'cache' => (int) $this->cache, |
|
69 | 69 | 'categories' => Serialize::encode($this->categories) |
70 | 70 | ]; |
71 | 71 | } |