Test Failed
Push — ft/fields-refactor ( e6f9ef...b1c0b9 )
by Ben
32:56
created
src/Concerns/Translatable/StraightTranslatable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Fields/Types/Field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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];
Please login to merge, or discard this patch.
src/Settings/SettingFieldsManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
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, ''),
Please login to merge, or discard this patch.