@@ -210,7 +210,7 @@ |
||
| 210 | 210 | * |
| 211 | 211 | * @param string $plugin |
| 212 | 212 | * @param string $aliasClass |
| 213 | - * @return bool|string |
|
| 213 | + * @return string|false |
|
| 214 | 214 | */ |
| 215 | 215 | protected function _getItemClassName($plugin, $aliasClass) |
| 216 | 216 | { |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | use Cake\Routing\Router; |
| 17 | 17 | use Cake\Routing\RouteBuilder; |
| 18 | 18 | |
| 19 | -Router::plugin('Core', ['path' => '/'], function (RouteBuilder $routeBuilder) { |
|
| 20 | - $routeBuilder->prefix('admin', function (RouteBuilder $routeBuilder) { |
|
| 19 | +Router::plugin('Core', ['path' => '/'], function(RouteBuilder $routeBuilder) { |
|
| 20 | + $routeBuilder->prefix('admin', function(RouteBuilder $routeBuilder) { |
|
| 21 | 21 | $routeBuilder->connect('/:controller/:action/*', []); |
| 22 | 22 | $routeBuilder->connect('/', ['controller' => 'Root', 'action' => 'dashboard']); |
| 23 | 23 | }); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | * Merge configure values by key. |
| 50 | 50 | * |
| 51 | 51 | * @param string $key |
| 52 | - * @param array|string $config |
|
| 52 | + * @param string $config |
|
| 53 | 53 | * @return array|mixed |
| 54 | 54 | */ |
| 55 | 55 | public static function mergeConfig($key, $config) |
@@ -68,11 +68,11 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | protected function _initialize() |
| 70 | 70 | { |
| 71 | - $this['path'] = function () { |
|
| 71 | + $this['path'] = function() { |
|
| 72 | 72 | return $this->_initPaths(); |
| 73 | 73 | }; |
| 74 | 74 | |
| 75 | - $this['helper'] = function () { |
|
| 75 | + $this['helper'] = function() { |
|
| 76 | 76 | return new HelperManager(); |
| 77 | 77 | }; |
| 78 | 78 | } |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $id = (string) $id; |
| 107 | 107 | if (class_exists($className)) { |
| 108 | 108 | self::$_loaded[$id] = $className; |
| 109 | - $this[$id] = function () use ($className) { |
|
| 109 | + $this[$id] = function() use ($className) { |
|
| 110 | 110 | return new $className(); |
| 111 | 111 | }; |
| 112 | 112 | } else { |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | continue; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $files[] = $prefix.$file; |
|
| 147 | + $files[] = $prefix . $file; |
|
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | } |
@@ -255,7 +255,7 @@ |
||
| 255 | 255 | 'entity' => $entity, |
| 256 | 256 | ], $data); |
| 257 | 257 | |
| 258 | - return $this->_View->element('Core.' . __FUNCTION__, $data); |
|
| 258 | + return $this->_View->element('Core.' . __FUNCTION__, $data); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * @param array|string $key |
| 61 | 61 | * @param null|mixed $value |
| 62 | 62 | * @param bool $merge |
| 63 | - * @return mixed |
|
| 63 | + * @return MoveComponent |
|
| 64 | 64 | * @throws \Cake\Core\Exception\Exception When trying to set a key that is invalid. |
| 65 | 65 | */ |
| 66 | 66 | public function setConfig($key, $value = null, $merge = true) |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'description' => 'Core plugin for UnionCMS' |
| 31 | 31 | ], |
| 32 | 32 | |
| 33 | - 'Controller.initialize' => function (Controller $controller) { |
|
| 33 | + 'Controller.initialize' => function(Controller $controller) { |
|
| 34 | 34 | $controller->loadComponent('Csrf'); |
| 35 | 35 | $controller->loadComponent('Cookie'); |
| 36 | 36 | $controller->loadComponent('Security', [ |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ]); |
| 47 | 47 | }, |
| 48 | 48 | |
| 49 | - 'View.initialize' => function (AppView $view) { |
|
| 49 | + 'View.initialize' => function(AppView $view) { |
|
| 50 | 50 | $view->loadHelper('Core.Nav'); |
| 51 | 51 | $view->loadHelper('Core.Less'); |
| 52 | 52 | $view->loadHelper('Core.Assets'); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $view->loadHelper('Html', ['className' => 'Core.Html']); |
| 57 | 57 | $view->loadHelper('Form', [ |
| 58 | 58 | 'className' => 'Core.Form', |
| 59 | - 'prepareBtnClass' => function (FormHelper $html, $options, $button) { |
|
| 59 | + 'prepareBtnClass' => function(FormHelper $html, $options, $button) { |
|
| 60 | 60 | $options = $html->addClass($options, 'waves-effect waves-light btn'); |
| 61 | 61 | if (!empty($button)) { |
| 62 | 62 | $options = $html->addClass($options, Str::trim((string) $button)); |
@@ -159,11 +159,11 @@ |
||
| 159 | 159 | |
| 160 | 160 | $classes = [ |
| 161 | 161 | $prefix, |
| 162 | - 'theme-' . Str::low($this->_View->theme), |
|
| 163 | - 'plugin-' . Str::low($this->_View->plugin), |
|
| 164 | - 'view-' . Str::low($this->_View->name), |
|
| 165 | - 'tmpl-' . Str::low($this->_View->template), |
|
| 166 | - 'layout-' . Str::low($this->_View->layout) |
|
| 162 | + 'theme-' . Str::low($this->_View->theme), |
|
| 163 | + 'plugin-' . Str::low($this->_View->plugin), |
|
| 164 | + 'view-' . Str::low($this->_View->name), |
|
| 165 | + 'tmpl-' . Str::low($this->_View->template), |
|
| 166 | + 'layout-' . Str::low($this->_View->layout) |
|
| 167 | 167 | ]; |
| 168 | 168 | |
| 169 | 169 | $pass = (array) $this->request->getParam('pass'); |