@@ -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__ |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $cache = Craft::$app->getCache(); |
327 | 327 | $file = $cache->getOrSet( |
328 | 328 | self::CACHE_KEY.$path, |
329 | - function () use ($path, $callback) { |
|
329 | + function() use ($path, $callback) { |
|
330 | 330 | $result = @file_get_contents($path); |
331 | 331 | if ($result && $callback) { |
332 | 332 | $result = $callback($result); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | protected static function combinePaths(string ...$paths): string |
353 | 353 | { |
354 | 354 | $last_key = \count($paths) - 1; |
355 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
355 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
356 | 356 | switch ($key) { |
357 | 357 | case 0: |
358 | 358 | $val = rtrim($val, '/ '); |