Passed
Push — v3 ( d4dfba...e153f6 )
by Andrew
06:39 queued 14s
created
src/controllers/TablesController.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         string $sort = 'hitCount|desc',
94 94
         int    $page = 1,
95 95
         int    $per_page = 20,
96
-               $filter = '',
97
-               $siteId = 0,
98
-               $handled = 'all'
96
+                $filter = '',
97
+                $siteId = 0,
98
+                $handled = 'all'
99 99
     ): Response {
100 100
         PermissionHelper::controllerPermissionCheck('retour:dashboard');
101 101
         $data = [];
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
         string $sort = 'hitCount|desc',
198 198
         int    $page = 1,
199 199
         int    $per_page = 20,
200
-               $filter = '',
201
-               $siteId = 0,
202
-               $shortLinks = false
200
+                $filter = '',
201
+                $siteId = 0,
202
+                $shortLinks = false
203 203
     ): Response {
204 204
         PermissionHelper::controllerPermissionCheck('retour:redirects');
205 205
         $data = [];
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.