@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | ->from(['{{%webperf_data_samples}}']) |
| 43 | 43 | ->where(['not', [$column => null]]) |
| 44 | 44 | ; |
| 45 | - if ((int)$siteId !== 0) { |
|
| 45 | + if ((int) $siteId !== 0) { |
|
| 46 | 46 | $query->andWhere(['siteId' => $siteId]); |
| 47 | 47 | } |
| 48 | 48 | return $query->count(); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | ['not', ['title' => '']], |
| 68 | 68 | ]) |
| 69 | 69 | ; |
| 70 | - if ((int)$siteId !== 0) { |
|
| 70 | + if ((int) $siteId !== 0) { |
|
| 71 | 71 | $query->andWhere(['siteId' => $siteId]); |
| 72 | 72 | } |
| 73 | 73 | $result = $query->one(); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | ->offset($offset) |
| 107 | 107 | ->where(['between', 'dateUpdated', $start, $end]) |
| 108 | 108 | ; |
| 109 | - if ((int)$siteId !== 0) { |
|
| 109 | + if ((int) $siteId !== 0) { |
|
| 110 | 110 | $query->andWhere(['siteId' => $siteId]); |
| 111 | 111 | } |
| 112 | 112 | if ($filter !== '') { |
@@ -149,13 +149,13 @@ discard block |
||
| 149 | 149 | $index = 1; |
| 150 | 150 | foreach ($stats as &$stat) { |
| 151 | 151 | $stat['id'] = $index++; |
| 152 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 153 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 152 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 153 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 154 | 154 | // If there is no frontend beacon timing, use the Craft timing |
| 155 | 155 | if (empty($stat['pageLoad'])) { |
| 156 | - $stat['totalPageLoad'] = (int)$stat['craftTotalMs']; |
|
| 156 | + $stat['totalPageLoad'] = (int) $stat['craftTotalMs']; |
|
| 157 | 157 | } else { |
| 158 | - $stat['totalPageLoad'] = (int)$stat['pageLoad']; |
|
| 158 | + $stat['totalPageLoad'] = (int) $stat['pageLoad']; |
|
| 159 | 159 | } |
| 160 | 160 | // Decode any emojis in the title |
| 161 | 161 | if (!empty($stat['title'])) { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | ->where(['url' => $pageUrl]) |
| 256 | 256 | ->andWhere(['between', 'dateUpdated', $start, $end]) |
| 257 | 257 | ; |
| 258 | - if ((int)$siteId !== 0) { |
|
| 258 | + if ((int) $siteId !== 0) { |
|
| 259 | 259 | $query->andWhere(['siteId' => $siteId]); |
| 260 | 260 | } |
| 261 | 261 | if ($filter !== '') { |
@@ -297,12 +297,12 @@ discard block |
||
| 297 | 297 | } |
| 298 | 298 | // Massage the stats |
| 299 | 299 | foreach ($stats as &$stat) { |
| 300 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 300 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 301 | 301 | // If there is no frontend beacon timing, use the Craft timing |
| 302 | 302 | if (empty($stat['pageLoad'])) { |
| 303 | - $stat['totalPageLoad'] = (int)$stat['craftTotalMs']; |
|
| 303 | + $stat['totalPageLoad'] = (int) $stat['craftTotalMs']; |
|
| 304 | 304 | } else { |
| 305 | - $stat['totalPageLoad'] = (int)$stat['pageLoad']; |
|
| 305 | + $stat['totalPageLoad'] = (int) $stat['pageLoad']; |
|
| 306 | 306 | } |
| 307 | 307 | // Decode any emojis in the title |
| 308 | 308 | if (!empty($stat['title'])) { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ]) |
| 80 | 80 | ->where(['between', 'dateUpdated', $start, $end]) |
| 81 | 81 | ->andWhere(['not', [$column => null]]); |
| 82 | - if ((int)$siteId !== 0) { |
|
| 82 | + if ((int) $siteId !== 0) { |
|
| 83 | 83 | $query->andWhere(['siteId' => $siteId]); |
| 84 | 84 | } |
| 85 | 85 | if ($pageUrl !== '') { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | ]) |
| 97 | 97 | ->where(['between', 'dateUpdated', $start, $end]) |
| 98 | 98 | ->andWhere(['not', [$column => null]]); |
| 99 | - if ((int)$siteId !== 0) { |
|
| 99 | + if ((int) $siteId !== 0) { |
|
| 100 | 100 | $query->andWhere(['siteId' => $siteId]); |
| 101 | 101 | } |
| 102 | 102 | $stats = $query->all(); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | // Massage the data |
| 105 | 105 | if ($stats) { |
| 106 | 106 | foreach ($stats as &$stat) { |
| 107 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 107 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 108 | 108 | } |
| 109 | 109 | $data = $stats[0]; |
| 110 | 110 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | ]) |
| 151 | 151 | ->where(['between', 'dateUpdated', $start, $end]) |
| 152 | 152 | ->andWhere(['not', [$column => null]]); |
| 153 | - if ((int)$siteId !== 0) { |
|
| 153 | + if ((int) $siteId !== 0) { |
|
| 154 | 154 | $query->andWhere(['siteId' => $siteId]); |
| 155 | 155 | } |
| 156 | 156 | $query |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | ]) |
| 172 | 172 | ->where(['between', 'dateUpdated', $start, $end]) |
| 173 | 173 | ->andWhere(['not', [$column => null]]); |
| 174 | - if ((int)$siteId !== 0) { |
|
| 174 | + if ((int) $siteId !== 0) { |
|
| 175 | 175 | $query->andWhere(['siteId' => $siteId]); |
| 176 | 176 | } |
| 177 | 177 | $query |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | // Massage the data |
| 184 | 184 | if ($stats) { |
| 185 | 185 | foreach ($stats as &$stat) { |
| 186 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 186 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 187 | 187 | $stat['detailPageUrl'] = UrlHelper::cpUrl('webperf/page-detail', [ |
| 188 | 188 | 'pageUrl' => $stat['url'], |
| 189 | 189 | 'siteId' => $siteId, |