@@ -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__ |
@@ -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__ |
@@ -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__ |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | ->orderBy(['sortOrder' => SORT_ASC]) |
521 | 521 | ->all(); |
522 | 522 | |
523 | - return ArrayHelper::map($results, 'uriPattern', function ($results) { |
|
523 | + return ArrayHelper::map($results, 'uriPattern', function($results) { |
|
524 | 524 | return ['template' => $results['template']]; |
525 | 525 | }); |
526 | 526 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | Event::on( |
59 | 59 | CraftVariable::class, |
60 | 60 | CraftVariable::EVENT_INIT, |
61 | - function (Event $event) { |
|
61 | + function(Event $event) { |
|
62 | 62 | /** @var CraftVariable $variable */ |
63 | 63 | $variable = $event->sender; |
64 | 64 | $variable->set('routeMap', RouteMapVariable::class); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | Event::on( |
70 | 70 | Elements::class, |
71 | 71 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
72 | - function (ElementEvent $event) { |
|
72 | + function(ElementEvent $event) { |
|
73 | 73 | Craft::debug( |
74 | 74 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
75 | 75 | __METHOD__ |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | if ($bustCache) { |
87 | 87 | Craft::debug( |
88 | - 'Cache busted due to saving: ' . \get_class($element) . ' - ' . $element->title, |
|
88 | + 'Cache busted due to saving: '.\get_class($element).' - '.$element->title, |
|
89 | 89 | __METHOD__ |
90 | 90 | ); |
91 | 91 | RouteMap::$plugin->routes->invalidateCache(); |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | Event::on( |
98 | 98 | ClearCaches::class, |
99 | 99 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
100 | - function (RegisterCacheOptionsEvent $event) { |
|
100 | + function(RegisterCacheOptionsEvent $event) { |
|
101 | 101 | $event->options[] = [ |
102 | 102 | 'key' => 'route-map', |
103 | 103 | 'label' => Craft::t('route-map', 'Route Map Cache'), |
104 | - 'action' => function () { |
|
104 | + 'action' => function() { |
|
105 | 105 | RouteMap::$plugin->routes->invalidateCache(); |
106 | 106 | }, |
107 | 107 | ]; |