@@ -87,7 +87,7 @@ |
||
87 | 87 | 'elementTypes' => [ |
88 | 88 | 'column' => 'elementType', |
89 | 89 | 'name' => Craft::t('app', 'Element Types'), |
90 | - 'sources' => \array_map(function (string $elementType) { |
|
90 | + 'sources' => \array_map(function(string $elementType) { |
|
91 | 91 | return [ |
92 | 92 | 'id' => $elementType, |
93 | 93 | 'name' => $elementType, |
@@ -333,7 +333,7 @@ |
||
333 | 333 | ])); |
334 | 334 | } |
335 | 335 | |
336 | - $flagTags = \array_map(function (string $flag) { |
|
336 | + $flagTags = \array_map(function(string $flag) { |
|
337 | 337 | return "cacheflag::$flag"; |
338 | 338 | }, $flags); |
339 | 339 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | Event::on( |
95 | 95 | Elements::class, |
96 | 96 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
97 | - function (ElementEvent $event) { |
|
97 | + function(ElementEvent $event) { |
|
98 | 98 | $element = $event->element; |
99 | 99 | if (!$element || ElementHelper::isDraftOrRevision($element)) { |
100 | 100 | return; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | Event::on( |
108 | 108 | Elements::class, |
109 | 109 | Elements::EVENT_BEFORE_DELETE_ELEMENT, |
110 | - function (ElementEvent $event) { |
|
110 | + function(ElementEvent $event) { |
|
111 | 111 | $element = $event->element; |
112 | 112 | if (!$element || ElementHelper::isDraftOrRevision($element)) { |
113 | 113 | return; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | Event::on( |
121 | 121 | Structures::class, |
122 | 122 | Structures::EVENT_AFTER_MOVE_ELEMENT, |
123 | - function (MoveElementEvent $event) { |
|
123 | + function(MoveElementEvent $event) { |
|
124 | 124 | $element = $event->element; |
125 | 125 | if (!$element || ElementHelper::isDraftOrRevision($element)) { |
126 | 126 | return; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | Event::on( |
134 | 134 | Elements::class, |
135 | 135 | Elements::EVENT_AFTER_PERFORM_ACTION, |
136 | - function (ElementActionEvent $event) { |
|
136 | + function(ElementActionEvent $event) { |
|
137 | 137 | |
138 | 138 | /* @var ElementQueryInterface|null $criteria */ |
139 | 139 | $criteria = $event->criteria; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | // Add option to the Clear Caches utility to invalidate all flagged caches |
167 | 167 | Event::on(ClearCaches::class, ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
168 | - static function (RegisterCacheOptionsEvent $event) { |
|
168 | + static function(RegisterCacheOptionsEvent $event) { |
|
169 | 169 | $event->options[] = [ |
170 | 170 | 'key' => 'cacheflag-flagged-caches', |
171 | 171 | 'label' => Craft::t('cache-flag', 'Flagged template caches'), |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | Event::on( |
180 | 180 | CraftVariable::class, |
181 | 181 | CraftVariable::EVENT_INIT, |
182 | - function (Event $event) { |
|
182 | + function(Event $event) { |
|
183 | 183 | /** @var CraftVariable $variable */ |
184 | 184 | $variable = $event->sender; |
185 | 185 | $variable->set('cacheFlagCp', CpVariable::class); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | Event::on( |
203 | 203 | Plugins::class, |
204 | 204 | Plugins::EVENT_AFTER_UNINSTALL_PLUGIN, |
205 | - function (PluginEvent $event) { |
|
205 | + function(PluginEvent $event) { |
|
206 | 206 | if ($event->plugin === $this) { |
207 | 207 | Craft::$app->getProjectConfig()->remove('cacheFlags'); |
208 | 208 | } |