@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ->offset($offset) |
| 105 | 105 | ->where(['between', 'dateCreated', $start, $end]) |
| 106 | 106 | ; |
| 107 | - if ((int)$siteId !== 0) { |
|
| 107 | + if ((int) $siteId !== 0) { |
|
| 108 | 108 | $query->andWhere(['siteId' => $siteId]); |
| 109 | 109 | } |
| 110 | 110 | if ($filter !== '') { |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | $index = 1; |
| 144 | 144 | foreach ($stats as &$stat) { |
| 145 | 145 | $stat['id'] = $index++; |
| 146 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 147 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 146 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 147 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 148 | 148 | // Decode any emojis in the title |
| 149 | 149 | if (!empty($stat['title'])) { |
| 150 | 150 | $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8'); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | ->where(['url' => $pageUrl]) |
| 243 | 243 | ->andWhere(['between', 'dateCreated', $start, $end]) |
| 244 | 244 | ; |
| 245 | - if ((int)$siteId !== 0) { |
|
| 245 | + if ((int) $siteId !== 0) { |
|
| 246 | 246 | $query->andWhere(['siteId' => $siteId]); |
| 247 | 247 | } |
| 248 | 248 | if ($filter !== '') { |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | $stat['type'] = 'frontend'; |
| 275 | 275 | } |
| 276 | 276 | if ($stat['pageLoad'] > $maxTotalPageLoad) { |
| 277 | - $maxTotalPageLoad = (int)$stat['pageLoad']; |
|
| 277 | + $maxTotalPageLoad = (int) $stat['pageLoad']; |
|
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | // Massage the stats |
@@ -283,8 +283,8 @@ discard block |
||
| 283 | 283 | $date = DateTimeHelper::toDateTime($stats['dateCreated']); |
| 284 | 284 | $stats['dateCreated'] = $date->format('Y-m-d H:i:s'); |
| 285 | 285 | } |
| 286 | - $stat['mobile'] = (bool)$stat['mobile']; |
|
| 287 | - $stat['maxTotalPageLoad'] = (int)$maxTotalPageLoad; |
|
| 286 | + $stat['mobile'] = (bool) $stat['mobile']; |
|
| 287 | + $stat['maxTotalPageLoad'] = (int) $maxTotalPageLoad; |
|
| 288 | 288 | // Decode any emojis in the title |
| 289 | 289 | if (!empty($stat['title'])) { |
| 290 | 290 | $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8'); |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | 'SUM(case when [[type]] = \'boomerang\' then 1 else 0 end) as [[boomerangCount]]', |
| 397 | 397 | ]); |
| 398 | 398 | } |
| 399 | - if ((int)$siteId !== 0) { |
|
| 399 | + if ((int) $siteId !== 0) { |
|
| 400 | 400 | $query->andWhere(['siteId' => $siteId]); |
| 401 | 401 | } |
| 402 | 402 | if ($filter !== '') { |
@@ -417,9 +417,9 @@ discard block |
||
| 417 | 417 | $user = Craft::$app->getUser()->getIdentity(); |
| 418 | 418 | // Massage the stats |
| 419 | 419 | foreach ($stats as &$stat) { |
| 420 | - $stat['cnt'] = (int)$stat['cnt']; |
|
| 421 | - $stat['craftCount'] = (int)$stat['craftCount']; |
|
| 422 | - $stat['boomerangCount'] = (int)$stat['boomerangCount']; |
|
| 420 | + $stat['cnt'] = (int) $stat['cnt']; |
|
| 421 | + $stat['craftCount'] = (int) $stat['craftCount']; |
|
| 422 | + $stat['boomerangCount'] = (int) $stat['boomerangCount']; |
|
| 423 | 423 | // Decode any emojis in the title |
| 424 | 424 | if (!empty($stat['title'])) { |
| 425 | 425 | $stat['title'] = html_entity_decode($stat['title'], ENT_NOQUOTES, 'UTF-8'); |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | ->andWhere(['between', '[[webperf_error_samples.dateCreated]]', $start, $end]) |
| 537 | 537 | ->leftJoin('{{%webperf_data_samples}} webperf_data_samples', '[[webperf_data_samples.requestId]] = [[webperf_error_samples.requestId]]') |
| 538 | 538 | ; |
| 539 | - if ((int)$siteId !== 0) { |
|
| 539 | + if ((int) $siteId !== 0) { |
|
| 540 | 540 | $query->andWhere(['siteId' => $siteId]); |
| 541 | 541 | } |
| 542 | 542 | if ($filter !== '') { |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | $stats['dateCreated'] = $date->format('Y-m-d H:i:s'); |
| 565 | 565 | } |
| 566 | 566 | if (isset($stat['mobile'])) { |
| 567 | - $stat['mobile'] = (bool)$stat['mobile']; |
|
| 567 | + $stat['mobile'] = (bool) $stat['mobile']; |
|
| 568 | 568 | } |
| 569 | 569 | // Decode any emojis in the title |
| 570 | 570 | if (!empty($stat['title'])) { |