Test Failed
Push — ft/setup-command ( 180250...bc1d4c )
by Ben
58:49 queued 36:20
created
src/Media/MediaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\Media;
6 6
 
Please login to merge, or discard this patch.
src/Settings/SettingsManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $this->fetch();
14 14
 
15
-        if (! isset($this->values[$key])) {
15
+        if (!isset($this->values[$key])) {
16 16
             return $default;
17 17
         }
18 18
         
Please login to merge, or discard this patch.
src/Settings/SettingsServiceProvider.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 register()
15 15
     {
16
-        $this->app->singleton(SettingsManager::class, function ($app) {
16
+        $this->app->singleton(SettingsManager::class, function($app) {
17 17
             return new SettingsManager();
18 18
         });
19 19
     }
Please login to merge, or discard this patch.
src/Settings/Setting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     private function defaultField()
46 46
     {
47 47
         return InputField::make($this->key)
48
-                    ->label(ucfirst(str_replace(['-','_','.'], ' ', $this->key)));
48
+                    ->label(ucfirst(str_replace(['-', '_', '.'], ' ', $this->key)));
49 49
     }
50 50
 
51 51
     public static function refreshFieldsFromConfig()
Please login to merge, or discard this patch.
src/FlatReferences/FlatReferencePresenter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
     public static function toSelectValues(Collection $collection): Collection
10 10
     {
11
-        return $collection->map(function (ProvidesFlatReference $item) {
11
+        return $collection->map(function(ProvidesFlatReference $item) {
12 12
             return [
13 13
                 'id'    => $item->flatReference()->get(),
14 14
                 'label' => $item->flatReferenceLabel(),
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $grouped = [];
23 23
 
24
-        static::toSelectValues($collection)->each(function ($item) use (&$grouped) {
24
+        static::toSelectValues($collection)->each(function($item) use (&$grouped) {
25 25
             if (isset($grouped[$item['group']])) {
26 26
                 $grouped[$item['group']]['values'][] = $item;
27
-            } else {
27
+            }else {
28 28
                 $grouped[$item['group']] = ['group' => $item['group'], 'values' => [$item]];
29 29
             }
30 30
         });
Please login to merge, or discard this patch.
src/FlatReferences/FlatReferenceCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@
 block discarded – undo
21 21
             $referenceStrings = [];
22 22
         }
23 23
 
24
-        return (new Collection($referenceStrings))->reject(function ($referenceString) {
24
+        return (new Collection($referenceStrings))->reject(function($referenceString) {
25 25
             return is_null($referenceString);
26
-        })->map(function ($referenceString) {
26
+        })->map(function($referenceString) {
27 27
             return FlatReferenceFactory::fromString($referenceString)->instance();
28 28
         });
29 29
     }
30 30
 
31 31
     public function toFlatReferences(): Collection
32 32
     {
33
-        return (new Collection($this->all()))->map(function (ProvidesFlatReference $item) {
33
+        return (new Collection($this->all()))->map(function(ProvidesFlatReference $item) {
34 34
             return $item->flatReference()->get();
35 35
         });
36 36
     }
Please login to merge, or discard this patch.
src/FlatReferences/FlatReferenceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     public static function fromString(string $reference): FlatReference
8 8
     {
9 9
         if (false == strpos($reference, '@')) {
10
-            throw new \InvalidArgumentException('Invalid reference composition. A flat reference should honour schema <class>@<id>. [' . $reference . '] was passed instead.');
10
+            throw new \InvalidArgumentException('Invalid reference composition. A flat reference should honour schema <class>@<id>. ['.$reference.'] was passed instead.');
11 11
         }
12 12
 
13 13
         list($className, $id) = explode('@', $reference);
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
         $instance = app($className);
16 16
         $instance->{$instance->getKeyName()} = $id;
17 17
 
18
-        if (! method_exists($instance, 'flatReference')) {
19
-            throw new \InvalidArgumentException('Instance created from model reference [' . $reference . '] was expected to have a method of flatReference() but is has not.');
18
+        if (!method_exists($instance, 'flatReference')) {
19
+            throw new \InvalidArgumentException('Instance created from model reference ['.$reference.'] was expected to have a method of flatReference() but is has not.');
20 20
         }
21 21
 
22 22
         return $instance->flatReference();
Please login to merge, or discard this patch.
src/Pages/PublishedFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     public function apply($value = null): Closure
21 21
     {
22
-        return function ($query) use ($value) {
22
+        return function($query) use ($value) {
23 23
             if ($value == 'all') {
24 24
                 return $query;
25 25
             }
Please login to merge, or discard this patch.
src/Sets/SetReference.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         // Constraints
36 36
         if (!isset($values['action'])) {
37
-            throw new \InvalidArgumentException('Set reference array is missing required values for the "action" keys. Given: ' . print_r($values, true));
37
+            throw new \InvalidArgumentException('Set reference array is missing required values for the "action" keys. Given: '.print_r($values, true));
38 38
         }
39 39
 
40 40
         return new static(
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $sets = config('thinktomorrow.chief.sets', []);
51 51
 
52
-        return collect($sets)->map(function ($set, $key) {
52
+        return collect($sets)->map(function($set, $key) {
53 53
             return SetReference::fromArray($key, $set);
54 54
         });
55 55
     }
56 56
 
57 57
     public static function find($key): ?SetReference
58 58
     {
59
-        return static::all()->filter(function ($ref) use ($key) {
59
+        return static::all()->filter(function($ref) use ($key) {
60 60
             return $ref->key() == $key;
61 61
         })->first();
62 62
     }
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 
74 74
         $this->validateAction($class, $method);
75 75
 
76
-        $result = call_user_func_array([app($class),$method], $this->parameters);
76
+        $result = call_user_func_array([app($class), $method], $this->parameters);
77 77
 
78
-        if (! $result instanceof Set && $result instanceof Collection) {
78
+        if (!$result instanceof Set && $result instanceof Collection) {
79 79
             return new Set($result->all(), $this->key);
80 80
         }
81 81
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     private static function validateAction($class, $method)
109 109
     {
110
-        if (! class_exists($class)) {
110
+        if (!class_exists($class)) {
111 111
             throw new \InvalidArgumentException('The class ['.$class.'] isn\'t a valid class reference or does not exist in the chief-settings.sets config entry.');
112 112
         }
113 113
 
Please login to merge, or discard this patch.