@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | string $sort = 'hitCount|desc', |
93 | 93 | int $page = 1, |
94 | 94 | int $per_page = 20, |
95 | - $filter = '', |
|
96 | - $siteId = 0, |
|
97 | - $handled = 'all', |
|
95 | + $filter = '', |
|
96 | + $siteId = 0, |
|
97 | + $handled = 'all', |
|
98 | 98 | ): Response { |
99 | 99 | PermissionHelper::controllerPermissionCheck('retour:dashboard'); |
100 | 100 | $data = []; |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | string $sort = 'hitCount|desc', |
188 | 188 | int $page = 1, |
189 | 189 | int $per_page = 20, |
190 | - $filter = '', |
|
191 | - $siteId = 0, |
|
192 | - $shortLinks = false, |
|
190 | + $filter = '', |
|
191 | + $siteId = 0, |
|
192 | + $shortLinks = false, |
|
193 | 193 | ): Response { |
194 | 194 | PermissionHelper::controllerPermissionCheck('retour:redirects'); |
195 | 195 | $data = []; |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** |
70 | 70 | * @inheritdoc |
71 | 71 | */ |
72 | - protected array|bool|int $allowAnonymous = [ |
|
72 | + protected array | bool | int $allowAnonymous = [ |
|
73 | 73 | ]; |
74 | 74 | |
75 | 75 | // Public Methods |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ->orderBy([$sortField => $sortType]) |
125 | 125 | ->filterWhere(['like', 'redirectSrcUrl', $filter]) |
126 | 126 | ->orFilterWhere(['like', 'referrerUrl', $filter]); |
127 | - if ((int)$siteId !== 0) { |
|
127 | + if ((int) $siteId !== 0) { |
|
128 | 128 | $query->andWhere(['siteId' => $siteId]); |
129 | 129 | } |
130 | 130 | if ($handled !== 'all') { |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | $stat['addLink'] = ''; |
147 | 147 | if (!$stat['handledByRetour']) { |
148 | - $encodedUrl = urlencode('/' . ltrim($stat['redirectSrcUrl'], '/')); |
|
148 | + $encodedUrl = urlencode('/'.ltrim($stat['redirectSrcUrl'], '/')); |
|
149 | 149 | // Add the siteId to the URL, but keep the current behavior of passing in siteId=0 for "all" |
150 | 150 | $statSiteId = $stat['siteId'] ?? 0; |
151 | 151 | try { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | } catch (SiteNotFoundException $e) { |
154 | 154 | $primarySite = null; |
155 | 155 | } |
156 | - if ($primarySite !== null && $statSiteId == (int)$primarySite->id) { |
|
156 | + if ($primarySite !== null && $statSiteId == (int) $primarySite->id) { |
|
157 | 157 | $statSiteId = 0; |
158 | 158 | } |
159 | 159 | $stat['addLink'] = UrlHelper::cpUrl('retour/add-redirect', [ |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | ->orderBy([$sortField => $sortType]) |
229 | 229 | ->filterWhere(['like', 'redirectSrcUrl', $filter]) |
230 | 230 | ->orFilterWhere(['like', 'redirectDestUrl', $filter]); |
231 | - if ((int)$siteId !== 0) { |
|
231 | + if ((int) $siteId !== 0) { |
|
232 | 232 | $query->andWhere(['siteId' => $siteId]); |
233 | 233 | } |
234 | 234 | if ($shortLinks) { |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
273 | - $redirect['editLink'] = UrlHelper::cpUrl('retour/edit-redirect/' . $redirect['id']); |
|
273 | + $redirect['editLink'] = UrlHelper::cpUrl('retour/edit-redirect/'.$redirect['id']); |
|
274 | 274 | } |
275 | 275 | // Format the data for the API |
276 | 276 | if ($redirects) { |