@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | string $sort = 'hitCount|desc', |
91 | 91 | int $page = 1, |
92 | 92 | int $per_page = 20, |
93 | - $filter = '', |
|
94 | - $siteId = 0, |
|
95 | - $handled = 'all' |
|
93 | + $filter = '', |
|
94 | + $siteId = 0, |
|
95 | + $handled = 'all' |
|
96 | 96 | ): Response |
97 | 97 | { |
98 | 98 | PermissionHelper::controllerPermissionCheck('retour:dashboard'); |
@@ -186,9 +186,9 @@ discard block |
||
186 | 186 | string $sort = 'hitCount|desc', |
187 | 187 | int $page = 1, |
188 | 188 | int $per_page = 20, |
189 | - $filter = '', |
|
190 | - $siteId = 0, |
|
191 | - $shortLinks = false |
|
189 | + $filter = '', |
|
190 | + $siteId = 0, |
|
191 | + $shortLinks = false |
|
192 | 192 | ): Response |
193 | 193 | { |
194 | 194 | PermissionHelper::controllerPermissionCheck('retour:redirects'); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ->orderBy([$sortField => $sortType]) |
123 | 123 | ->filterWhere(['like', 'redirectSrcUrl', $filter]) |
124 | 124 | ->orFilterWhere(['like', 'referrerUrl', $filter]); |
125 | - if ((int)$siteId !== 0) { |
|
125 | + if ((int) $siteId !== 0) { |
|
126 | 126 | $query->andWhere(['siteId' => $siteId]); |
127 | 127 | } |
128 | 128 | if ($handled !== 'all') { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | foreach ($stats as &$stat) { |
135 | 135 | $stat['addLink'] = ''; |
136 | 136 | if (!$stat['handledByRetour']) { |
137 | - $encodedUrl = urlencode('/' . ltrim($stat['redirectSrcUrl'], '/')); |
|
137 | + $encodedUrl = urlencode('/'.ltrim($stat['redirectSrcUrl'], '/')); |
|
138 | 138 | // Add the siteId to the URL, but keep the current behavior of passing in siteId=0 for "all" |
139 | 139 | $statSiteId = $stat['siteId'] ?? 0; |
140 | 140 | try { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } catch (SiteNotFoundException $e) { |
143 | 143 | $primarySite = null; |
144 | 144 | } |
145 | - if ($primarySite !== null && $statSiteId == (int)$primarySite->id) { |
|
145 | + if ($primarySite !== null && $statSiteId == (int) $primarySite->id) { |
|
146 | 146 | $statSiteId = 0; |
147 | 147 | } |
148 | 148 | $stat['addLink'] = UrlHelper::cpUrl('retour/add-redirect', [ |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | ->orderBy([$sortField => $sortType]) |
219 | 219 | ->filterWhere(['like', 'redirectSrcUrl', $filter]) |
220 | 220 | ->orFilterWhere(['like', 'redirectDestUrl', $filter]); |
221 | - if ((int)$siteId !== 0) { |
|
221 | + if ((int) $siteId !== 0) { |
|
222 | 222 | $query->andWhere(['siteId' => $siteId]); |
223 | 223 | } |
224 | 224 | if ($shortLinks) { |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | } |
246 | 246 | } |
247 | 247 | |
248 | - $redirect['editLink'] = UrlHelper::cpUrl('retour/edit-redirect/' . $redirect['id']); |
|
248 | + $redirect['editLink'] = UrlHelper::cpUrl('retour/edit-redirect/'.$redirect['id']); |
|
249 | 249 | } |
250 | 250 | // Format the data for the API |
251 | 251 | if ($redirects) { |