Test Setup Failed
Push — dependabot/composer/phpstan/ph... ( 7cff5a )
by
unknown
22:30 queued 14:44
created
src/Urls/ChiefResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                     $targetModel = Morphables::instance($targetUrlRecord->model_type)->find($targetUrlRecord->model_id);
40 40
 
41 41
                     if (!$targetModel) {
42
-                        throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference [' . $targetUrlRecord->model_type . '@' . $targetUrlRecord->model_id . '] has probably been archived or deleted.');
42
+                        throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference ['.$targetUrlRecord->model_type.'@'.$targetUrlRecord->model_id.'] has probably been archived or deleted.');
43 43
                     }
44 44
 
45 45
                     return static::createRedirect($targetModel->url($locale));
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
             }
50 50
 
51 51
             if (!$model) {
52
-                throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference [' . $urlRecord->model_type . '@' . $urlRecord->model_id . '] has probably been archived or deleted.');
52
+                throw new ArchivedUrlException('Corrupt target model for this url request. Model by reference ['.$urlRecord->model_type.'@'.$urlRecord->model_id.'] has probably been archived or deleted.');
53 53
             }
54 54
 
55 55
             if (method_exists($model, 'isPublished') && !$model->isPublished()) {
56 56
 
57 57
                 /** When admin is logged in and this request is in preview mode, we allow the view */
58 58
                 if (!PreviewMode::fromRequest()->check()) {
59
-                    throw new NotFoundHttpException('Model found for request [' . $slug . '] but it is not published.');
59
+                    throw new NotFoundHttpException('Model found for request ['.$slug.'] but it is not published.');
60 60
                 }
61 61
             }
62 62
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         }
69 69
 
70
-        throw new NotFoundHttpException('No url or model found for request [' . $slug . '] for locale [' . $locale . '].');
70
+        throw new NotFoundHttpException('No url or model found for request ['.$slug.'] for locale ['.$locale.'].');
71 71
     }
72 72
 
73 73
     private static function createRedirect(string $url)
Please login to merge, or discard this patch.
src/Fields/Types/AllowsTags.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     public function tagged($tag): bool
10 10
     {
11
-        $tags = (array) $tag;
11
+        $tags = (array)$tag;
12 12
 
13 13
         return count(array_intersect($this->tags, $tags)) > 0;
14 14
     }
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function untag($tag)
29 29
     {
30
-        foreach((array) $tag as $_tag) {
31
-            if(false !== ($k = array_search($_tag, $this->tags))) {
30
+        foreach ((array)$tag as $_tag) {
31
+            if (false !== ($k = array_search($_tag, $this->tags))) {
32 32
                 unset($this->tags[$k]);
33 33
             }
34 34
         }
Please login to merge, or discard this patch.
src/Sets/Set.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         // If no view has been created for this page collection, we try once again to fetch the content value if any. This will silently fail
53 53
         // if no content value is present. We don't consider the 'content' attribute to be a default as we do for module.
54
-        return $this->map(function ($item) {
54
+        return $this->map(function($item) {
55 55
             return ($this->viewParent && $item instanceof ViewableContract)
56 56
                 ? $item->setViewParent($this->viewParent)->renderView()
57 57
                 : ($item->content ?? '');
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $path = request()->path();
87 87
 
88 88
         // When we have an entire collection as result we will cut down the items here, else if already paginated, we'll keep it as is.
89
-        $items = $this->comingFromPaginatedCollection() ? $this->all() :array_slice($this->all(), ($currentPage - 1) * $perPage);
89
+        $items = $this->comingFromPaginatedCollection() ? $this->all() : array_slice($this->all(), ($currentPage-1) * $perPage);
90 90
 
91 91
         return (new \Illuminate\Pagination\Paginator($items, $perPage ?? $this->paginateSetting('perPage', '12'), $currentPage))->setPath($path);
92 92
     }
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
     public function paginate($perPage = null, $currentPage = null): Paginator
103 103
     {
104 104
         $currentPage = $currentPage ?? request()->get('page', 1);
105
-        $path = '/' . request()->path();
105
+        $path = '/'.request()->path();
106 106
 
107 107
         // When we have an entire collection as result we will cut down the items here, else if already paginated, we'll keep it as is.
108
-        $items = $this->comingFromPaginatedCollection() ? $this->all() : array_slice($this->all(), ($currentPage - 1) * $perPage, $perPage);
108
+        $items = $this->comingFromPaginatedCollection() ? $this->all() : array_slice($this->all(), ($currentPage-1) * $perPage, $perPage);
109 109
 
110 110
         return (new \Illuminate\Pagination\LengthAwarePaginator($items, $this->paginateSetting('total', $this->count()), $perPage ?? $this->paginateSetting('perPage', '12'), $currentPage))->setPath($path);
111 111
     }
Please login to merge, or discard this patch.
src/System/HealthMonitor/Notifiers/ToastNotifier.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function onFailure(HealthCheck $healthCheck)
12 12
     {
13
-        session()->now($this->generateUniqueSessionKey(), ['type' => 'warning', 'message' => $healthCheck->message() ]);
13
+        session()->now($this->generateUniqueSessionKey(), ['type' => 'warning', 'message' => $healthCheck->message()]);
14 14
     }
15 15
 
16 16
     public function onSuccess(HealthCheck $healthCheck)
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
     private function generateUniqueSessionKey(): string
21 21
     {
22
-        $toastId = 'toast_messages.' . mt_rand(0, 9999);
22
+        $toastId = 'toast_messages.'.mt_rand(0, 9999);
23 23
 
24 24
         while (session()->get($toastId)) {
25
-            $toastId = 'toast_messages.' . mt_rand(0, 9999);
25
+            $toastId = 'toast_messages.'.mt_rand(0, 9999);
26 26
         }
27 27
 
28 28
         return $toastId;
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
                 foreach ($notifiers as $notifier) {
33 33
                     app($notifier)->onFailure($checkInstance);
34 34
                 }
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.