Completed
Pull Request — master (#313)
by Philippe
33:32 queued 57s
created
src/HealthMonitor/Checks/HomepageAccessibleCheck.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\HealthMonitor\Checks;
6 6
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
     private function get_http_response_code(string $url)
18 18
     {
19
-        if ($url =='') {
19
+        if ($url == '') {
20 20
             return false;
21 21
         }
22 22
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function message(): string
36 36
     {
37
-        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
37
+        return 'Het lijkt erop dat de homepagina niet meer bereikbaar is. <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Kies een nieuwe</a>.';
38 38
     }
39 39
 
40 40
     public function notifiers(): array
Please login to merge, or discard this patch.
src/HealthMonitor/Checks/HomepageSetCheck.php 1 patch
Spacing   +2 added lines, -2 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\HealthMonitor\Checks;
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function message(): string
20 20
     {
21
-        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'. route('chief.back.settings.edit') .'" class="text-secondary-800 underline hover:text-white">Settings</a>';
21
+        return 'Het lijkt erop dat er geen homepagina ingesteld is. Stel er een in hier: <a href="'.route('chief.back.settings.edit').'" class="text-secondary-800 underline hover:text-white">Settings</a>';
22 22
     }
23 23
 
24 24
     public function notifiers(): array
Please login to merge, or discard this patch.
src/HealthMonitor/Monitor.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\HealthMonitor;
6 6
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         foreach ($this->checks as $check) {
23 23
             $checkInstance = app($check);
24 24
             
25
-            if (! $checkInstance instanceof HealthCheck) {
25
+            if (!$checkInstance instanceof HealthCheck) {
26 26
                 throw new InvalidClassException('Checks must implement Healthcheck interface.');
27 27
             }
28 28
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                     app($notifier)->onFailure($checkInstance);
34 34
                 }
35 35
                 return;
36
-            } else {
36
+            }else {
37 37
                 foreach ($notifiers as $notifier) {
38 38
                     app($notifier)->onSuccess($checkInstance);
39 39
                 }
Please login to merge, or discard this patch.
src/Management/ManagesPagebuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $availableChildren = AvailableChildren::forParent($model);
51 51
 
52
-        $modules = $availableChildren->onlyModules()->reject(function ($module) use ($model) {
52
+        $modules = $availableChildren->onlyModules()->reject(function($module) use ($model) {
53 53
             return $module->page_id != null && $module->page_id != $model->id;
54 54
         });
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $available_sets = FlatReferencePresenter::toGroupedSelectValues($availableChildren->onlySets())->toArray();
59 59
 
60 60
         // Current sections
61
-        $sections = $model->children()->map(function ($section, $index) {
61
+        $sections = $model->children()->map(function($section, $index) {
62 62
             if ($section instanceof TranslatableContract) {
63 63
                 $section->injectTranslationForForm();
64 64
             }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     private function findEditUrl($model): ?string
94 94
     {
95
-        if (! $model instanceof ManagedModel) {
95
+        if (!$model instanceof ManagedModel) {
96 96
             return null;
97 97
         }
98 98
 
Please login to merge, or discard this patch.
src/Modules/Application/DeleteModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
             // Mark the slug as deleted to avoid any conflict with newly created modules with the same slug.
23 23
             $module->update([
24
-                'slug' => $module->slug . $this->appendDeleteMarker(),
24
+                'slug' => $module->slug.$this->appendDeleteMarker(),
25 25
             ]);
26 26
 
27 27
             $module->delete();
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
 
36 36
     private function appendDeleteMarker(): string
37 37
     {
38
-        return '_DELETED_' . time();
38
+        return '_DELETED_'.time();
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
src/Fields/Types/FieldType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@  discard block
 block discarded – undo
6 6
 
7 7
 class FieldType
8 8
 {
9
-    const INPUT = 'input';   // oneliner text (input)
10
-    const TEXT = 'text';    // Plain text (textarea)
9
+    const INPUT = 'input'; // oneliner text (input)
10
+    const TEXT = 'text'; // Plain text (textarea)
11 11
     const NUMBER = 'number'; // number
12 12
     const RANGE = 'range'; // range slider
13
-    const DATE = 'date';    // Timestamp input
14
-    const PHONENUMBER = 'phonenumber';    // Timestamp input
15
-    const HTML = 'html';    // Html text (wysiwyg)
16
-    const SELECT = 'select';  // Select options
17
-    const MEDIA = 'media';  // media file (slim uploader)
18
-    const DOCUMENT = 'document';  // documents
19
-    const RADIO = 'radio';  // media file (slim uploader)
20
-    const PAGEBUILDER = 'pagebuilder';  // the most special field there is...
13
+    const DATE = 'date'; // Timestamp input
14
+    const PHONENUMBER = 'phonenumber'; // Timestamp input
15
+    const HTML = 'html'; // Html text (wysiwyg)
16
+    const SELECT = 'select'; // Select options
17
+    const MEDIA = 'media'; // media file (slim uploader)
18
+    const DOCUMENT = 'document'; // documents
19
+    const RADIO = 'radio'; // media file (slim uploader)
20
+    const PAGEBUILDER = 'pagebuilder'; // the most special field there is...
21 21
 
22 22
     /** @var string */
23 23
     private $type;
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public static function fromString(string $type): self
38 38
     {
39
-        $class = 'Thinktomorrow\Chief\Fields\Types\\' . ucfirst($type . 'Field');
39
+        $class = 'Thinktomorrow\Chief\Fields\Types\\'.ucfirst($type.'Field');
40 40
 
41 41
         return new $class(new static($type));
42 42
     }
Please login to merge, or discard this patch.
src/Management/AbstractManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             return $this->indexPagination($builder);
84 84
         }
85 85
         
86
-        return $builder->get()->map(function ($model) {
86
+        return $builder->get()->map(function($model) {
87 87
             return (new static($this->registration))->manage($model);
88 88
         });
89 89
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $paginator = $builder->paginate($this->pageCount);
113 113
 
114
-        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) {
114
+        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) {
115 115
             return (new static($this->registration))->manage($model);
116 116
         });
117 117
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
     public function guard($verb): Manager
187 187
     {
188
-        if (! $this->can($verb)) {
188
+        if (!$this->can($verb)) {
189 189
             NotAllowedManagerRoute::notAllowedVerb($verb, $this);
190 190
         }
191 191
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         $fields = $this->fields();
209 209
 
210 210
         foreach ($this->assistants() as $assistant) {
211
-            if (! method_exists($assistant, 'fields')) {
211
+            if (!method_exists($assistant, 'fields')) {
212 212
                 continue;
213 213
             }
214 214
 
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
         $this->{'booted'.$baseMethod} = [];
286 286
         
287 287
         foreach (class_uses_recursive($class) as $trait) {
288
-            $method = class_basename($trait) . ucfirst($baseMethod);
288
+            $method = class_basename($trait).ucfirst($baseMethod);
289 289
             
290
-            if (method_exists($class, $method) && ! in_array($method, $this->{'booted'.$baseMethod})) {
290
+            if (method_exists($class, $method) && !in_array($method, $this->{'booted'.$baseMethod})) {
291 291
                 $this->{'booted'.$baseMethod}[] = lcfirst($method);
292 292
             }
293 293
         }
Please login to merge, or discard this patch.
src/Management/Nomadic.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
             throw NotAllowedManagerRoute::create($this);
13 13
         }
14 14
 
15
-        if (! auth()->guard('chief')->user()->hasRole('developer') && in_array($verb, ['create', 'store', 'delete'])) {
15
+        if (!auth()->guard('chief')->user()->hasRole('developer') && in_array($verb, ['create', 'store', 'delete'])) {
16 16
             throw NotAllowedManagerRoute::notAllowedVerb($verb, $this);
17 17
         }
18 18
     }
Please login to merge, or discard this patch.
src/Management/Managers.php 1 patch
Spacing   +5 added lines, -5 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,14 +90,14 @@  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
     }
97 97
 
98 98
     public function hasRegistered($tag)
99 99
     {
100
-        return ! empty($this->register->filterByTag($tag)->all());
100
+        return !empty($this->register->filterByTag($tag)->all());
101 101
     }
102 102
 
103 103
     /**
Please login to merge, or discard this patch.