@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function renderFragment($owner, $loop, $fragments, $viewData): string |
23 | 23 | { |
24 | 24 | // Default (legacy) view rendering |
25 | - if(public_method_exists($this, 'renderView')) { |
|
25 | + if (public_method_exists($this, 'renderView')) { |
|
26 | 26 | return $this->renderView(); |
27 | 27 | } |
28 | 28 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function fragmentModel(): FragmentModel |
40 | 40 | { |
41 | - if(!isset($this->fragmentModel)) { |
|
41 | + if (!isset($this->fragmentModel)) { |
|
42 | 42 | throw new \DomainException('FragmentModel property on ['.get_class($this).'] expected to be set, but it\'s not.'); |
43 | 43 | } |
44 | 44 |
@@ -35,7 +35,7 @@ discard block |
||
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 |
||
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 |
||
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) |