@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ->from(['{{%webperf_data_samples}}']) |
87 | 87 | ->where(['not', [$column => null]]) |
88 | 88 | ; |
89 | - if ((int)$siteId !== 0) { |
|
89 | + if ((int) $siteId !== 0) { |
|
90 | 90 | $query->andWhere(['siteId' => $siteId]); |
91 | 91 | } |
92 | 92 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ['not', ['title' => '']], |
113 | 113 | ]) |
114 | 114 | ; |
115 | - if ((int)$siteId !== 0) { |
|
115 | + if ((int) $siteId !== 0) { |
|
116 | 116 | $query->andWhere(['siteId' => $siteId]); |
117 | 117 | } |
118 | 118 | $result = $query->one(); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | ->from('{{%webperf_data_samples}}') |
303 | 303 | ->average('[[pageLoad]]'); |
304 | 304 | if (!empty($stats)) { |
305 | - $threshold = (int)($stats * self::OUTLIER_PAGELOAD_MULTIPLIER); |
|
305 | + $threshold = (int) ($stats * self::OUTLIER_PAGELOAD_MULTIPLIER); |
|
306 | 306 | // Delete any samples that are far above average |
307 | 307 | try { |
308 | 308 | $result = $db->createCommand()->delete( |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | $now = round(microtime(true) * 1000); |
426 | 426 | $cache = Craft::$app->getCache(); |
427 | 427 | $then = $cache->get(self::LAST_DATASAMPLES_TRIM_CACHE_KEY); |
428 | - if (($then !== false) && ($now - (int)$then < Webperf::$settings->samplesRateLimitMs)) { |
|
428 | + if (($then !== false) && ($now - (int) $then < Webperf::$settings->samplesRateLimitMs)) { |
|
429 | 429 | $limited = true; |
430 | 430 | } |
431 | 431 | $cache->set(self::LAST_DATASAMPLES_TRIM_CACHE_KEY, $now, 0); |