Completed
Push — master ( 97a922...38b0c2 )
by Cheren
05:46
created
plugin.manifest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         'type'        => 'theme',
32 32
         'backend'     => true,
33 33
     ],
34
-    'View.initialize' => function (AppView $view) {
34
+    'View.initialize' => function(AppView $view) {
35 35
         $helpers = $view->helpers();
36 36
 
37 37
         $helpers->unload('Form');
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $view->loadHelper('Form', [
46 46
             'className' => 'Backend.Form',
47 47
             'widgets'   => [
48
-                'file'     => ['Backend\View\Widget\FileWidget'],
49
-                'checkbox' => ['Backend\View\Widget\CheckboxWidget']
48
+                'file'     => [ 'Backend\View\Widget\FileWidget' ],
49
+                'checkbox' => [ 'Backend\View\Widget\CheckboxWidget' ]
50 50
             ]
51 51
         ]);
52 52
     }
Please login to merge, or discard this patch.
src/View/Helper/FormHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
     * @var array
37 37
     */
38 38
     public $helpers = [
39
-        'Url'  => ['className' => 'Core.Url'],
40
-        'Html' => ['className' => 'Backend.Html']
39
+        'Url'  => [ 'className' => 'Core.Url' ],
40
+        'Html' => [ 'className' => 'Backend.Html' ]
41 41
     ];
42 42
 
43 43
     /**
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @return string A generated file input.
50 50
      */
51
-    public function file($fieldName, array $options = [])
51
+    public function file($fieldName, array $options = [ ])
52 52
     {
53 53
         $content = parent::file($fieldName, $options);
54 54
         $options = $this->_parseOptions($fieldName, $options);
55 55
 
56
-        $options['type'] = __FUNCTION__;
56
+        $options[ 'type' ] = __FUNCTION__;
57 57
 
58 58
         $result = $this->_inputContainerTemplate([
59 59
             'error'       => null,
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function initialize(array $config)
75 75
     {
76
-        $this->_configWrite('prepareBtnClass', function (FormHelper $form, $options, $button) {
76
+        $this->_configWrite('prepareBtnClass', function(FormHelper $form, $options, $button) {
77 77
             return $this->_prepareBtn($form, $options, $button);
78 78
         });
79 79
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param array $options
90 90
      * @return string
91 91
      */
92
-    public function switcher($fieldName, array $options = [])
92
+    public function switcher($fieldName, array $options = [ ])
93 93
     {
94 94
         $input = parent::checkbox($fieldName, $options);
95 95
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             'after'  => __d('backend', 'On')
99 99
         ];
100 100
 
101
-        $title = (Arr::key('title', $options)) ? $options['title'] : $fieldName;
101
+        $title = (Arr::key('title', $options)) ? $options[ 'title' ] : $fieldName;
102 102
 
103 103
         if (!empty($title)) {
104 104
             $title = $this->Html->div('switch-title', $title);
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
         $content = $this->formatTemplate(__FUNCTION__, [
108 108
             'input'  => $input,
109 109
             'title'  => $title,
110
-            'after'  => $options['after'],
111
-            'before' => $options['before'],
110
+            'after'  => $options[ 'after' ],
111
+            'before' => $options[ 'before' ],
112 112
             'lever'  => '<span class="lever"></span>'
113 113
         ]);
114 114
 
Please login to merge, or discard this patch.
src/View/Widget/FileWidget.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,19 +48,19 @@
 block discarded – undo
48 48
     {
49 49
         $data += [
50 50
             'name'         => '',
51
-            'templateVars' => [],
51
+            'templateVars' => [ ],
52 52
             'escape'       => true
53 53
         ];
54 54
 
55
-        unset($data['val']);
55
+        unset($data[ 'val' ]);
56 56
 
57
-        $title = (Arr::key('title', $data)) ? $data['title'] : $data['name'];
57
+        $title = (Arr::key('title', $data)) ? $data[ 'title' ] : $data[ 'name' ];
58 58
 
59 59
         return $this->_templates->format('file', [
60 60
             'title'        => $title,
61
-            'name'         => $data['name'],
62
-            'templateVars' => $data['templateVars'],
63
-            'attrs'        => $this->_templates->formatAttributes($data, ['name'])
61
+            'name'         => $data[ 'name' ],
62
+            'templateVars' => $data[ 'templateVars' ],
63
+            'attrs'        => $this->_templates->formatAttributes($data, [ 'name' ])
64 64
         ]);
65 65
     }
66 66
 }
Please login to merge, or discard this patch.