Test Setup Failed
Push — a-simpler-manager ( 9beba5...d99f82 )
by Ben
06:26
created
src/Site/Urls/ChiefResponse.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                     $targetModel = Morphables::instance($targetUrlRecord->model_type)->find($targetUrlRecord->model_id);
36 36
 
37 37
                     if (!$targetModel) {
38
-                        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.');
38
+                        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.');
39 39
                     }
40 40
 
41 41
                     return static::createRedirect($targetModel->url($locale));
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
             }
46 46
 
47 47
             if (!$model) {
48
-                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.');
48
+                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.');
49 49
             }
50 50
 
51 51
             if (public_method_exists($model, 'isPublished') && !$model->isPublished()) {
52 52
 
53 53
                 /** When admin is logged in and this request is in preview mode, we allow the view */
54 54
                 if (!PreviewMode::fromRequest()->check()) {
55
-                    throw new NotFoundHttpException('Model found for request [' . $slug . '] but it is not published.');
55
+                    throw new NotFoundHttpException('Model found for request ['.$slug.'] but it is not published.');
56 56
                 }
57 57
             }
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             }
64 64
         }
65 65
 
66
-        throw new NotFoundHttpException('No url or model found for request [' . $slug . '] for locale [' . $locale . '].');
66
+        throw new NotFoundHttpException('No url or model found for request ['.$slug.'] for locale ['.$locale.'].');
67 67
     }
68 68
 
69 69
     private static function createRedirect(string $url)
Please login to merge, or discard this patch.