Completed
Push — master ( 7d214b...71559c )
by Cheren
05:02
created
src/Cms.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Helper/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Path/Path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
                             continue;
145 145
                         }
146 146
 
147
-                        $files[] = $prefix.$file;
147
+                        $files[] = $prefix . $file;
148 148
                     }
149 149
                 }
150 150
             }
Please login to merge, or discard this patch.
src/Controller/Component/MoveComponent.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/View/Helper/DocumentHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,11 +159,11 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/Utility/Macros.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@
 block discarded – undo
69 69
     /**
70 70
      * Add new value in list.
71 71
      *
72
-     * @param   string|int $key
73
-     * @param   string|int $val
72
+     * @param   string $key
73
+     * @param   string $val
74 74
      * @return  $this
75 75
      */
76 76
     public function set($key, $val)
Please login to merge, or discard this patch.
src/View/Helper/HtmlHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/View/Helper/FormHelper.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
plugin.manifest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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');
Please login to merge, or discard this patch.