Completed
Pull Request — master (#14)
by Beñat
07:31
created
fixtures/LIN3S/WPFoundation/PageFields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
      */
31 31
     public function components()
32 32
     {
33
-        return [];
33
+        return [ ];
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
fixtures/LIN3S/WPFoundation/CustomPostTypeFields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
      */
31 31
     public function components()
32 32
     {
33
-        return [];
33
+        return [ ];
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
fixtures/LIN3S/WPFoundation/Fields.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function components()
27 27
     {
28
-        return [];
28
+        return [ ];
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
spec/LIN3S/WPFoundation/Configuration/Theme/ThemeSpec.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
 
43 43
     function it_should_return_templates()
44 44
     {
45
-        $this->templates(['my-template' => 'MyTemplate'])->shouldReturn([
45
+        $this->templates([ 'my-template' => 'MyTemplate' ])->shouldReturn([
46 46
             'my-template' => 'MyTemplate', 'dummy-template' => 'DummyTemplate',
47 47
         ]);
48 48
     }
49 49
 
50 50
     function it_should_return_context()
51 51
     {
52
-        $this->context(['heder-menu' => 'Header Menu'])->shouldReturn(['heder-menu' => 'Header Menu']);
52
+        $this->context([ 'heder-menu' => 'Header Menu' ])->shouldReturn([ 'heder-menu' => 'Header Menu' ]);
53 53
     }
54 54
 }
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Assets.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace LIN3S\WPFoundation;
15 15
 
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
     public function __construct()
29 29
     {
30 30
         defined('WP_DEBUG') && true === WP_DEBUG
31
-            ? add_action('wp_enqueue_scripts', [$this, 'developmentAssets'])
32
-            : add_action('wp_enqueue_scripts', [$this, 'productionAssets']);
31
+            ? add_action('wp_enqueue_scripts', [ $this, 'developmentAssets' ])
32
+            : add_action('wp_enqueue_scripts', [ $this, 'productionAssets' ]);
33 33
 
34
-        add_action('admin_enqueue_scripts', [$this, 'adminAssets']);
34
+        add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]);
35 35
     }
36 36
 
37 37
     protected function addScript(
38 38
         string $name,
39 39
         string $from,
40
-        array $dependencies = ['jquery'],
40
+        array $dependencies = [ 'jquery' ],
41 41
         string $version = '1.0.0',
42 42
         bool $inFooter = true,
43 43
         ?string $ajaxUrl = null
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     protected function addStylesheet(
55 55
         string $name,
56 56
         string $from,
57
-        array $dependencies = [],
57
+        array $dependencies = [ ],
58 58
         string $version = '1.0.0',
59 59
         string $media = 'all'
60 60
     ) {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     protected function registerAjaxUrls(string $name, string $ajaxUrl) : void
82 82
     {
83 83
         if (false === is_array($ajaxUrl)) {
84
-            $ajaxUrl = [$ajaxUrl];
84
+            $ajaxUrl = [ $ajaxUrl ];
85 85
         }
86 86
         foreach ($ajaxUrl as $url) {
87 87
             wp_localize_script($name, $url, [
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Ajax.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace LIN3S\WPFoundation;
15 15
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function __construct()
26 26
     {
27
-        add_action('wp_ajax_nopriv_' . $this->action(), [$this, 'ajax']);
28
-        add_action('wp_ajax_' . $this->action(), [$this, 'ajax']);
27
+        add_action('wp_ajax_nopriv_' . $this->action(), [ $this, 'ajax' ]);
28
+        add_action('wp_ajax_' . $this->action(), [ $this, 'ajax' ]);
29 29
     }
30 30
 }
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Acf.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace LIN3S\WPFoundation;
15 15
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     public function __construct()
25 25
     {
26 26
         $customToolbars = $this->wysiwygToolbars();
27
-        add_filter('acf/rest_api/post/get_fields', [$this, 'acfGetFields']);
28
-        add_filter('acf/fields/wysiwyg/toolbars', function (array $toolbars) use ($customToolbars) {
27
+        add_filter('acf/rest_api/post/get_fields', [ $this, 'acfGetFields' ]);
28
+        add_filter('acf/fields/wysiwyg/toolbars', function(array $toolbars) use ($customToolbars) {
29 29
             return array_merge($toolbars, $customToolbars);
30 30
         });
31 31
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function acfGetFields(array $data) : array
34 34
     {
35 35
         if (!empty($data)) {
36
-            array_walk_recursive($data, ['self', 'serializeFeaturedImage']);
36
+            array_walk_recursive($data, [ 'self', 'serializeFeaturedImage' ]);
37 37
         }
38 38
 
39 39
         return $data;
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Login.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace LIN3S\WPFoundation;
15 15
 
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function __construct()
29 29
     {
30
-        add_filter('login_errors', [$this, 'errors']);
31
-        add_action('login_enqueue_scripts', [$this, 'logo']);
32
-        add_filter('login_message', [$this, 'message']);
33
-        add_filter('login_headertitle', [$this, 'title']);
34
-        add_filter('login_headerurl', [$this, 'url']);
30
+        add_filter('login_errors', [ $this, 'errors' ]);
31
+        add_action('login_enqueue_scripts', [ $this, 'logo' ]);
32
+        add_filter('login_message', [ $this, 'message' ]);
33
+        add_filter('login_headertitle', [ $this, 'title' ]);
34
+        add_filter('login_headerurl', [ $this, 'url' ]);
35 35
     }
36 36
 
37 37
     public function logo() : void
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         margin-top: 0;
51 51
     }
52 52
 </style>
53
-EOL;
53
+eol;
54 54
     }
55 55
 
56 56
     public function title() : string
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Menus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace LIN3S\WPFoundation;
15 15
 
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function __construct()
24 24
     {
25
-        add_action('init', [$this, 'menus']);
25
+        add_action('init', [ $this, 'menus' ]);
26 26
     }
27 27
 }
Please login to merge, or discard this patch.