@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'AVG('.$column.') AS avg', |
83 | 83 | ]) |
84 | 84 | ->where("dateUpdated >= ( CURDATE() - INTERVAL '{$days}' DAY )"); |
85 | - if ((int)$siteId !== 0) { |
|
85 | + if ((int) $siteId !== 0) { |
|
86 | 86 | $query->andWhere(['siteId' => $siteId]); |
87 | 87 | } |
88 | 88 | $stats = $query->all(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'AVG("'.$column.'") AS avg', |
96 | 96 | ]) |
97 | 97 | ->where("\"dateUpdated\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )"); |
98 | - if ((int)$siteId !== 0) { |
|
98 | + if ((int) $siteId !== 0) { |
|
99 | 99 | $query->andWhere(['siteId' => $siteId]); |
100 | 100 | } |
101 | 101 | $stats = $query->all(); |
@@ -147,8 +147,8 @@ discard block |
||
147 | 147 | } |
148 | 148 | if ($stats) { |
149 | 149 | $data = [ |
150 | - (int)$stats, |
|
151 | - (int)$handledStats, |
|
150 | + (int) $stats, |
|
151 | + (int) $handledStats, |
|
152 | 152 | ]; |
153 | 153 | } |
154 | 154 |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } else { |
113 | 113 | $variables['sitesMenuLabel'] = Craft::t( |
114 | 114 | 'site', |
115 | - $sites->getSiteById((int)$variables['currentSiteId'])->name |
|
115 | + $sites->getSiteById((int) $variables['currentSiteId'])->name |
|
116 | 116 | ); |
117 | 117 | } |
118 | 118 | } else { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | if (($parsed = parse_url(self::getBaseUrl($site))) === false) { |
175 | - Craft::warning('Unable to parse the site base URL: ' . $site->baseUrl); |
|
175 | + Craft::warning('Unable to parse the site base URL: '.$site->baseUrl); |
|
176 | 176 | continue; |
177 | 177 | } |
178 | 178 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | // Does the site URL specify a base path? |
185 | 185 | $parsedPath = !empty($parsed['path']) ? self::normalizePath($parsed['path']) : ''; |
186 | - if ($parsedPath && strpos($fullUri . '/', $parsedPath . '/') !== 0) { |
|
186 | + if ($parsedPath && strpos($fullUri.'/', $parsedPath.'/') !== 0) { |
|
187 | 187 | continue; |
188 | 188 | } |
189 | 189 | |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | protected static function getBaseUrl(Site $site): string |
258 | 258 | { |
259 | 259 | if ($site->baseUrl) { |
260 | - return rtrim(Craft::parseEnv($site->baseUrl), '/') . '/'; |
|
260 | + return rtrim(Craft::parseEnv($site->baseUrl), '/').'/'; |
|
261 | 261 | } |
262 | 262 | |
263 | 263 | return null; |