Passed
Pull Request — master (#303)
by Ben
35:24
created
src/States/Publishable/CheckPreviewTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         if (PreviewMode::fromRequest()->check()) {
12 12
             Session::now('note.default', 'U bekijkt een preview.');
13 13
             return true;
14
-        } else {
14
+        }else {
15 15
             return false;
16 16
         }
17 17
     }
Please login to merge, or discard this patch.
src/Fields/Types/PhoneNumberField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Thinktomorrow\Chief\Fields\Types;
5 5
 
Please login to merge, or discard this patch.
src/Fields/Types/RangeField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Thinktomorrow\Chief\Fields\Types;
5 5
 
Please login to merge, or discard this patch.
src/Fields/Types/NumberField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 namespace Thinktomorrow\Chief\Fields\Types;
5 5
 
Please login to merge, or discard this patch.
src/Management/Assistants/ArchiveAssistant.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->manager  = $manager;
32 32
         $this->model    = $manager->model();
33 33
 
34
-        if(!$this->model instanceof StatefulContract){
34
+        if (!$this->model instanceof StatefulContract) {
35 35
             throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract.');
36 36
         }
37 37
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function findAll(): Collection
69 69
     {
70
-        return $this->model->archived()->get()->map(function ($model) {
70
+        return $this->model->archived()->get()->map(function($model) {
71 71
             return $this->managers->findByModel($model);
72 72
         });
73 73
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function guard($verb): Assistant
99 99
     {
100
-        if (! $this->can($verb)) {
100
+        if (!$this->can($verb)) {
101 101
             NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager);
102 102
         }
103 103
 
Please login to merge, or discard this patch.
src/Management/Assistants/PublishAssistant.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $this->manager = $manager;
34 34
         $this->model = $manager->model();
35 35
 
36
-        if(!$this->model instanceof StatefulContract){
36
+        if (!$this->model instanceof StatefulContract) {
37 37
             throw new \InvalidArgumentException('PublishAssistant requires the model to implement the StatefulContract.');
38 38
         }
39 39
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function findAll(): Collection
76 76
     {
77
-        return $this->model->published()->get()->map(function ($model) {
77
+        return $this->model->published()->get()->map(function($model) {
78 78
             return $this->managers->findByModel($model);
79 79
         });
80 80
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
     public function guard($verb): Assistant
98 98
     {
99
-        if (! $this->can($verb)) {
99
+        if (!$this->can($verb)) {
100 100
             NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager);
101 101
         }
102 102
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
             $class = 'text-warning';
122 122
         }
123 123
 
124
-        $statusAsLabel = '<span class="font-bold '. $class .'"><em>' . $label . '</em></span>';
124
+        $statusAsLabel = '<span class="font-bold '.$class.'"><em>'.$label.'</em></span>';
125 125
 
126 126
         if (!$plain && $this->hasPreviewUrl()) {
127
-            $statusAsLabel =  '<a href="'.$this->previewUrl().'" target="_blank">'. $statusAsLabel .'</a>';
127
+            $statusAsLabel = '<a href="'.$this->previewUrl().'" target="_blank">'.$statusAsLabel.'</a>';
128 128
         }
129 129
 
130 130
         return $statusAsLabel;
Please login to merge, or discard this patch.
src/States/State/StateMachine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     {
90 90
         $transitions = [];
91 91
 
92
-        foreach($this->transitions as $transitionKey => $transition){
92
+        foreach ($this->transitions as $transitionKey => $transition) {
93 93
             if (false !== array_search($this->statefulContract->state(), $transition['from'])) {
94 94
                 $transitions[] = $transitionKey;
95 95
             }
Please login to merge, or discard this patch.
src/States/PageStatePresenter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $class = $this->pageState->isOnline() ? 'text-success' : 'text-warning';
30 30
 
31
-        return '<span class="inline-xs stack-s '.$class.'">' . $this->stateAsLabel() . '</span>';
31
+        return '<span class="inline-xs stack-s '.$class.'">'.$this->stateAsLabel().'</span>';
32 32
     }
33 33
 
34 34
     /**
Please login to merge, or discard this patch.
src/Urls/MemoizedUrlRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     public static function getByModel(Model $model)
46 46
     {
47
-        return chiefMemoize('url-records-get-by-model', function ($model) {
47
+        return chiefMemoize('url-records-get-by-model', function($model) {
48 48
             return parent::getByModel($model);
49 49
         }, [$model]);
50 50
     }
Please login to merge, or discard this patch.