@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function setAttribute($key, $value) |
15 | 15 | { |
16 | - if($key == $this->translatableAttribute && is_array($value)) { |
|
16 | + if ($key == $this->translatableAttribute && is_array($value)) { |
|
17 | 17 | $value = json_encode($value); |
18 | 18 | } |
19 | 19 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Thinktomorrow\Chief\Fields\Types; |
6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | public function name(string $name = null) |
53 | 53 | { |
54 | - if(!is_null($name)) { |
|
54 | + if (!is_null($name)) { |
|
55 | 55 | $this->values['name'] = $name; |
56 | 56 | |
57 | 57 | return $this; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | $name = $this->name(); |
88 | 88 | |
89 | - if(strpos($name, ':locale')) { |
|
89 | + if (strpos($name, ':locale')) { |
|
90 | 90 | return preg_replace('#(:locale)#', $locale, $name); |
91 | 91 | } |
92 | 92 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | } |
176 | 176 | |
177 | 177 | if (!in_array($name, ['label', 'key', 'description', 'column', 'name', 'prepend', 'append'])) { |
178 | - throw new \InvalidArgumentException('Cannot set value by ['. $name .'].'); |
|
178 | + throw new \InvalidArgumentException('Cannot set value by ['.$name.'].'); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | $this->values[$name] = $arguments[0]; |
@@ -51,9 +51,9 @@ |
||
51 | 51 | |
52 | 52 | public function saveFields(Request $request) |
53 | 53 | { |
54 | - foreach($this->fields() as $key => $field) |
|
54 | + foreach ($this->fields() as $key => $field) |
|
55 | 55 | { |
56 | - if(!$setting = Setting::where('key', $key)->first()) { |
|
56 | + if (!$setting = Setting::where('key', $key)->first()) { |
|
57 | 57 | Setting::create([ |
58 | 58 | 'key' => $key, |
59 | 59 | 'value' => $request->get($key, ''), |