@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | continue; |
76 | 76 | } |
77 | 77 | |
78 | - $method = 'get' . ucfirst($key); |
|
78 | + $method = 'get'.ucfirst($key); |
|
79 | 79 | |
80 | 80 | // Reject from list if value does not match expected one |
81 | 81 | if ($value && $value == $field->$method()) { |
@@ -91,30 +91,30 @@ discard block |
||
91 | 91 | |
92 | 92 | public function render(): string |
93 | 93 | { |
94 | - return array_reduce($this->fields, function (string $carry, Field $field) { |
|
95 | - return $carry . $field->render(); |
|
94 | + return array_reduce($this->fields, function(string $carry, Field $field) { |
|
95 | + return $carry.$field->render(); |
|
96 | 96 | }, ''); |
97 | 97 | } |
98 | 98 | |
99 | 99 | public function keyed($key): Fields |
100 | 100 | { |
101 | - $keys = (array) $key; |
|
101 | + $keys = (array)$key; |
|
102 | 102 | |
103 | - return new static(array_filter($this->fields, function (Field $field) use ($keys) { |
|
103 | + return new static(array_filter($this->fields, function(Field $field) use ($keys) { |
|
104 | 104 | return in_array($field->getKey(), $keys); |
105 | 105 | })); |
106 | 106 | } |
107 | 107 | |
108 | 108 | public function tagged($tag): Fields |
109 | 109 | { |
110 | - return new static(array_filter($this->fields, function (Field $field) use ($tag) { |
|
110 | + return new static(array_filter($this->fields, function(Field $field) use ($tag) { |
|
111 | 111 | return $field->tagged($tag); |
112 | 112 | })); |
113 | 113 | } |
114 | 114 | |
115 | 115 | public function untagged(): Fields |
116 | 116 | { |
117 | - return new static(array_filter($this->fields, function (Field $field) { |
|
117 | + return new static(array_filter($this->fields, function(Field $field) { |
|
118 | 118 | return $field->untagged(); |
119 | 119 | })); |
120 | 120 | } |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | public function offsetSet($offset, $value) |
164 | 164 | { |
165 | 165 | if (!$value instanceof Field) { |
166 | - throw new \InvalidArgumentException('Passed value must be of type ' . Field::class); |
|
166 | + throw new \InvalidArgumentException('Passed value must be of type '.Field::class); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | $this->fields[$offset] = $value; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | private function validateFields(array $fields) |
195 | 195 | { |
196 | - array_map(function (Field $field) { |
|
196 | + array_map(function(Field $field) { |
|
197 | 197 | }, $fields); |
198 | 198 | } |
199 | 199 |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | private function defaultEloquentValueResolver(): \Closure |
239 | 239 | { |
240 | - return function (Model $model = null, $locale = null) { |
|
240 | + return function(Model $model = null, $locale = null) { |
|
241 | 241 | if (!$model) { |
242 | 242 | return $this->value; |
243 | 243 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | return $this->isLocalized() |
392 | 392 | ? 'chief::back._formgroups.fieldgroup_translatable' |
393 | - : 'chief::back._fields.' . $this->type->get(); |
|
393 | + : 'chief::back._fields.'.$this->type->get(); |
|
394 | 394 | } |
395 | 395 | |
396 | 396 | public function viewData(array $viewData = []): Field |