@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | Event::on( |
| 106 | 106 | View::class, |
| 107 | 107 | View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE, |
| 108 | - function (TemplateEvent $event) { |
|
| 108 | + function(TemplateEvent $event) { |
|
| 109 | 109 | self::$templateName = $event->template; |
| 110 | 110 | } |
| 111 | 111 | ); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | Event::on( |
| 114 | 114 | CraftVariable::class, |
| 115 | 115 | CraftVariable::EVENT_INIT, |
| 116 | - function (Event $event) { |
|
| 116 | + function(Event $event) { |
|
| 117 | 117 | /** @var CraftVariable $variable */ |
| 118 | 118 | $variable = $event->sender; |
| 119 | 119 | $variable->set('twigpack', ManifestVariable::class); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | Event::on( |
| 124 | 124 | TemplateCaches::class, |
| 125 | 125 | TemplateCaches::EVENT_AFTER_DELETE_CACHES, |
| 126 | - function (DeleteTemplateCachesEvent $event) { |
|
| 126 | + function(DeleteTemplateCachesEvent $event) { |
|
| 127 | 127 | // Invalidate the caches when template caches are deleted |
| 128 | 128 | $this->clearAllCaches(); |
| 129 | 129 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | Event::on( |
| 133 | 133 | Plugins::class, |
| 134 | 134 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 135 | - function (PluginEvent $event) { |
|
| 135 | + function(PluginEvent $event) { |
|
| 136 | 136 | if ($event->plugin === $this) { |
| 137 | 137 | // Invalidate our caches after we've been installed |
| 138 | 138 | $this->clearAllCaches(); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | Event::on( |
| 144 | 144 | ClearCaches::class, |
| 145 | 145 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
| 146 | - function (RegisterCacheOptionsEvent $event) { |
|
| 146 | + function(RegisterCacheOptionsEvent $event) { |
|
| 147 | 147 | Craft::debug( |
| 148 | 148 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
| 149 | 149 | __METHOD__ |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $cache = Craft::$app->getCache(); |
| 408 | 408 | $file = $cache->getOrSet( |
| 409 | 409 | self::CACHE_KEY.$path, |
| 410 | - function () use ($path, $callback) { |
|
| 410 | + function() use ($path, $callback) { |
|
| 411 | 411 | $result = null; |
| 412 | 412 | $contents = @file_get_contents($path); |
| 413 | 413 | if ($contents) { |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | protected static function combinePaths(string ...$paths): string |
| 438 | 438 | { |
| 439 | 439 | $last_key = \count($paths) - 1; |
| 440 | - array_walk($paths, function (&$val, $key) use ($last_key) { |
|
| 440 | + array_walk($paths, function(&$val, $key) use ($last_key) { |
|
| 441 | 441 | switch ($key) { |
| 442 | 442 | case 0: |
| 443 | 443 | $val = rtrim($val, '/ '); |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | * |
| 151 | 151 | * @return string |
| 152 | 152 | */ |
| 153 | - public function getFileFromManifest(string $fileName, string $type = 'legacy', $config = null): string |
|
| 153 | + public function getFileFromManifest(string $fileName, string $type = 'legacy', $config = null): string |
|
| 154 | 154 | { |
| 155 | 155 | $settings = Twigpack::$plugin->getSettings(); |
| 156 | 156 | $config = $config ?? $settings->getAttributes(); |