Test Failed
Push — fix/media-validation ( bd2169...6403fc )
by Ben
07:09
created
src/HealthMonitor/Notifiers/Notifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Notifiers;
4 4
 
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,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor;
4 4
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         foreach ($this->checks as $check) {
21 21
             $checkInstance = app($check);
22 22
 
23
-            if (! $checkInstance instanceof HealthCheck) {
23
+            if (!$checkInstance instanceof HealthCheck) {
24 24
                 throw new InvalidClassException('Checks must implement Healthcheck interface.');
25 25
             }
26 26
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
                     app($notifier)->onFailure($checkInstance);
32 32
                 }
33 33
                 return;
34
-            } else {
34
+            }else {
35 35
                 foreach ($notifiers as $notifier) {
36 36
                     app($notifier)->onSuccess($checkInstance);
37 37
                 }
Please login to merge, or discard this patch.
src/Menu/ChiefMenu.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Menu;
4 4
 
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $collection = NodeCollection::fromArray($items);
27 27
 
28
-        $collection->mapRecursive(function ($node) {
28
+        $collection->mapRecursive(function($node) {
29 29
             return $node->replaceEntry((new MenuItem())->entry($node));
30 30
         });
31 31
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function items(): NodeCollection
43 43
     {
44 44
         if (!$this->includeHidden) {
45
-            $this->collection = $this->collection->shake(function ($node) {
45
+            $this->collection = $this->collection->shake(function($node) {
46 46
                 return !$node->hidden_in_menu && !$node->draft;
47 47
             });
48 48
         }
@@ -55,22 +55,22 @@  discard block
 block discarded – undo
55 55
         $this->collection = $this->items();
56 56
 
57 57
         if ($id) {
58
-            $this->collection = $this->collection->prune(function ($node) use ($id) {
58
+            $this->collection = $this->collection->prune(function($node) use ($id) {
59 59
                 return !in_array($id, $node->pluckAncestors('id'));
60 60
             });
61 61
         }
62 62
 
63
-        $menu = $this->collection->mapRecursive(function ($node) {
63
+        $menu = $this->collection->mapRecursive(function($node) {
64 64
             $entry = $node->entry();
65 65
             $label = $entry->label;
66
-            $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())) . '>' : '';
66
+            $entry->label = $node->depth() != 0 ? (str_repeat('-', $node->depth())).'>' : '';
67 67
             $entry->label .= $label;
68 68
             return $node->replaceEntry($entry);
69 69
         });
70 70
 
71 71
         $menuitems = collect();
72
-        $menu->flatten()->each(function ($node) use ($menuitems) {
73
-            $menuitems[]  = [
72
+        $menu->flatten()->each(function($node) use ($menuitems) {
73
+            $menuitems[] = [
74 74
                 'label' => $node->label,
75 75
                 'id'    => $node->id
76 76
             ];
Please login to merge, or discard this patch.
src/Concerns/HasPeriod/SortPeriodDateScope.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Concerns\HasPeriod;
4 4
 
Please login to merge, or discard this patch.
src/Fields/Types/CheckboxField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
Please login to merge, or discard this patch.
src/Filters/Filter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Filters;
4 4
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function render(array $requestInput = []): string
50 50
     {
51
-        $path = $this->viewpath ?? 'chief::back._filters.' . $this->type;
51
+        $path = $this->viewpath ?? 'chief::back._filters.'.$this->type;
52 52
         $this->default($requestInput[$this->name] ?? null);
53 53
 
54 54
         return view($path, ['filter' => $this])->render();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         if (!in_array($name, ['name', 'label', 'description', 'query', 'viewpath', 'default'])) {
65
-            throw new \InvalidArgumentException('Cannot set value by ['. $name .'].');
65
+            throw new \InvalidArgumentException('Cannot set value by ['.$name.'].');
66 66
         }
67 67
 
68 68
         $this->values[$name] = $arguments[0];
Please login to merge, or discard this patch.
src/Management/Assistants/UrlAssistant.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                         'url-slugs.*' => 'taalspecifieke link',
53 53
                     ])
54 54
                 ->view('chief::back._fields.url-slugs')
55
-                ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance()) ]),
55
+                ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance())]),
56 56
         ]);
57 57
     }
58 58
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 
63 63
         // Push update to homepage setting value
64 64
         // TODO: we should just fetch the homepages and push that instead...
65
-        UrlRecord::getByModel($this->manager->existingModel())->reject(function ($record) {
65
+        UrlRecord::getByModel($this->manager->existingModel())->reject(function($record) {
66 66
             return ($record->isRedirect() || !$record->isHomepage());
67
-        })->each(function ($record) {
67
+        })->each(function($record) {
68 68
             app(ChangeHomepage::class)->onUrlChanged($record);
69 69
         });
70 70
     }
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 
77 77
     private function validateModel()
78 78
     {
79
-        if (! $this->manager->existingModel() instanceof ProvidesUrl) {
80
-            throw new \Exception('UrlAssistant requires the model interfaced by ' . ProvidesUrl::class . '.');
79
+        if (!$this->manager->existingModel() instanceof ProvidesUrl) {
80
+            throw new \Exception('UrlAssistant requires the model interfaced by '.ProvidesUrl::class.'.');
81 81
         }
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
src/Snippets/FileLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Snippets;
4 4
 
Please login to merge, or discard this patch.
src/HealthMonitor/Notifiers/AlertBarNotifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Notifiers;
4 4
 
Please login to merge, or discard this patch.