Test Setup Failed
Push — ft/duplicate-page ( 3cb9e2 )
by Ben
65:03 queued 56:56
created
src/Pages/Page.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             return static::$managedModelKey;
102 102
         }
103 103
 
104
-        throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.');
104
+        throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.');
105 105
     }
106 106
 
107 107
     /**
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
     public function flatReferenceLabel(): string
142 142
     {
143 143
         if ($this->exists) {
144
-            $status = !$this->isPublished() ? ' [' . $this->statusAsPlainLabel() . ']' : null;
144
+            $status = !$this->isPublished() ? ' ['.$this->statusAsPlainLabel().']' : null;
145 145
 
146
-            return $this->title ? $this->title . $status : '';
146
+            return $this->title ? $this->title.$status : '';
147 147
         }
148 148
 
149 149
         return '';
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $classKey = get_class($this);
155 155
         if (property_exists($this, 'labelSingular')) {
156 156
             $labelSingular = $this->labelSingular;
157
-        } else {
157
+        }else {
158 158
             $labelSingular = Str::singular($classKey);
159 159
         }
160 160
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             $locale = app()->getLocale();
195 195
         }
196 196
         try {
197
-            $memoizedKey = $this->getMorphClass() . '-' . $this->id . '-' . $locale;
197
+            $memoizedKey = $this->getMorphClass().'-'.$this->id.'-'.$locale;
198 198
 
199 199
             if (isset(static::$cachedUrls[$memoizedKey])) {
200 200
                 return static::$cachedUrls[$memoizedKey];
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
     /** @inheritdoc */
219 219
     public function previewUrl(string $locale = null): string
