@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | Event::on( |
| 98 | 98 | CraftVariable::class, |
| 99 | 99 | CraftVariable::EVENT_INIT, |
| 100 | - function (Event $event) { |
|
| 100 | + function(Event $event) { |
|
| 101 | 101 | /** @var CraftVariable $variable */ |
| 102 | 102 | $variable = $event->sender; |
| 103 | 103 | $variable->set('twigpack', ManifestVariable::class); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | Event::on( |
| 108 | 108 | TemplateCaches::class, |
| 109 | 109 | TemplateCaches::EVENT_AFTER_DELETE_CACHES, |
| 110 | - function (DeleteTemplateCachesEvent $event) { |
|
| 110 | + function(DeleteTemplateCachesEvent $event) { |
|
| 111 | 111 | // Invalidate the caches when template caches are deleted |
| 112 | 112 | $this->clearAllCaches(); |
| 113 | 113 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | Event::on( |
| 117 | 117 | Plugins::class, |
| 118 | 118 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 119 | - function (PluginEvent $event) { |
|
| 119 | + function(PluginEvent $event) { |
|
| 120 | 120 | if ($event->plugin === $this) { |
| 121 | 121 | // Invalidate our caches after we've been installed |
| 122 | 122 | $this->clearAllCaches(); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | Event::on( |
| 128 | 128 | ClearCaches::class, |
| 129 | 129 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
| 130 | - function (RegisterCacheOptionsEvent $event) { |
|
| 130 | + function(RegisterCacheOptionsEvent $event) { |
|
| 131 | 131 | Craft::debug( |
| 132 | 132 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
| 133 | 133 | __METHOD__ |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $cache = Craft::$app->getCache(); |
| 259 | 259 | $file = $cache->getOrSet( |
| 260 | 260 | self::CACHE_KEY.$path, |
| 261 | - function () use ($path) { |
|
| 261 | + function() use ($path) { |
|
| 262 | 262 | $result = null; |
| 263 | 263 | $string = @file_get_contents($path); |
| 264 | 264 | if ($string) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | protected static function combinePaths(string ...$paths): string |
| 286 | 286 | { |
| 287 | 287 | $last_key = \count($paths) - 1; |
| 288 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
| 288 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
| 289 | 289 | switch ($key) { |
| 290 | 290 | case 0: |
| 291 | 291 | $val = rtrim($val, '/ '); |