@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public function __construct($name, $type = 'accordion', $config = []) |
8 | 8 | { |
9 | - parent::__construct($name, $type, $config); |
|
9 | + parent::__construct($name, $type, $config); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | public function setOpen($value = 1) |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function transform($config) |
33 | 33 | { |
34 | - foreach ($config as $key => $value ) { |
|
34 | + foreach ($config as $key => $value) { |
|
35 | 35 | if ($this->shouldTransformValue($key, $config)) { |
36 | 36 | $config = $this->transformConfig($config); |
37 | 37 | $config[$key] = $this->transformValue($value); |
@@ -278,11 +278,11 @@ |
||
278 | 278 | $id = trim($id, '#'); |
279 | 279 | $class = trim($class, '.'); |
280 | 280 | |
281 | - if (! empty($id)) { |
|
281 | + if (!empty($id)) { |
|
282 | 282 | $this->setAttr('id', $id); |
283 | 283 | } |
284 | 284 | |
285 | - if (! empty($class)) { |
|
285 | + if (!empty($class)) { |
|
286 | 286 | $class = str_replace('.', ' ', $class); |
287 | 287 | $this->setAttr('class', $class); |
288 | 288 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $config['_has_custom_collapsed_key'] = true; |
46 | 46 | } else { |
47 | 47 | $fieldKey = preg_replace('/^field_/', '', $fieldKey); |
48 | - $config['collapsed'] = $this->getName() . '_' . $fieldKey; |
|
48 | + $config['collapsed'] = $this->getName().'_'.$fieldKey; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | return $config; |
@@ -74,6 +74,6 @@ discard block |
||
74 | 74 | */ |
75 | 75 | private function getDefaultButtonLabel() |
76 | 76 | { |
77 | - return 'Add ' . $this->singularize($this->getLabel()); |
|
77 | + return 'Add '.$this->singularize($this->getLabel()); |
|
78 | 78 | } |
79 | 79 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | return $this->getBuilder()->getField($value)->getKey(); |
35 | 35 | } |
36 | 36 | |
37 | - return $value; |
|
37 | + return $value; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function transformConfig($config) |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function transformValue($value) |
32 | 32 | { |
33 | - if ($this->getBuilder()->fieldExists($value)){ |
|
33 | + if ($this->getBuilder()->fieldExists($value)) { |
|
34 | 34 | return $this->getBuilder()->getField($value)->getKey(); |
35 | 35 | } |
36 | 36 |
@@ -85,7 +85,7 @@ |
||
85 | 85 | { |
86 | 86 | foreach ($config as $key => &$value) { |
87 | 87 | if (array_key_exists('_field_does_not_exist', $config)) { |
88 | - foreach($parentConfig as $parentField) { |
|
88 | + foreach ($parentConfig as $parentField) { |
|
89 | 89 | if (is_array($parentField) && |
90 | 90 | array_key_exists('name', $parentField) && |
91 | 91 | $parentField['name'] === $config['_field_does_not_exist']) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | private function buildLayouts() |
49 | 49 | { |
50 | - return array_map(function ($layout) { |
|
50 | + return array_map(function($layout) { |
|
51 | 51 | $layout = ($layout instanceof Builder) ? $layout->build() : $layout; |
52 | 52 | return $this->transformLayout($layout); |
53 | 53 | }, $this->getLayouts()); |
@@ -158,6 +158,6 @@ discard block |
||
158 | 158 | */ |
159 | 159 | private function getDefaultButtonLabel() |
160 | 160 | { |
161 | - return 'Add ' . $this->singularize($this->getLabel()); |
|
161 | + return 'Add '.$this->singularize($this->getLabel()); |
|
162 | 162 | } |
163 | 163 | } |