@@ -11,9 +11,9 @@ |
||
| 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. |
@@ -65,9 +65,9 @@ |
||
| 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 |
@@ -43,7 +43,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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(); |
@@ -34,7 +34,7 @@ |
||
| 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); |