@@ -100,7 +100,7 @@ |
||
100 | 100 | */ |
101 | 101 | private function buildFields() |
102 | 102 | { |
103 | - $fields = array_map(function ($field) { |
|
103 | + $fields = array_map(function($field) { |
|
104 | 104 | return ($field instanceof Builder) ? $field->build() : $field; |
105 | 105 | }, $this->getFields()); |
106 | 106 |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | /** |
100 | 100 | * Build the final config array. Build any other builders that may exist |
101 | 101 | * in the config. |
102 | - * @return array Final field config |
|
102 | + * @return string Final field config |
|
103 | 103 | */ |
104 | 104 | public function build() |
105 | 105 | { |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | /** |
552 | - * @return array |
|
552 | + * @return NamedBuilder[] |
|
553 | 553 | */ |
554 | 554 | public function getFields() |
555 | 555 | { |
@@ -64,7 +64,7 @@ |
||
64 | 64 | */ |
65 | 65 | private function buildLayouts() |
66 | 66 | { |
67 | - return array_map(function ($layout) { |
|
67 | + return array_map(function($layout) { |
|
68 | 68 | $layout = ($layout instanceof Builder) ? $layout->build() : $layout; |
69 | 69 | return $this->transformLayout($layout); |
70 | 70 | }, $this->getLayouts()); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function transform($config) |
33 | 33 | { |
34 | - array_walk($config, function (&$value, $key) { |
|
34 | + array_walk($config, function(&$value, $key) { |
|
35 | 35 | if (in_array($key, $this->getKeys(), true)) { |
36 | 36 | $value = $this->transformValue($value); |
37 | 37 | } else { |
@@ -73,7 +73,7 @@ |
||
73 | 73 | if (array_key_exists('collapsed', $config)) { |
74 | 74 | $fieldKey = $this->fieldsBuilder->getField($config['collapsed'])->getKey(); |
75 | 75 | $fieldKey = preg_replace('/^field_/', '', $fieldKey); |
76 | - $config['collapsed'] = $this->getName() . '_' . $fieldKey; |
|
76 | + $config['collapsed'] = $this->getName().'_'.$fieldKey; |
|
77 | 77 | } |
78 | 78 | return $config; |
79 | 79 | } |
@@ -12,10 +12,10 @@ |
||
12 | 12 | * Define a list of array keys `transform` should not be recursed upon. |
13 | 13 | * @var array |
14 | 14 | */ |
15 | - protected $dontRecurseKeys = ['fields', 'sub_fields', 'layouts']; |
|
15 | + protected $dontRecurseKeys = ['fields', 'sub_fields', 'layouts']; |
|
16 | 16 | |
17 | - protected function shouldRecurse($value, $key) |
|
18 | - { |
|
19 | - return is_array($value) && !in_array($key, $this->dontRecurseKeys, true); |
|
20 | - } |
|
17 | + protected function shouldRecurse($value, $key) |
|
18 | + { |
|
19 | + return is_array($value) && !in_array($key, $this->dontRecurseKeys, true); |
|
20 | + } |
|
21 | 21 | } |