220 220
     {
221
-        if($this->isPublished()) {
221
+        if ($this->isPublished()) {
222 222
             return $this->url($locale);
223 223
         }
224 224
 
225
-        return $this->url($locale) . '?preview-mode';
225
+        return $this->url($locale).'?preview-mode';
226 226
     }
227 227
 
228 228
 
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
     public function statusAsLabel()
262 262
     {
263 263
         if ($this->isPublished()) {
264
-            return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>';
264
+            return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>';
265 265
         }
266 266
 
267 267
         if ($this->isDraft()) {
268
-            return '<a href="' . $this->previewUrl() . '" target="_blank" class="text-error"><em>offline</em></a>';
268
+            return '<a href="'.$this->previewUrl().'" target="_blank" class="text-error"><em>offline</em></a>';
269 269
         }
270 270
 
271 271
         if ($this->isArchived()) {
Please login to merge, or discard this patch.
src/System/HealthMonitor/Checks/HomepageAccessibleCheck.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
     public function message(): string
35 35
     {
36
-        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>.';
36
+        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 37
     }
38 38
 
39 39
     public function notifiers(): array
Please login to merge, or discard this patch.
src/System/HealthMonitor/Checks/HomepageSetCheck.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public function message(): string
18 18
     {
19
-        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>';
19
+        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>';
20 20
     }
21 21
 
22 22
     public function notifiers(): array
Please login to merge, or discard this patch.
src/System/HealthMonitor/Monitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
                 }
33 33
 
34 34
                 return;
35
-            } else {
35
+            }else {
36 36
                 foreach ($notifiers as $notifier) {
37 37
                     app($notifier)->onSuccess($checkInstance);
38 38
                 }
Please login to merge, or discard this patch.
src/Settings/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         }
24 24
 
25 25
         // non-assoc array of items
26
-        if(is_array($this->items[$key]) && key($this->items[$key]) === 0) {
26
+        if (is_array($this->items[$key]) && key($this->items[$key]) === 0) {
27 27
             return $this->items[$key];
28 28
         }
29 29
 
Please login to merge, or discard this patch.
src/Fields/Types/PageField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@
 block discarded – undo
52 52
     {
53 53
         $instances = [];
54 54
 
55
-        foreach($flatReferences as $k => $flatReference) {
56
-            if(is_string($flatReference)) {
55
+        foreach ($flatReferences as $k => $flatReference) {
56
+            if (is_string($flatReference)) {
57 57
                 $flatReference = FlatReferenceFactory::fromString($flatReference);
58 58
             }
59 59
 
Please login to merge, or discard this patch.
src/Modules/ModuleManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
          */
38 38
         if ($verb == 'index' && $this->model->isPageSpecific()) {
39 39
 
40
-            if(!$this->model->page) {
41
-                throw new \RuntimeException('Cannot retrieve parent for page specific module [type: '.$this->registration->key() .', id: '. $this->existingModel()->id.']');
40
+            if (!$this->model->page) {
41
+                throw new \RuntimeException('Cannot retrieve parent for page specific module [type: '.$this->registration->key().', id: '.$this->existingModel()->id.']');
42 42
             }
43 43
 
44
-            return app(Managers::class)->findByModel($this->model->page)->route('edit') . '#eigen-modules';
44
+            return app(Managers::class)->findByModel($this->model->page)->route('edit').'#eigen-modules';
45 45
         }
46 46
 
47 47
         $routes = [
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             if (is_array_empty($translation)) {
162 162
 
163 163
                 // Nullify all values
164
-                $trans[$locale] = array_map(function ($value) {
164
+                $trans[$locale] = array_map(function($value) {
165 165
                     return null;
166 166
                 }, $translation);
167 167
                 continue;
Please login to merge, or discard this patch.
src/Management/Application/StoreManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@
 block discarded – undo
38 38
 
39 39
         $manager->saveCreateFields($request);
40 40
 
41
-        if($request->filled('template')) {
41
+        if ($request->filled('template')) {
42 42
             $this->applyTemplate->handle(
43 43
                 FlatReferenceFactory::fromString($request->input('template'))->className(),
44
-                (string) FlatReferenceFactory::fromString($request->input('template'))->id(),
44
+                (string)FlatReferenceFactory::fromString($request->input('template'))->id(),
45 45
                 get_class($manager->existingModel()),
46
-                (string) $manager->existingModel()->id
46
+                (string)$manager->existingModel()->id
47 47
             );
48 48
         }
49 49
 
Please login to merge, or discard this patch.
src/Relations/Relation.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ->orderBy('sort', 'ASC')
55 55
             ->get();
56 56
 
57
-        return $relations->map(function (Relation $relation) {
57
+        return $relations->map(function(Relation $relation) {
58 58
             $parent = $relation->parent;
59 59
             $parent->relation = $relation;
60 60
 
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
             ->orderBy('sort', 'ASC')
71 71
             ->get();
72 72
 
73
-        return $relations->map(function (Relation $relation) use ($parent_type, $parent_id) {
73
+        return $relations->map(function(Relation $relation) use ($parent_type, $parent_id) {
74 74
 
75 75
             // It could be that the child itself is soft-deleted, if this is the case, we will ignore it and move on.
76 76
             if (!$child = $relation->child) {
77 77
                 if (!$relation->child()->withTrashed()->first()) {
78 78
                     // If we cannot retrieve it then the relation type is possibly wrong, this is a database inconsistency and should be addressed
79
-                    throw new \DomainException('Corrupt relation reference. Related child [' . $relation->child_type . '@' . $relation->child_id . '] could not be retrieved for parent [' . $parent_type . '@' . $parent_id . ']. Make sure the morph key can resolve to a valid class.');
79
+                    throw new \DomainException('Corrupt relation reference. Related child ['.$relation->child_type.'@'.$relation->child_id.'] could not be retrieved for parent ['.$parent_type.'@'.$parent_id.']. Make sure the morph key can resolve to a valid class.');
80 80
                 }
81 81
 
82 82
                 return null;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         })
89 89
 
90 90
             // In case of soft-deleted entries, this will be null and should be ignored. We make sure that keys are reset in case of removed child
91
-            ->reject(function ($child) {
91
+            ->reject(function($child) {
92 92
                 return is_null($child);
93 93
             })
94 94
             ->values();
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 
106 106
     public static function deleteRelationsOf($type, $id)
107 107
     {
108
-        $relations = static::where(function ($query) use ($type, $id) {
108
+        $relations = static::where(function($query) use ($type, $id) {
109 109
             return $query->where('parent_type', $type)
110 110
                 ->where('parent_id', $id);
111
-        })->orWhere(function ($query) use ($type, $id) {
111
+        })->orWhere(function($query) use ($type, $id) {
112 112
             return $query->where('child_type', $type)
113 113
                 ->where('child_id', $id);
114 114
         })->get();
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     public static function deleteAllChildRelationsOf($type, $id)
122 122
     {
123
-        $relations = static::where(function ($query) use ($type, $id) {
123
+        $relations = static::where(function($query) use ($type, $id) {
124 124
             return $query->where('parent_type', $type)
125 125
                 ->where('parent_id', $id);
126 126
         })->get();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
     public static function deleteAllParentRelationsOf($type, $id)
134 134
     {
135
-        $relations = static::where(function ($query) use ($type, $id) {
135
+        $relations = static::where(function($query) use ($type, $id) {
136 136
             return $query->where('child_type', $type)
137 137
                 ->where('child_id', $id);
138 138
         })->get();
Please login to merge, or discard this patch.