Completed
Pull Request — master (#23)
by Gorka
05:12
created
spec/LIN3S/WPFoundation/PostTypes/Fields/FieldsSpec.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 
12 12
 namespace spec\LIN3S\WPFoundation\PostTypes\Fields;
13 13
 
14
-use LIN3S\WordPressPhpSpecBridge\ObjectBehavior;
15 14
 use LIN3S\WPFoundation\PostTypes\Fields\Components\FieldComponentInterface;
16 15
 use LIN3S\WPFoundation\PostTypes\Fields\PostTypeAndTemplateFieldConnector;
16
+use LIN3S\WordPressPhpSpecBridge\ObjectBehavior;
17 17
 
18 18
 /**
19 19
  * Spec of Fields class.
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
         FieldComponentInterface $component,
66 66
         PostTypeAndTemplateFieldConnector $connector
67 67
     ) {
68
-        $connector->connector()->shouldBeCalled()->willReturn([]);
68
+        $connector->connector()->shouldBeCalled()->willReturn([ ]);
69 69
         $connector->name()->shouldBeCalled()->willReturn('name');
70
-        $component->init('name', [])->shouldBeCalled();
70
+        $component->init('name', [ ])->shouldBeCalled();
71 71
 
72 72
         $this->beConstructedWith([
73 73
             $component
Please login to merge, or discard this patch.
src/LIN3S/WPFoundation/PostTypes/Fields/Fields.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * Constructor.
44 44
      */
45 45
     public function __construct(
46
-        $components = [],
46
+        $components = [ ],
47 47
         $connector = null
48 48
     )
49 49
     {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function fields()
72 72
     {
73 73
         foreach ($this->components() as $component) {
74
-            if($component instanceof FieldComponentInterface) {
74
+            if ($component instanceof FieldComponentInterface) {
75 75
                 return $component->init($this->name, $this->connector());
76 76
             }
77 77
             if (false === class_exists($component)) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     public function connector()
103 103
     {
104 104
         if ($this->connector === null) {
105
-            return [];
105
+            return [ ];
106 106
         }
107 107
 
108 108
         return $this->connector->connector();
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
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         );
35 35
         if (method_exists(static::class, 'definition')) {
36 36
             $definition = static::definition($aName);
37
-            $definition['location'] = $aConnector;
37
+            $definition[ 'location' ] = $aConnector;
38 38
             acf_add_local_field_group($definition);
39 39
         } else {
40 40
             return new static($aName, $aConnector);
Please login to merge, or discard this patch.