@@ -66,7 +66,7 @@ |
||
66 | 66 | return $value; |
67 | 67 | } |
68 | 68 | $pattern = '/([a-z])([A-Z])/'; |
69 | - $r = \strtolower(\preg_replace_callback($pattern, function ($a) { |
|
69 | + $r = \strtolower(\preg_replace_callback($pattern, function($a) { |
|
70 | 70 | return $a[1] . ' ' . \strtolower($a[2]); |
71 | 71 | }, $value)); |
72 | 72 | return $r; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | return true; |
52 | 52 | } |
53 | 53 | |
54 | - /** |
|
54 | + /** |
|
55 | 55 | * @inheritdoc |
56 | 56 | */ |
57 | 57 | public function safeDown() |
@@ -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 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $flags = \preg_replace('/\s+/', '', $flags); |
33 | 33 | $flags = \array_filter(\explode(',', $flags)); |
34 | 34 | } else if (\is_array($flags)) { |
35 | - $flags = \array_reduce($flags, function (array $carry, string $flag) { |
|
35 | + $flags = \array_reduce($flags, function(array $carry, string $flag) { |
|
36 | 36 | $flag = \preg_replace('/\s+/', '', $flag); |
37 | 37 | if (\strlen($flag)) { |
38 | 38 | $carry[] = $flag; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | // Make sure the cache was tagged w/ the same flags |
66 | 66 | $flagTags = $this->_getTagsForFlags($flags); |
67 | - $cachedFlagTags = \array_filter($tags, function (string $tag) { |
|
67 | + $cachedFlagTags = \array_filter($tags, function(string $tag) { |
|
68 | 68 | return \strpos($tag, 'cacheflag') === 0 || $tag === 'element' || $tag === 'template'; |
69 | 69 | }); |
70 | 70 | |
@@ -207,14 +207,14 @@ discard block |
||
207 | 207 | { |
208 | 208 | $tagsArray = ['template', 'cacheflag']; |
209 | 209 | if (\is_array($flags)) { |
210 | - $flags = \implode(',', \array_map(function ($flag) { |
|
210 | + $flags = \implode(',', \array_map(function($flag) { |
|
211 | 211 | return \preg_replace('/\s+/', '', $flag); |
212 | 212 | }, $flags)); |
213 | 213 | } else { |
214 | 214 | $flags = \preg_replace('/\s+/', '', $flags); |
215 | 215 | } |
216 | 216 | $flags = \array_filter(\explode($delimiter, $flags)); |
217 | - $tagsArray = \array_merge($tagsArray, \array_map(function (string $flag) { |
|
217 | + $tagsArray = \array_merge($tagsArray, \array_map(function(string $flag) { |
|
218 | 218 | return "cacheflag::$flag"; |
219 | 219 | }, $flags)); |
220 | 220 | if ($this->_collectElementTags) { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | // Add tag option to the Clear Caches utility to invalidate all flagged caches |
100 | 100 | Event::on(ClearCaches::class, ClearCaches::EVENT_REGISTER_TAG_OPTIONS, |
101 | - static function (RegisterCacheOptionsEvent $event) { |
|
101 | + static function(RegisterCacheOptionsEvent $event) { |
|
102 | 102 | $event->options[] = [ |
103 | 103 | 'key' => 'cacheflag-flagged-caches', |
104 | 104 | 'label' => Craft::t('cache-flag', 'Flagged template caches'), |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | Event::on( |
113 | 113 | CraftVariable::class, |
114 | 114 | CraftVariable::EVENT_INIT, |
115 | - function (Event $event) { |
|
115 | + function(Event $event) { |
|
116 | 116 | /** @var CraftVariable $variable */ |
117 | 117 | $variable = $event->sender; |
118 | 118 | $variable->set('cacheFlagCp', CpVariable::class); |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | Event::on( |
159 | 159 | Plugins::class, |
160 | 160 | Plugins::EVENT_AFTER_UNINSTALL_PLUGIN, |
161 | - function (PluginEvent $event) { |
|
161 | + function(PluginEvent $event) { |
|
162 | 162 | if ($event->plugin === $this) { |
163 | 163 | Craft::$app->getProjectConfig()->remove('cacheFlags'); |
164 | 164 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | Event::on( |
176 | 176 | Elements::class, |
177 | 177 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
178 | - function (ElementEvent $event) { |
|
178 | + function(ElementEvent $event) { |
|
179 | 179 | $this->_maybeInvalidateFlaggedCachesByElement($event->element); |
180 | 180 | } |
181 | 181 | ); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | Event::on( |
185 | 185 | Elements::class, |
186 | 186 | Elements::EVENT_BEFORE_DELETE_ELEMENT, |
187 | - function (ElementEvent $event) { |
|
187 | + function(ElementEvent $event) { |
|
188 | 188 | $this->_maybeInvalidateFlaggedCachesByElement($event->element); |
189 | 189 | } |
190 | 190 | ); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | Event::on( |
194 | 194 | Structures::class, |
195 | 195 | Structures::EVENT_AFTER_MOVE_ELEMENT, |
196 | - function (MoveElementEvent $event) { |
|
196 | + function(MoveElementEvent $event) { |
|
197 | 197 | $this->_maybeInvalidateFlaggedCachesByElement($event->element); |
198 | 198 | } |
199 | 199 | ); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | Event::on( |
203 | 203 | Elements::class, |
204 | 204 | Elements::EVENT_AFTER_PERFORM_ACTION, |
205 | - function (ElementActionEvent $event) { |
|
205 | + function(ElementActionEvent $event) { |
|
206 | 206 | |
207 | 207 | /* @var ElementActionInterface|null $action */ |
208 | 208 | $action = $event->action; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use Rector\Set\ValueObject\SetList; |
8 | 8 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
9 | 9 | |
10 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
10 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
11 | 11 | $containerConfigurator->import(CraftSetList::CRAFT_CMS_40); |
12 | 12 | $containerConfigurator->import(SetList::CODE_QUALITY); |
13 | 13 | $containerConfigurator->import(LevelSetList::UP_TO_PHP_72); |