@@ -26,10 +26,10 @@ |
||
| 26 | 26 | { |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * List of helpers used by this helper. |
|
| 30 | - * |
|
| 31 | - * @var array |
|
| 32 | - */ |
|
| 29 | + * List of helpers used by this helper. |
|
| 30 | + * |
|
| 31 | + * @var array |
|
| 32 | + */ |
|
| 33 | 33 | public $helpers = [ |
| 34 | 34 | 'Url' => ['className' => 'Core.Url'], |
| 35 | 35 | 'Html' => ['className' => 'Backend.Html'], |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | * @var array |
| 32 | 32 | */ |
| 33 | 33 | public $helpers = [ |
| 34 | - 'Url' => ['className' => 'Core.Url'], |
|
| 35 | - 'Html' => ['className' => 'Backend.Html'], |
|
| 34 | + 'Url' => [ 'className' => 'Core.Url' ], |
|
| 35 | + 'Html' => [ 'className' => 'Backend.Html' ], |
|
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param array $options |
| 43 | 43 | * @return string |
| 44 | 44 | */ |
| 45 | - public function switcher($fieldName, array $options = []) |
|
| 45 | + public function switcher($fieldName, array $options = [ ]) |
|
| 46 | 46 | { |
| 47 | 47 | $input = parent::checkbox($fieldName, $options); |
| 48 | 48 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'after' => __d('backend', 'On') |
| 52 | 52 | ]; |
| 53 | 53 | |
| 54 | - $title = (isset($options['title'])) ? $options['title'] : $fieldName; |
|
| 54 | + $title = (isset($options[ 'title' ])) ? $options[ 'title' ] : $fieldName; |
|
| 55 | 55 | |
| 56 | 56 | if (!empty($title)) { |
| 57 | 57 | $title = $this->Html->div('switch-title', $title); |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | $content = $this->formatTemplate(__FUNCTION__, [ |
| 61 | 61 | 'input' => $input, |
| 62 | 62 | 'lever' => '<span class="lever"></span>', |
| 63 | - 'before' => $options['before'], |
|
| 64 | - 'after' => $options['after'], |
|
| 63 | + 'before' => $options[ 'before' ], |
|
| 64 | + 'after' => $options[ 'after' ], |
|
| 65 | 65 | 'title' => $title, |
| 66 | 66 | ]); |
| 67 | 67 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * @var array |
| 32 | 32 | */ |
| 33 | 33 | public $helpers = [ |
| 34 | - 'Url' => ['className' => 'Core.Url'], |
|
| 35 | - 'Html' => ['className' => 'Backend.Html'], |
|
| 34 | + 'Url' => [ 'className' => 'Core.Url' ], |
|
| 35 | + 'Html' => [ 'className' => 'Backend.Html' ], |
|
| 36 | 36 | ]; |
| 37 | 37 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | 'type' => 'theme', |
| 31 | 31 | 'backend' => true, |
| 32 | 32 | ], |
| 33 | - 'View.initialize' => function (AppView $view) { |
|
| 33 | + 'View.initialize' => function(AppView $view) { |
|
| 34 | 34 | $helpers = $view->helpers(); |
| 35 | 35 | |
| 36 | 36 | $helpers->unload('Form'); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $view->loadHelper('Backend.Assets'); |
| 41 | 41 | $view->loadHelper('Html', [ |
| 42 | 42 | 'className' => 'Backend.Html', |
| 43 | - 'prepareBtnClass' => function (HtmlHelper $html, $options, $button) { |
|
| 43 | + 'prepareBtnClass' => function(HtmlHelper $html, $options, $button) { |
|
| 44 | 44 | $options = $html->addClass($options, 'waves-effect waves-light btn'); |
| 45 | 45 | if (!empty($button)) { |
| 46 | 46 | $options = $html->addClass($options, Str::trim((string) $button)); |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function render(array $data, ContextInterface $context) |
| 37 | 37 | { |
| 38 | - $data['class'] = ' filled-in'; |
|
| 39 | - $data['class'] = trim($data['class']); |
|
| 38 | + $data[ 'class' ] = ' filled-in'; |
|
| 39 | + $data[ 'class' ] = trim($data[ 'class' ]); |
|
| 40 | 40 | |
| 41 | 41 | return parent::render($data, $context); |
| 42 | 42 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | Nav::add('sidebar', 'user-details', [ |
| 20 | 20 | 'weight' => 9, |
| 21 | - 'callable' => function (AppView $view) { |
|
| 21 | + 'callable' => function(AppView $view) { |
|
| 22 | 22 | return $view->element('Backend.Nav/sidebar/user_details'); |
| 23 | 23 | } |
| 24 | 24 | ]); |