Completed
Pull Request — master (#14)
by Beñat
07:49
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.
src/LIN3S/WPFoundation/PostTypes/Fields/Components/FieldComponent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         if (method_exists(static::class, 'definition')) {
30 30
             $definition = static::definition($aName);
31
-            $definition['location'] = $aConnector;
31
+            $definition[ 'location' ] = $aConnector;
32 32
             acf_add_local_field_group($definition);
33 33
         } else {
34 34
             //@deprecated Will be removed in 2.0, and this class will implement FieldComponentInterface
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/Configuration/Theme/Theme.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
         $this->classes();
22 22
         $this->xmlrpc();
23 23
 
24
-        add_action('admin_head', [$this, 'adminHead']);
24
+        add_action('admin_head', [ $this, 'adminHead' ]);
25 25
 
26 26
         add_theme_support('post-thumbnails');
27 27
 
28
-        add_filter('theme_page_templates', [$this, 'templates']);
29
-        add_filter('timber_context', [$this, 'context']);
28
+        add_filter('theme_page_templates', [ $this, 'templates' ]);
29
+        add_filter('timber_context', [ $this, 'context' ]);
30 30
     }
31 31
 
32 32
     public function context(array $context) : array
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Configuration/Acf/Acf.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
     public function __construct()
21 21
     {
22 22
         $customToolbars = $this->wyswygToolbars();
23
-        add_filter('acf/rest_api/post/get_fields', [$this, 'acfGetFields']);
24
-        add_filter('acf/fields/wysiwyg/toolbars', function (array $toolbars) use ($customToolbars) {
23
+        add_filter('acf/rest_api/post/get_fields', [ $this, 'acfGetFields' ]);
24
+        add_filter('acf/fields/wysiwyg/toolbars', function(array $toolbars) use ($customToolbars) {
25 25
             return array_merge($toolbars, $customToolbars);
26 26
         });
27
-        add_filter('admin_menu', function () {
27
+        add_filter('admin_menu', function() {
28 28
             if (!acf_current_user_can_admin()) {
29 29
                 $this->removeSectionsForNotAdminUsers();
30 30
             }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function acfGetFields(array $data) : array
35 35
     {
36 36
         if (!empty($data)) {
37
-            array_walk_recursive($data, ['self', 'serializeFeaturedImage']);
37
+            array_walk_recursive($data, [ 'self', 'serializeFeaturedImage' ]);
38 38
         }
39 39
 
40 40
         return $data;
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Configuration/Assets/Assets.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
     public function __construct()
21 21
     {
22 22
         if (true === WP_DEBUG) {
23
-            add_action('wp_enqueue_scripts', [$this, 'developmentAssets']);
23
+            add_action('wp_enqueue_scripts', [ $this, 'developmentAssets' ]);
24 24
         } else {
25
-            add_action('wp_enqueue_scripts', [$this, 'productionAssets']);
25
+            add_action('wp_enqueue_scripts', [ $this, 'productionAssets' ]);
26 26
         }
27
-        add_action('admin_enqueue_scripts', [$this, 'adminAssets']);
27
+        add_action('admin_enqueue_scripts', [ $this, 'adminAssets' ]);
28 28
     }
29 29
 
30 30
     public function developmentAssets() : void
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     protected function addScript(
43 43
         string $name,
44 44
         string $from = AssetsInterface::ASSETS_JS,
45
-        array $dependencies = ['jquery'],
45
+        array $dependencies = [ 'jquery' ],
46 46
         string $version = '1.0.0',
47 47
         bool $inFooter = true,
48 48
         ?string $ajaxUrl = null
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     protected function addStylesheet(
60 60
         string $name,
61 61
         string $from = AssetsInterface::CSS,
62
-        array $dependencies = [],
62
+        array $dependencies = [ ],
63 63
         string $version = '1.0.0',
64 64
         string $media = 'all'
65 65
     ) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     protected function registerAjaxUrls(string $name, string $ajaxUrl) : void
87 87
     {
88 88
         if (false === is_array($ajaxUrl)) {
89
-            $ajaxUrl = [$ajaxUrl];
89
+            $ajaxUrl = [ $ajaxUrl ];
90 90
         }
91 91
         foreach ($ajaxUrl as $url) {
92 92
             wp_localize_script($name, $url, [
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/Configuration/Login/Login.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 {
20 20
     public function __construct()
21 21
     {
22
-        add_filter('login_errors', [$this, 'errors']);
23
-        add_action('login_enqueue_scripts', [$this, 'logo']);
24
-        add_filter('login_message', [$this, 'message']);
25
-        add_filter('login_headertitle', [$this, 'title']);
26
-        add_filter('login_headerurl', [$this, 'url']);
22
+        add_filter('login_errors', [ $this, 'errors' ]);
23
+        add_action('login_enqueue_scripts', [ $this, 'logo' ]);
24
+        add_filter('login_message', [ $this, 'message' ]);
25
+        add_filter('login_headertitle', [ $this, 'title' ]);
26
+        add_filter('login_headerurl', [ $this, 'url' ]);
27 27
     }
28 28
 
29 29
     public function errors() : void
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         margin-top: 0;
47 47
     }
48 48
 </style>
49
-EOL;
49
+eol;
50 50
     }
51 51
 
52 52
     public function message() : void
Please login to merge, or discard this patch.