Passed
Push — master ( a7c067...435961 )
by M. Mikkel
06:32
created
src/services/TemplateCachesService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/CacheFlag.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.