@@ -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 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | public function __construct($captcha = true) |
22 | 22 | { |
23 | - $this->_useCaptcha = (bool)$captcha; |
|
23 | + $this->_useCaptcha = (bool) $captcha; |
|
24 | 24 | parent::__construct(); |
25 | 25 | } |
26 | 26 |
@@ -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 |
@@ -32,8 +32,8 @@ |
||
32 | 32 | foreach ($records as $item) { |
33 | 33 | $message = Str::sub(\App::$Security->strip_tags($item->message), 0, 50); |
34 | 34 | $author = Simplify::parseUserNick($item->user_id, $item->guest_name); |
35 | - if ((int)$item->user_id > 0) { |
|
36 | - $author = Url::link(['user/update', (int)$item->user_id], $author); |
|
35 | + if ((int) $item->user_id > 0) { |
|
36 | + $author = Url::link(['user/update', (int) $item->user_id], $author); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | App::$Session->set('content.rate.ignore', $ignored); |
65 | 65 | |
66 | 66 | // save rating changes to database |
67 | - switch($this->_type) { |
|
67 | + switch ($this->_type) { |
|
68 | 68 | case 'plus': |
69 | 69 | $this->_content->rating += 1; |
70 | 70 | break; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->_content->save(); |
77 | 77 | |
78 | 78 | // update content author rating |
79 | - $authorId = (int)$this->_content->author_id; |
|
79 | + $authorId = (int) $this->_content->author_id; |
|
80 | 80 | if ($authorId > 0 && App::$User->isExist($authorId)) { |
81 | 81 | $authorObject = App::$User->identity($authorId); |
82 | 82 | if ($authorObject !== null) { |
@@ -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 | } |