Test Setup Failed
Push — dependabot/composer/laravel/fr... ( 98b827 )
by
unknown
26:56 queued 19:31
created
src/Management/Assistants/ManagesAssistants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     public function assistant(string $assistantKey): Assistant
52 52
     {
53 53
         if (!$this->isAssistedBy($assistantKey)) {
54
-            throw new MissingAssistant('No assistant [' . $assistantKey . '] registered on manager ' . static::class);
54
+            throw new MissingAssistant('No assistant ['.$assistantKey.'] registered on manager '.static::class);
55 55
         }
56 56
 
57 57
         $instance = app($this->getAssistantClass($assistantKey));
Please login to merge, or discard this patch.
src/Management/Application/DeleteManagedModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             // Mark the slug as deleted to avoid any conflict with newly created modules with the same slug.
32 32
             if ($model instanceof Module) {
33 33
                 $model->update([
34
-                    'slug' => $model->slug . $this->appendDeleteMarker(),
34
+                    'slug' => $model->slug.$this->appendDeleteMarker(),
35 35
                 ]);
36 36
             }
37 37
 
@@ -58,6 +58,6 @@  discard block
 block discarded – undo
58 58
 
59 59
     private function appendDeleteMarker(): string
60 60
     {
61
-        return '_DELETED_' . time();
61
+        return '_DELETED_'.time();
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
src/Modules/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             return static::$managedModelKey;
70 70
         }
71 71
 
72
-        throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.');
72
+        throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.');
73 73
     }
74 74
 
75 75
     /**
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public static function availableForCreation(): Collection
81 81
     {
82
-        $managers = app(Managers::class)->findByTag('module')->filter(function ($manager) {
82
+        $managers = app(Managers::class)->findByTag('module')->filter(function($manager) {
83 83
             return $manager->can('create');
84
-        })->map(function ($manager) {
84
+        })->map(function($manager) {
85 85
             return $manager->details();
86 86
         });
87 87
 
Please login to merge, or discard this patch.
src/Management/Assistants/UrlAssistant.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 
70 70
         // Push update to homepage setting value
71 71
         // TODO: we should just fetch the homepages and push that instead...
72
-        UrlRecord::getByModel($this->manager->existingModel())->reject(function ($record) {
72
+        UrlRecord::getByModel($this->manager->existingModel())->reject(function($record) {
73 73
             return ($record->isRedirect() || !$record->isHomepage());
74
-        })->each(function ($record) {
74
+        })->each(function($record) {
75 75
             app(ChangeHomepage::class)->onUrlChanged($record);
76 76
         });
77 77
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     private function validateModel()
85 85
     {
86 86
         if (!$this->manager->existingModel() instanceof ProvidesUrl) {
87
-            throw new \Exception('UrlAssistant requires the model interfaced by ' . ProvidesUrl::class . '.');
87
+            throw new \Exception('UrlAssistant requires the model interfaced by '.ProvidesUrl::class.'.');
88 88
         }
89 89
     }
90 90
 }
Please login to merge, or discard this patch.
src/Management/Assistants/ArchiveAssistant.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function findAllArchived(): Collection
51 51
     {
52
-        return $this->manager->modelInstance()::archived()->get()->map(function ($model) {
52
+        return $this->manager->modelInstance()::archived()->get()->map(function($model) {
53 53
             return $this->managers->findByModel($model);
54 54
         });
55 55
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     private function guard($verb): Assistant
91 91
     {
92 92
         if (!$this->manager->existingModel() instanceof StatefulContract) {
93
-            throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract. [' . get_class($this->manager->existingModel()) . '] given instead.');
93
+            throw new \InvalidArgumentException('ArchiveAssistant requires the model to implement the StatefulContract. ['.get_class($this->manager->existingModel()).'] given instead.');
94 94
         }
95 95
 
96 96
         if (!$this->can($verb)) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
             // Ok now get all urls from this model and point them to the new records
122 122
             foreach (UrlRecord::getByModel($this->manager->existingModel()) as $urlRecord) {
123
-                if ($targetRecord = $targetRecords->first(function ($record) use ($urlRecord) {
123
+                if ($targetRecord = $targetRecords->first(function($record) use ($urlRecord) {
124 124
                     return ($record->locale == $urlRecord->locale && !$record->isRedirect());
125 125
                 })) {
126 126
                     $urlRecord->redirectTo($targetRecord);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             ->performedOn($this->manager->existingModel())
138 138
             ->log('archived');
139 139
 
140
-        return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title . ' is gearchiveerd.');
140
+        return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is gearchiveerd.');
141 141
     }
142 142
 
143 143
     public function unarchive()
@@ -153,6 +153,6 @@  discard block
 block discarded – undo
153 153
             ->performedOn($this->manager->existingModel())
154 154
             ->log('unarchived');
155 155
 
156
-        return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title . ' is hersteld.');
156
+        return redirect()->to($this->manager->route('index'))->with('messages.success', $this->manager->details()->title.' is hersteld.');
157 157
     }
158 158
 }
Please login to merge, or discard this patch.
src/Management/Registration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,21 +75,21 @@
 block discarded – undo
75 75
     private function validate($managerClass, $modelClass)
76 76
     {
77 77
         if (!class_exists($managerClass)) {
78
-            throw new \InvalidArgumentException('Manager class [' . $managerClass . '] is an invalid class reference. Please make sure the class exists.');
78
+            throw new \InvalidArgumentException('Manager class ['.$managerClass.'] is an invalid class reference. Please make sure the class exists.');
79 79
         }
80 80
 
81 81
         if (!class_exists($modelClass)) {
82
-            throw new \InvalidArgumentException('Model class [' . $modelClass . '] is an invalid model reference. Please make sure the class exists.');
82
+            throw new \InvalidArgumentException('Model class ['.$modelClass.'] is an invalid model reference. Please make sure the class exists.');
83 83
         }
84 84
 
85 85
         $manager = new \ReflectionClass($managerClass);
86 86
         if (!$manager->implementsInterface(Manager::class)) {
87
-            throw new \InvalidArgumentException('Class [' . $managerClass . '] is expected to implement the [' . Manager::class . '] contract.');
87
+            throw new \InvalidArgumentException('Class ['.$managerClass.'] is expected to implement the ['.Manager::class.'] contract.');
88 88
         }
89 89
 
90 90
         $model = new \ReflectionClass($modelClass);
91 91
         if (!$model->implementsInterface(ManagedModel::class)) {
92
-            throw new \InvalidArgumentException('Class [' . $modelClass . '] is expected to implement the [' . ManagedModel::class . '] contract.');
92
+            throw new \InvalidArgumentException('Class ['.$modelClass.'] is expected to implement the ['.ManagedModel::class.'] contract.');
93 93
         }
94 94
     }
95 95
 }
Please login to merge, or discard this patch.
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/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.