@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | ]); |
| 166 | 166 | |
| 167 | 167 | // Just return the data if it's already cached |
| 168 | - $routes = $cache->getOrSet($cacheKey, function () use ($section, $format, $siteId) { |
|
| 168 | + $routes = $cache->getOrSet($cacheKey, function() use ($section, $format, $siteId) { |
|
| 169 | 169 | Craft::info( |
| 170 | 170 | 'Route Map cache miss: '.$section, |
| 171 | 171 | __METHOD__ |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $sites = $section->getSiteSettings(); |
| 178 | 178 | |
| 179 | 179 | foreach ($sites as $site) { |
| 180 | - if ($site->hasUrls && ($siteId === null || (int)$site->siteId === $siteId)) { |
|
| 180 | + if ($site->hasUrls && ($siteId === null || (int) $site->siteId === $siteId)) { |
|
| 181 | 181 | // Get section data to return |
| 182 | 182 | $route = [ |
| 183 | 183 | 'handle' => $section->handle, |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | ], |
| 281 | 281 | ]); |
| 282 | 282 | // Just return the data if it's already cached |
| 283 | - $routes = $cache->getOrSet($cacheKey, function () use ($category, $handle, $format, $siteId) { |
|
| 283 | + $routes = $cache->getOrSet($cacheKey, function() use ($category, $handle, $format, $siteId) { |
|
| 284 | 284 | Craft::info( |
| 285 | 285 | 'Route Map cache miss: '.$category, |
| 286 | 286 | __METHOD__ |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $sites = $category->getSiteSettings(); |
| 292 | 292 | |
| 293 | 293 | foreach ($sites as $site) { |
| 294 | - if ($site->hasUrls && ($siteId === null || (int)$site->siteId === $siteId)) { |
|
| 294 | + if ($site->hasUrls && ($siteId === null || (int) $site->siteId === $siteId)) { |
|
| 295 | 295 | // Get section data to return |
| 296 | 296 | $route = [ |
| 297 | 297 | 'handle' => $category->handle, |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | ]); |
| 345 | 345 | |
| 346 | 346 | // Just return the data if it's already cached |
| 347 | - $assetUrls = $cache->getOrSet($cacheKey, function () use ($uri, $assetTypes, $siteId) { |
|
| 347 | + $assetUrls = $cache->getOrSet($cacheKey, function() use ($uri, $assetTypes, $siteId) { |
|
| 348 | 348 | Craft::info( |
| 349 | 349 | 'Route Map cache miss: '.$uri, |
| 350 | 350 | __METHOD__ |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | ]); |
| 427 | 427 | |
| 428 | 428 | // Just return the data if it's already cached |
| 429 | - $urls = $cache->getOrSet($cacheKey, function () use ($elementClass, $criteria) { |
|
| 429 | + $urls = $cache->getOrSet($cacheKey, function() use ($elementClass, $criteria) { |
|
| 430 | 430 | Craft::info( |
| 431 | 431 | 'Route Map cache miss: '.$elementClass, |
| 432 | 432 | __METHOD__ |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | ->orderBy(['sortOrder' => SORT_ASC]) |
| 525 | 525 | ->all(); |
| 526 | 526 | |
| 527 | - return ArrayHelper::map($results, 'uriPattern', function ($results) { |
|
| 527 | + return ArrayHelper::map($results, 'uriPattern', function($results) { |
|
| 528 | 528 | return ['template' => $results['template']]; |
| 529 | 529 | }); |
| 530 | 530 | } |