Test Failed
Push — ft/elements ( 383c8a )
by Ben
10:58
created
src/Management/Register.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
     private function registrationMustExistConstraint(string $key, $value, $registrations): void
137 137
     {
138 138
         if (empty($registrations) && count($registrations) != $this->registrations) {
139
-            throw new NonRegisteredManager('No manager found for ' . $key . ' [' . print_r($value, true) . ']. Did you perhaps forgot to register the manager?');
139
+            throw new NonRegisteredManager('No manager found for '.$key.' ['.print_r($value, true).']. Did you perhaps forgot to register the manager?');
140 140
         }
141 141
     }
142 142
 }
Please login to merge, or discard this patch.
src/Management/AbstractManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             return $this->indexPagination($builder);
89 89
         }
90 90
 
91
-        return $builder->get()->map(function ($model) {
91
+        return $builder->get()->map(function($model) {
92 92
             return (new static($this->registration))->manage($model);
93 93
         });
94 94
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $paginator = $builder->paginate($this->pageCount);
118 118
 
119
-        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function ($model) {
119
+        $modifiedCollection = $builder->paginate($this->pageCount)->getCollection()->transform(function($model) {
120 120
             return (new static($this->registration))->manage($model);
121 121
         });
122 122
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             static::$bootedTraitMethods[$baseMethod] = [];
308 308
 
309 309
             foreach (class_uses_recursive($class) as $trait) {
310
-                $method = class_basename($trait) . ucfirst($baseMethod);
310
+                $method = class_basename($trait).ucfirst($baseMethod);
311 311
 
312 312
                 if (method_exists($class, $method) && !in_array($method, static::$bootedTraitMethods[$baseMethod])) {
313 313
                     static::$bootedTraitMethods[$baseMethod][] = lcfirst($method);
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 self('Not allowed to ' . $verb . ' a model. ' . ucfirst($verb) . ' route is not allowed by the ' . $manager->details()->key . ' manager.');
42
+        throw new self('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 self('Not allowed permission for ' . $permission . ' on a model as managed by the ' . $manager->details()->key . ' manager.');
47
+        throw new self('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/HasDetails.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         $genericModelInstance = $this->modelInstance();
17 17
 
18 18
         // Generic model details
19
-        $id = Str::slug($this->registration->key() . ($this->hasExistingModel() ? '-' . $this->existingModel()->id : ''));
19
+        $id = Str::slug($this->registration->key().($this->hasExistingModel() ? '-'.$this->existingModel()->id : ''));
20 20
         $key = $this->registration->key();
21 21
         $labelSingular = property_exists($genericModelInstance, 'labelSingular') ? $genericModelInstance->labelSingular : Str::singular($key);
22 22
         $labelPlural = property_exists($genericModelInstance, 'labelPlural') ? $genericModelInstance->labelPlural : Str::plural($key);
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
         return new Details(
33 33
             $id,
34 34
             $key,
35
-            $labelSingular . '',
36
-            $labelPlural . '',
35
+            $labelSingular.'',
36
+            $labelPlural.'',
37 37
             $internal_label,
38
-            $title . ''
38
+            $title.''
39 39
         );
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
src/Nav/Nav.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 
53 53
     private static function fromManagers(Collection $collection)
54 54
     {
55
-        return new static(...$collection->reject(function ($manager) {
55
+        return new static(...$collection->reject(function($manager) {
56 56
             return !$manager->can('index');
57
-        })->map(function ($manager) {
57
+        })->map(function($manager) {
58 58
             return new NavItem($manager->details()->plural, $manager->route('index'), [
59 59
                 'key'  => $manager->details()->key,
60 60
                 'tags' => app(Register::class)->filterByKey($manager->details()->key)->first()->tags(),
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
         $output = '';
120 120
 
121 121
         foreach ($this->items as $item) {
122
-            $output .= '<a class="' . (isActiveUrl($item->url()) ? 'active' : '') . '" href="' . $item->url() . '">';
122
+            $output .= '<a class="'.(isActiveUrl($item->url()) ? 'active' : '').'" href="'.$item->url().'">';
123 123
             $output .= $title ?? ucfirst($item->title());
124 124
             $output .= '</a>';
125 125
         }
126 126
 
127
-        return '<li>' . $output . '</li>';
127
+        return '<li>'.$output.'</li>';
128 128
     }
129 129
 
130 130
     /**
@@ -146,19 +146,19 @@  discard block
 block discarded – undo
146 146
 
147 147
         $items = '';
148 148
         foreach ($this->items as $item) {
149
-            $items .= '<a class="' . (isActiveUrl($item->url()) ? 'active' : '') . '" href="' . $item->url() . '">';
149
+            $items .= '<a class="'.(isActiveUrl($item->url()) ? 'active' : '').'" href="'.$item->url().'">';
150 150
             $items .= ucfirst($item->title());
151 151
             $items .= '</a>';
152 152
         }
153 153
 
154 154
         // Surround within vue dropdown
155 155
         $output = '<dropdown>';
156
-        $output .= '<span class="center-y nav-item" slot="trigger" slot-scope="{ toggle, isActive }" @click="toggle">' . ($title ?? 'Collecties') . '</span>';
156
+        $output .= '<span class="center-y nav-item" slot="trigger" slot-scope="{ toggle, isActive }" @click="toggle">'.($title ?? 'Collecties').'</span>';
157 157
         $output .= '<div v-cloak class="dropdown-box inset-s">';
158 158
         $output .= $items;
159 159
         $output .= '</div>';
160 160
         $output .= '</dropdown>';
161 161
 
162
-        return '<li>' . $output . '</li>';
162
+        return '<li>'.$output.'</li>';
163 163
     }
164 164
 }
Please login to merge, or discard this patch.
src/Urls/UrlRecord.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             ->first();
33 33
 
34 34
         if (!$record) {
35
-            throw new UrlRecordNotFound('No url record found by slug [' . $slug . '] for locale [' . $locale . '].');
35
+            throw new UrlRecordNotFound('No url record found by slug ['.$slug.'] for locale ['.$locale.'].');
36 36
         }
37 37
 
38 38
         return $record;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             ->first();
57 57
 
58 58
         if (!$record) {
59
-            throw new UrlRecordNotFound('No url record found for model [' . $model->getMorphClass() . '@' . $model->id . '] for locale [' . $locale . '].');
59
+            throw new UrlRecordNotFound('No url record found for model ['.$model->getMorphClass().'@'.$model->id.'] for locale ['.$locale.'].');
60 60
         }
61 61
 
62 62
         return $record;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         }
151 151
 
152 152
         if ($ignoredModel) {
153
-            $builder->whereNotIn('id', function ($query) use ($ignoredModel) {
153
+            $builder->whereNotIn('id', function($query) use ($ignoredModel) {
154 154
                 $query->select('id')
155 155
                     ->from('chief_urls')
156 156
                     ->where('model_type', '=', $ignoredModel->getMorphClass())
Please login to merge, or discard this patch.
src/Urls/MemoizedUrlRecord.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             ->first();
37 37
 
38 38
         if (!$record) {
39
-            throw new UrlRecordNotFound('No url record found for model [' . $model->getMorphClass() . '@' . $model->id . '] for locale [' . $locale . '].');
39
+            throw new UrlRecordNotFound('No url record found for model ['.$model->getMorphClass().'@'.$model->id.'] for locale ['.$locale.'].');
40 40
         }
41 41
 
42 42
         return $record;
@@ -44,7 +44,7 @@  discard block
 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.
src/Urls/ChiefResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                     $targetModel = Morphables::instance($targetUrlRecord->model_type)->find($targetUrlRecord->model_id);
38 38
 
39 39
                     if (!$targetModel) {
40
-                        throw new \DomainException('Corrupt target model for this url request. Model by reference [' . $targetUrlRecord->model_type . '@' . $targetUrlRecord->model_id . '] has probably been archived or deleted.');
40
+                        throw new \DomainException('Corrupt target model for this url request. Model by reference ['.$targetUrlRecord->model_type.'@'.$targetUrlRecord->model_id.'] has probably been archived or deleted.');
41 41
                     }
42 42
 
43 43
                     return static::createRedirect($targetModel->url($locale));
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
             }
48 48
 
49 49
             if (!$model) {
50
-                throw new \DomainException('Corrupt target model for this url request. Model by reference [' . $urlRecord->model_type . '@' . $urlRecord->model_id . '] has probably been archived or deleted.');
50
+                throw new \DomainException('Corrupt target model for this url request. Model by reference ['.$urlRecord->model_type.'@'.$urlRecord->model_id.'] has probably been archived or deleted.');
51 51
             }
52 52
 
53 53
             if (method_exists($model, 'isPublished') && !$model->isPublished()) {
54 54
 
55 55
                 /** When admin is logged in and this request is in preview mode, we allow the view */
56 56
                 if (!PreviewMode::fromRequest()->check()) {
57
-                    throw new NotFoundHttpException('Model found for request [' . $slug . '] but it is not published.');
57
+                    throw new NotFoundHttpException('Model found for request ['.$slug.'] but it is not published.');
58 58
                 }
59 59
             }
60 60
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             }
66 66
         }
67 67
 
68
-        throw new NotFoundHttpException('No url or model found for request [' . $slug . '] for locale [' . $locale . '].');
68
+        throw new NotFoundHttpException('No url or model found for request ['.$slug.'] for locale ['.$locale.'].');
69 69
     }
70 70
 
71 71
     private static function createRedirect(string $url)
Please login to merge, or discard this patch.
src/Urls/UrlSlugField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         return $this->fullUrl
44 44
             ? $this->fullUrl
45
-            : $this->prepend . $this->getValue();
45
+            : $this->prepend.$this->getValue();
46 46
     }
47 47
 
48 48
     public function setFullUrl(string $fullUrl)
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             'baseUrlSegment' => $this->baseUrlSegment,
95 95
             'hint'           => null, // Hint placeholder to show url hint when it already exists
96 96
             'is_homepage'    => ($this->getValue() === '/'),
97
-            'show'           => !!$this->getValue(),// show input field or not
97
+            'show'           => !!$this->getValue(), // show input field or not
98 98
         ];
99 99
     }
100 100
 }
Please login to merge, or discard this patch.