Passed
Push — develop ( f9c664...bf5890 )
by Andrew
04:43 queued 01:20
created
src/controllers/ChartsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 ])
71 71
                 ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )")
72 72
                 ->andWhere(['not', [$column => null]]);
73
-            if ((int)$siteId !== 0) {
73
+            if ((int) $siteId !== 0) {
74 74
                 $query->andWhere(['siteId' => $siteId]);
75 75
             }
76 76
             $stats = $query->all();
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 ])
85 85
                 ->where("\"dateUpdated\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )")
86 86
                 ->andWhere(['not', [$column => null]]);
87
-            if ((int)$siteId !== 0) {
87
+            if ((int) $siteId !== 0) {
88 88
                 $query->andWhere(['siteId' => $siteId]);
89 89
             }
90 90
             $stats = $query->all();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 ])
131 131
                 ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )")
132 132
                 ->andWhere(['not', [$column => null]]);
133
-            if ((int)$siteId !== 0) {
133
+            if ((int) $siteId !== 0) {
134 134
                 $query->andWhere(['siteId' => $siteId]);
135 135
             }
136 136
             $query
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                 ])
152 152
                 ->where("\"dateUpdated\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )")
153 153
                 ->andWhere(['not', [$column => null]]);
154
-            if ((int)$siteId !== 0) {
154
+            if ((int) $siteId !== 0) {
155 155
                 $query->andWhere(['siteId' => $siteId]);
156 156
             }
157 157
             $query
Please login to merge, or discard this patch.
src/controllers/TablesController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             ->from(['{{%webperf_data_samples}}'])
99 99
             ->offset($offset)
100 100
             ;
101
-        if ((int)$siteId !== 0) {
101
+        if ((int) $siteId !== 0) {
102 102
             $query->where(['siteId' => $siteId]);
103 103
         }
104 104
         if ($filter !== '') {
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
             $index = 1;
132 132
             foreach ($stats as &$stat) {
133 133
                 $stat['id'] = $index++;
134
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
134
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
135 135
                 // If there is no frontend beacon timing, use the Craft timing
136 136
                 if (empty($stat['pageLoad'])) {
137
-                    $stat['totalPageLoad'] = (int)$stat['craftTotalMs'];
137
+                    $stat['totalPageLoad'] = (int) $stat['craftTotalMs'];
138 138
                 } else {
139
-                    $stat['totalPageLoad'] = (int)$stat['pageLoad'];
139
+                    $stat['totalPageLoad'] = (int) $stat['pageLoad'];
140 140
                 }
141 141
                 // Decode any emojis in the title
142 142
                 if (!empty($stat['title'])) {
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             ->offset($offset)
213 213
             ->where(['url' => $pageUrl])
214 214
         ;
215
-        if ((int)$siteId !== 0) {
215
+        if ((int) $siteId !== 0) {
216 216
             $query->where(['siteId' => $siteId]);
217 217
         }
218 218
         if ($filter !== '') {
@@ -246,12 +246,12 @@  discard block
 block discarded – undo
246 246
             $index = 1;
247 247
             foreach ($stats as &$stat) {
248 248
                 $stat['id'] = $index++;
249
-                $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad;
249
+                $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad;
250 250
                 // If there is no frontend beacon timing, use the Craft timing
251 251
                 if (empty($stat['pageLoad'])) {
252
-                    $stat['totalPageLoad'] = (int)$stat['craftTotalMs'];
252
+                    $stat['totalPageLoad'] = (int) $stat['craftTotalMs'];
253 253
                 } else {
254
-                    $stat['totalPageLoad'] = (int)$stat['pageLoad'];
254
+                    $stat['totalPageLoad'] = (int) $stat['pageLoad'];
255 255
                 }
256 256
                 // Decode any emojis in the title
257 257
                 if (!empty($stat['title'])) {
Please login to merge, or discard this patch.
src/controllers/MetricsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
             $now = round(microtime(true) * 1000);
186 186
             $cache = Craft::$app->getCache();
187 187
             $then = $cache->get(self::LAST_BEACON_CACHE_KEY);
188
-            if (($then !== false) && ($now - (int)$then < Webperf::$settings->rateLimitMs)) {
188
+            if (($then !== false) && ($now - (int) $then < Webperf::$settings->rateLimitMs)) {
189 189
                 $limited = true;
190 190
                 Craft::warning('Beacon ignored due to rate limiting', __METHOD__);
191 191
             }
Please login to merge, or discard this patch.