@@ -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 | } |
@@ -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 |