@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | $isMaterializeCss = $this->getConfig('materializeCss', false); |
93 | 93 | |
94 | 94 | if ($isMaterializeCss === true) { |
95 | - $this->_configWrite('prepareBtnClass', function (Helper $form, $options, $button) { |
|
95 | + $this->_configWrite('prepareBtnClass', function(Helper $form, $options, $button) { |
|
96 | 96 | return $this->_prepareBtn($form, $options, $button); |
97 | 97 | }); |
98 | 98 | |
99 | - $this->_configWrite('prepareTooltip', function (Helper $html, $options, $tooltip) { |
|
99 | + $this->_configWrite('prepareTooltip', function(Helper $html, $options, $tooltip) { |
|
100 | 100 | return $this->_prepareTooltip($html, $options, $tooltip); |
101 | 101 | }); |
102 | 102 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | 'entity' => $entity, |
289 | 289 | ], $data); |
290 | 290 | |
291 | - return $this->_View->element('Core.' . __FUNCTION__, $data); |
|
291 | + return $this->_View->element('Core.' . __FUNCTION__, $data); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | 'checkbox' => 'Core\View\Widget\MaterializeCss\CheckboxWidget' |
85 | 85 | ]) |
86 | 86 | ->set('templates', 'Core.templates/materialize_css_form') |
87 | - ->set('prepareBtnClass', function (Helper $form, $options, $button) { |
|
87 | + ->set('prepareBtnClass', function(Helper $form, $options, $button) { |
|
88 | 88 | return $this->_prepareBtn($form, $options, $button); |
89 | 89 | }) |
90 | - ->set('prepareTooltip', function (Helper $html, $options, $tooltip) { |
|
90 | + ->set('prepareTooltip', function(Helper $html, $options, $tooltip) { |
|
91 | 91 | return $this->_prepareTooltip($html, $options, $tooltip); |
92 | 92 | }); |
93 | 93 | } |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | protected function _addDefaultContextProviders() |
266 | 266 | { |
267 | - $this->addContextProvider('orm', function ($request, $data) { |
|
267 | + $this->addContextProvider('orm', function($request, $data) { |
|
268 | 268 | if (is_array($data['entity']) || $data['entity'] instanceof \Traversable) { |
269 | 269 | $pass = (new Collection($data['entity']))->first() !== null; |
270 | 270 | if ($pass) { |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | */ |
305 | 305 | protected function _addFormArrayProvider() |
306 | 306 | { |
307 | - $this->addContextProvider('array', function ($request, $data) { |
|
307 | + $this->addContextProvider('array', function($request, $data) { |
|
308 | 308 | if (is_array($data['entity']) && isset($data['entity']['schema'])) { |
309 | 309 | return new ArrayContext($request, $data['entity']); |
310 | 310 | } |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | protected function _addFormContextProvider() |
320 | 320 | { |
321 | - $this->addContextProvider('form', function ($request, $data) { |
|
321 | + $this->addContextProvider('form', function($request, $data) { |
|
322 | 322 | if ($data['entity'] instanceof Form) { |
323 | 323 | return new FormContext($request, $data); |
324 | 324 | } |
@@ -19,7 +19,6 @@ |
||
19 | 19 | use Cake\View\View; |
20 | 20 | use JBZoo\Data\Data; |
21 | 21 | use JBZoo\Utils\Arr; |
22 | -use JBZoo\Utils\Str; |
|
23 | 22 | use Cake\View\Helper; |
24 | 23 | use Cake\Utility\Hash; |
25 | 24 | use Cake\Core\Configure; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Create current icon. |
63 | 63 | * |
64 | 64 | * @param HtmlHelper $html |
65 | - * @param string|int $title |
|
65 | + * @param string|null $title |
|
66 | 66 | * @param array $options |
67 | 67 | * @return array |
68 | 68 | */ |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | /** |
166 | 166 | * Prepare before after content for input container. |
167 | 167 | * |
168 | - * @param string|int $type Set before or after flag. |
|
168 | + * @param string $type Set before or after flag. |
|
169 | 169 | * @param string|int $value |
170 | 170 | * @return null|string |
171 | 171 | */ |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Get current form view. |
166 | 166 | * |
167 | 167 | * @param null|string $view |
168 | - * @return null |
|
168 | + * @return string|null |
|
169 | 169 | */ |
170 | 170 | protected function _getFormView($view = null) |
171 | 171 | { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * Finds an partial filename, returns false on failure. |
181 | 181 | * |
182 | 182 | * @param string $name |
183 | - * @return bool|string |
|
183 | + * @return string|false |
|
184 | 184 | */ |
185 | 185 | protected function _getLayoutPartialPath($name) |
186 | 186 | { |
@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | namespace Core\View; |
17 | 17 | |
18 | -use Core\Cms; |
|
19 | 18 | use Cake\Core\App; |
20 | 19 | use Cake\View\View; |
21 | 20 | use JBZoo\Utils\FS; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * Initialization hook method. |
36 | 36 | */ |
37 | - 'Controller.initialize' => function (Controller $controller) { |
|
37 | + 'Controller.initialize' => function(Controller $controller) { |
|
38 | 38 | $controller->loadComponent('Csrf'); |
39 | 39 | $controller->loadComponent('Cookie'); |
40 | 40 | $controller->loadComponent('Security', [ |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * So this method allows you to manipulate them as required after view instance |
89 | 89 | * is constructed. |
90 | 90 | */ |
91 | - 'View.initialize' => function (AppView $view) { |
|
91 | + 'View.initialize' => function(AppView $view) { |
|
92 | 92 | $view->loadHelper('Core.Nav'); |
93 | 93 | $view->loadHelper('Core.Less'); |
94 | 94 | $view->loadHelper('Core.Assets'); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * @param array|string $key |
62 | 62 | * @param null|mixed $value |
63 | 63 | * @param bool $merge |
64 | - * @return mixed |
|
64 | + * @return MoveComponent |
|
65 | 65 | * |
66 | 66 | * @throws \Aura\Intl\Exception |
67 | 67 | * @throws \Cake\Core\Exception\Exception When trying to set a key that is invalid. |
@@ -217,7 +217,7 @@ |
||
217 | 217 | * Create and merge actual process options. |
218 | 218 | * |
219 | 219 | * @param array $options |
220 | - * @param int|string $count |
|
220 | + * @param integer $count |
|
221 | 221 | * @return array |
222 | 222 | * |
223 | 223 | * @throws \Aura\Intl\Exception |
@@ -121,7 +121,7 @@ |
||
121 | 121 | ->setTemplatePath('Common'); |
122 | 122 | |
123 | 123 | $entity = $table->get($id); |
124 | - $newValue = ! (int) $value; |
|
124 | + $newValue = !(int) $value; |
|
125 | 125 | |
126 | 126 | $entity->set($field, (int) $newValue); |
127 | 127 |
@@ -194,11 +194,11 @@ |
||
194 | 194 | |
195 | 195 | $classes = [ |
196 | 196 | $prefix, |
197 | - 'theme-' . Str::low($view->getTheme()), |
|
198 | - 'plugin-' . Str::low($view->getPlugin()), |
|
199 | - 'view-' . Str::low($view->getName()), |
|
200 | - 'tmpl-' . Str::low($view->getTemplate()), |
|
201 | - 'layout-' . Str::low($view->getLayout()) |
|
197 | + 'theme-' . Str::low($view->getTheme()), |
|
198 | + 'plugin-' . Str::low($view->getPlugin()), |
|
199 | + 'view-' . Str::low($view->getName()), |
|
200 | + 'tmpl-' . Str::low($view->getTemplate()), |
|
201 | + 'layout-' . Str::low($view->getLayout()) |
|
202 | 202 | ]; |
203 | 203 | |
204 | 204 | $pass = (array) $request->getParam('pass'); |