Test Failed
Push — ft/setup-command ( 180250...bc1d4c )
by Ben
58:49 queued 36:20
created
src/Filters/Filter.php 1 patch
Spacing   +3 added lines, -3 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\Filters;
6 6
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function render(array $requestInput = []): string
52 52
     {
53
-        $path = $this->viewpath ?? 'chief::back._filters.' . $this->type;
53
+        $path = $this->viewpath ?? 'chief::back._filters.'.$this->type;
54 54
         $this->default($requestInput[$this->name] ?? null);
55 55
 
56 56
         return view($path, ['filter' => $this])->render();
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         }
65 65
 
66 66
         if (!in_array($name, ['name', 'label', 'description', 'query', 'viewpath', 'default'])) {
67
-            throw new \InvalidArgumentException('Cannot set value by ['. $name .'].');
67
+            throw new \InvalidArgumentException('Cannot set value by ['.$name.'].');
68 68
         }
69 69
 
70 70
         $this->values[$name] = $arguments[0];
Please login to merge, or discard this patch.
src/Filters/Types/SelectFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
     public function apply($value = null): Closure
17 17
     {
18
-        return $this->query && $this->query instanceof Closure ? $this->query : function ($query) {
18
+        return $this->query && $this->query instanceof Closure ? $this->query : function($query) {
19 19
             return $query;
20 20
         };
21 21
     }
Please login to merge, or discard this patch.
src/Filters/Types/FilterType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 
7 7
 class FilterType
8 8
 {
9
-    const INPUT = 'input';   // oneliner text (input)
10
-    const SELECT = 'select';  // Select options
9
+    const INPUT = 'input'; // oneliner text (input)
10
+    const SELECT = 'select'; // Select options
11 11
 
12 12
     /**
13 13
      * @var string
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             static::INPUT,
21 21
             static::SELECT,
22 22
         ])) {
23
-            throw new \Exception('Invalid type identifier given [' . $type . '].');
23
+            throw new \Exception('Invalid type identifier given ['.$type.'].');
24 24
         }
25 25
 
26 26
         $this->type = $type;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     public static function fromString(string $type)
30 30
     {
31
-        $class = 'Thinktomorrow\Chief\Filters\Types\\' . ucfirst($type . 'Filter');
31
+        $class = 'Thinktomorrow\Chief\Filters\Types\\'.ucfirst($type.'Filter');
32 32
 
33 33
         return new $class(new static($type));
34 34
     }
Please login to merge, or discard this patch.
src/Management/Assistants/ArchiveAssistant.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function findAll(): Collection
71 71
     {
72
-        return $this->model->archived()->get()->map(function ($model) {
72
+        return $this->model->archived()->get()->map(function($model) {
73 73
             return $this->managers->findByModel($model);
74 74
         });
75 75
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     public function guard($verb): Assistant
101 101
     {
102
-        if (! $this->can($verb)) {
102
+        if (!$this->can($verb)) {
103 103
             NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager);
104 104
         }
105 105
 
Please login to merge, or discard this patch.
src/Management/Exceptions/NotAllowedManagerRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
 
40 40
     public static function notAllowedVerb($verb, Manager $manager)
41 41
     {
42
-        throw new static('Not allowed to '.$verb.' a model. '.ucfirst($verb).' route is not allowed by the ' . $manager->details()->key.' manager.');
42
+        throw new static('Not allowed to '.$verb.' a model. '.ucfirst($verb).' route is not allowed by the '.$manager->details()->key.' manager.');
43 43
     }
44 44
 
45 45
     public static function notAllowedPermission($permission, Manager $manager)
46 46
     {
47
-        throw new static('Not allowed permission for '.$permission.' on a model as managed by the ' . $manager->details()->key.' manager.');
47
+        throw new static('Not allowed permission for '.$permission.' on a model as managed by the '.$manager->details()->key.' manager.');
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/Management/Details/Details.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
     public function __toString()
66 66
     {
67
-        return (string) $this->get('key');
67
+        return (string)$this->get('key');
68 68
     }
69 69
 
70 70
     /**
Please login to merge, or discard this patch.
src/Management/Details/HasDetails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $internal_label = contract($this->model, ProvidesFlatReference::class) ? $this->model->flatReferenceLabel() : $key;
22 22
 
23 23
         // Manager index and header info
24
-        $title = $this->model->title ?? ($this->model->id ? $labelSingular . ' ' . $this->model->id : $labelSingular);
24
+        $title = $this->model->title ?? ($this->model->id ? $labelSingular.' '.$this->model->id : $labelSingular);
25 25
 
26 26
         return new Details(
27 27
             $id,
Please login to merge, or discard this patch.
src/Management/Managers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $registrations = collect($this->register->filterByTag($tag)->all());
52 52
 
53
-        return $registrations->map(function ($registration) {
53
+        return $registrations->map(function($registration) {
54 54
             return $this->instance($registration);
55 55
         });
56 56
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $registrations = collect($this->register->filterByTag($tag)->all());
67 67
 
68
-        return $registrations->map(function ($registration) {
68
+        return $registrations->map(function($registration) {
69 69
             return $this->instance($registration)->details();
70 70
         });
71 71
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         //return array with group name and values
77 77
         $grouped = [];
78 78
 
79
-        $managers = $managers->map(function (Manager $item) {
79
+        $managers = $managers->map(function(Manager $item) {
80 80
             return [
81 81
                 'id'    => $item->details()->id,
82 82
                 'group' => $item->details()->plural,
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $registrations = collect($this->register->all());
92 92
 
93
-        return $registrations->map(function ($registration) {
93
+        return $registrations->map(function($registration) {
94 94
             return $this->instance($registration);
95 95
         });
96 96
     }
Please login to merge, or discard this patch.
src/Management/ManagesPagebuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         
49 49
         $availableChildren = AvailableChildren::forParent($model);
50 50
         
51
-        $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) {
51
+        $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) {
52 52
             return $module->page_id != null && $module->page_id != $model->id;
53 53
         });
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $available_sets = FlatReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray();
58 58
 
59 59
         // Current sections
60
-        $sections = $model->children()->map(function ($section, $index) {
60
+        $sections = $model->children()->map(function($section, $index) {
61 61
             if ($section instanceof TranslatableContract) {
62 62
                 $section->injectTranslationForForm();
63 63
             }
Please login to merge, or discard this patch.