@@ -78,7 +78,7 @@ |
||
78 | 78 | |
79 | 79 | /** |
80 | 80 | * Make query to database |
81 | - * @return object |
|
81 | + * @return string |
|
82 | 82 | */ |
83 | 83 | private function makeQuery() |
84 | 84 | { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | |
73 | 73 | // render view |
74 | 74 | return App::$View->render($this->tpl, [ |
75 | - 'records' => $query |
|
75 | + 'records' => $query |
|
76 | 76 | ]); |
77 | 77 | } |
78 | 78 |
@@ -32,11 +32,11 @@ discard block |
||
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 | |
@@ -56,12 +56,12 @@ discard block |
||
56 | 56 | $query = $this->makeQuery(); |
57 | 57 | } else { |
58 | 58 | // try get query result from cache |
59 | - $query = App::$Cache->get('widget.newcontent.' . $cacheHash); |
|
59 | + $query = App::$Cache->get('widget.newcontent.'.$cacheHash); |
|
60 | 60 | if ($query === null) { |
61 | 61 | // if query is not cached make it |
62 | 62 | $query = $this->makeQuery(); |
63 | 63 | // and save result to cache |
64 | - App::$Cache->set('widget.newcontent.' . $cacheHash, $query, $this->cache); |
|
64 | + App::$Cache->set('widget.newcontent.'.$cacheHash, $query, $this->cache); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
28 | - * Set default values from configs |
|
29 | - */ |
|
28 | + * Set default values from configs |
|
29 | + */ |
|
30 | 30 | public function before() |
31 | 31 | { |
32 | 32 | $this->categories = Serialize::decode($this->_configs['categories']); |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * Labels for form |
|
39 | - */ |
|
38 | + * Labels for form |
|
39 | + */ |
|
40 | 40 | public function labels() |
41 | 41 | { |
42 | 42 | return [ |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * Validation rules |
|
51 | - */ |
|
50 | + * Validation rules |
|
51 | + */ |
|
52 | 52 | public function rules() |
53 | 53 | { |
54 | 54 | return [ |
@@ -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 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ]); |
47 | 47 | |
48 | 48 | $configs->newcontent = serialize([ |
49 | - 'categories' => serialize(['2','3']), |
|
49 | + 'categories' => serialize(['2', '3']), |
|
50 | 50 | 'count' => '5', |
51 | 51 | 'cache' => '60' |
52 | 52 | ]); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | <?php |
26 | 26 | $items = []; |
27 | -foreach($records as $role) { |
|
27 | +foreach ($records as $role) { |
|
28 | 28 | $permissions = explode(';', $role->permissions); |
29 | 29 | $permissionsLabel = null; |
30 | 30 | foreach ($permissions as $perm) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } else { |
37 | 37 | $labelMark = 'label-default'; |
38 | 38 | } |
39 | - $permissionsLabel .= '<span class="label ' . $labelMark . '">' . $perm . '</span> '; |
|
39 | + $permissionsLabel .= '<span class="label '.$labelMark.'">'.$perm.'</span> '; |
|
40 | 40 | } |
41 | 41 | $items[] = [ |
42 | 42 | ['text' => $role->id], |
@@ -2,6 +2,6 @@ |
||
2 | 2 | use Ffcms\Core\Helper\Url; |
3 | 3 | |
4 | 4 | if (isset($controller)): ?> |
5 | -<a href="<?= Url::to($controller . '/index') ?>"><i class="fa fa-cogs"></i></a> |
|
5 | +<a href="<?= Url::to($controller.'/index') ?>"><i class="fa fa-cogs"></i></a> |
|
6 | 6 | <a href="<?= Url::to('widget/turn', $controller) ?>"><i class="fa fa-power-off"></i></a> |
7 | 7 | <?php endif; ?> |
8 | 8 | \ No newline at end of file |
@@ -33,8 +33,8 @@ |
||
33 | 33 | foreach (\App::$Properties->get('languages') as $lang) { |
34 | 34 | $nameTab[] = [ |
35 | 35 | 'type' => 'tab', |
36 | - 'text' => __('Lang') . ': ' . Str::upperCase($lang), |
|
37 | - 'content' => $form->field('name.' . $lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')), |
|
36 | + 'text' => __('Lang').': '.Str::upperCase($lang), |
|
37 | + 'content' => $form->field('name.'.$lang, 'text', ['class' => 'form-control'], __('Define field name, which be displayed for user for current language locale')), |
|
38 | 38 | 'active' => $lang === \App::$Request->getLanguage(), |
39 | 39 | 'html' => true, |
40 | 40 | '!secure' => true |
@@ -27,11 +27,11 @@ |
||
27 | 27 | foreach ($records as $profile) { |
28 | 28 | $items[] = [ |
29 | 29 | ['text' => $profile->id], |
30 | - ['text' => $profile->User()->login . '/' . $profile->User()->email], |
|
30 | + ['text' => $profile->User()->login.'/'.$profile->User()->email], |
|
31 | 31 | ['text' => $profile->nick], |
32 | 32 | ['text' => Str::startsWith('0000-', $profile->birthday) ? __('None') : Date::convertToDatetime($profile->birthday)], |
33 | - ['text' => ($profile->rating > 0 ? '+' : null) . $profile->rating], |
|
34 | - ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> ') . |
|
33 | + ['text' => ($profile->rating > 0 ? '+' : null).$profile->rating], |
|
34 | + ['text' => Url::link(['profile/update', $profile->id], '<i class="fa fa-pencil fa-lg"></i> '). |
|
35 | 35 | Url::link(['user/delete', $profile->User()->id], '<i class="fa fa-trash-o fa-lg"></i>'), |
36 | 36 | 'html' => true, 'property' => ['class' => 'text-center']] |
37 | 37 | ]; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | 'items' => [ |
36 | 36 | [['text' => $model->getLabel('name')], ['text' => $model->name[\App::$Request->getLanguage()]]], |
37 | 37 | [['text' => $model->getLabel('type')], ['text' => $model->type]], |
38 | - [['text' => $model->getLabel('reg_exp')], ['text' => ($model->reg_cond == 0 ? '!' : null) . 'preg_match("'.$model->reg_exp.'", $input)']], |
|
38 | + [['text' => $model->getLabel('reg_exp')], ['text' => ($model->reg_cond == 0 ? '!' : null).'preg_match("'.$model->reg_exp.'", $input)']], |
|
39 | 39 | ] |
40 | 40 | ] |
41 | 41 | ]); |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <div class="row"> |
19 | 19 | <div class="col-md-12"> |
20 | 20 | <div class="pull-right"> |
21 | - <?= Url::link(['application/install'], '<i class="fa fa-tasks"></i> ' . __('Install'), ['class' => 'btn btn-primary']) ?> |
|
21 | + <?= Url::link(['application/install'], '<i class="fa fa-tasks"></i> '.__('Install'), ['class' => 'btn btn-primary']) ?> |
|
22 | 22 | </div> |
23 | 23 | </div> |
24 | 24 | </div> |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | continue; |
31 | 31 | } |
32 | 32 | |
33 | - $route = $app->sys_name . '/index'; |
|
33 | + $route = $app->sys_name.'/index'; |
|
34 | 34 | $icoStatus = null; |
35 | 35 | $actions = \App::$View->render('native/macro/app_actions', ['controller' => $app->sys_name]); |
36 | 36 | // set action icons based on app status |
37 | - if ((int)$app->disabled !== 0) { |
|
37 | + if ((int) $app->disabled !== 0) { |
|
38 | 38 | $icoStatus = ' <i class="fa fa-pause" style="color: #ff0000;"></i>'; |
39 | 39 | } elseif ($app->checkVersion() !== true) { |
40 | 40 | $icoStatus = ' <i class="fa fa-exclamation" style="color: #ffbd26;"></i>'; |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | $appTableItems[] = [ |
47 | - ['text' => $app->id . $icoStatus, 'html' => true, '!secure' => true], |
|
47 | + ['text' => $app->id.$icoStatus, 'html' => true, '!secure' => true], |
|
48 | 48 | ['text' => Url::link([$route], $app->getLocaleName()), 'html' => true], |
49 | - ['text' => '<a target="_blank" href="' . \App::$Alias->scriptUrl . '/' . Str::lowerCase($route) . '">' . $route . '</a>', 'html' => true], |
|
49 | + ['text' => '<a target="_blank" href="'.\App::$Alias->scriptUrl.'/'.Str::lowerCase($route).'">'.$route.'</a>', 'html' => true], |
|
50 | 50 | ['text' => $app->version], |
51 | 51 | ['text' => Date::convertToDatetime($app->updated_at, Date::FORMAT_TO_HOUR)], |
52 | 52 | ['text' => $actions, 'property' => ['class' => 'text-center'], 'html' => true] |