@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ]) |
| 75 | 75 | ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )") |
| 76 | 76 | ->andWhere(['not', [$column => null]]); |
| 77 | - if ((int)$siteId !== 0) { |
|
| 77 | + if ((int) $siteId !== 0) { |
|
| 78 | 78 | $query->andWhere(['siteId' => $siteId]); |
| 79 | 79 | } |
| 80 | 80 | if ($pageUrl !== '') { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ]) |
| 92 | 92 | ->where("\"dateUpdated\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )") |
| 93 | 93 | ->andWhere(['not', [$column => null]]); |
| 94 | - if ((int)$siteId !== 0) { |
|
| 94 | + if ((int) $siteId !== 0) { |
|
| 95 | 95 | $query->andWhere(['siteId' => $siteId]); |
| 96 | 96 | } |
| 97 | 97 | $stats = $query->all(); |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | ]) |
| 138 | 138 | ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )") |
| 139 | 139 | ->andWhere(['not', [$column => null]]); |
| 140 | - if ((int)$siteId !== 0) { |
|
| 140 | + if ((int) $siteId !== 0) { |
|
| 141 | 141 | $query->andWhere(['siteId' => $siteId]); |
| 142 | 142 | } |
| 143 | 143 | $query |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | ]) |
| 159 | 159 | ->where("\"dateUpdated\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )") |
| 160 | 160 | ->andWhere(['not', [$column => null]]); |
| 161 | - if ((int)$siteId !== 0) { |
|
| 161 | + if ((int) $siteId !== 0) { |
|
| 162 | 162 | $query->andWhere(['siteId' => $siteId]); |
| 163 | 163 | } |
| 164 | 164 | $query |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | if ($stats) { |
| 171 | 171 | // Decode any emojis in the title |
| 172 | 172 | foreach ($stats as &$stat) { |
| 173 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 173 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 174 | 174 | $stat['detailPageUrl'] = UrlHelper::cpUrl('webperf/page-detail', [ |
| 175 | 175 | 'pageUrl' => $stat['url'], |
| 176 | 176 | 'siteId' => $siteId, |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | ->offset($offset) |
| 103 | 103 | ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )") |
| 104 | 104 | ; |
| 105 | - if ((int)$siteId !== 0) { |
|
| 105 | + if ((int) $siteId !== 0) { |
|
| 106 | 106 | $query->andWhere(['siteId' => $siteId]); |
| 107 | 107 | } |
| 108 | 108 | if ($filter !== '') { |
@@ -145,12 +145,12 @@ discard block |
||
| 145 | 145 | $index = 1; |
| 146 | 146 | foreach ($stats as &$stat) { |
| 147 | 147 | $stat['id'] = $index++; |
| 148 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 148 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 149 | 149 | // If there is no frontend beacon timing, use the Craft timing |
| 150 | 150 | if (empty($stat['pageLoad'])) { |
| 151 | - $stat['totalPageLoad'] = (int)$stat['craftTotalMs']; |
|
| 151 | + $stat['totalPageLoad'] = (int) $stat['craftTotalMs']; |
|
| 152 | 152 | } else { |
| 153 | - $stat['totalPageLoad'] = (int)$stat['pageLoad']; |
|
| 153 | + $stat['totalPageLoad'] = (int) $stat['pageLoad']; |
|
| 154 | 154 | } |
| 155 | 155 | // Decode any emojis in the title |
| 156 | 156 | if (!empty($stat['title'])) { |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | ->where(['url' => $pageUrl]) |
| 247 | 247 | ->andWhere("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )") |
| 248 | 248 | ; |
| 249 | - if ((int)$siteId !== 0) { |
|
| 249 | + if ((int) $siteId !== 0) { |
|
| 250 | 250 | $query->andWhere(['siteId' => $siteId]); |
| 251 | 251 | } |
| 252 | 252 | if ($filter !== '') { |
@@ -288,12 +288,12 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | // Massage the stats |
| 290 | 290 | foreach ($stats as &$stat) { |
| 291 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 291 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 292 | 292 | // If there is no frontend beacon timing, use the Craft timing |
| 293 | 293 | if (empty($stat['pageLoad'])) { |
| 294 | - $stat['totalPageLoad'] = (int)$stat['craftTotalMs']; |
|
| 294 | + $stat['totalPageLoad'] = (int) $stat['craftTotalMs']; |
|
| 295 | 295 | } else { |
| 296 | - $stat['totalPageLoad'] = (int)$stat['pageLoad']; |
|
| 296 | + $stat['totalPageLoad'] = (int) $stat['pageLoad']; |
|
| 297 | 297 | } |
| 298 | 298 | // Decode any emojis in the title |
| 299 | 299 | if (!empty($stat['title'])) { |