Completed
Pull Request — master (#214)
by Dominik
05:45 queued 01:46
created
lib/Utils/TimberDynamicResize.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         add_filter('init', [$this, 'addRewriteTag']);
64 64
         add_action('generate_rewrite_rules', [$this, 'registerRewriteRule']);
65
-        add_action('parse_request', function ($wp) {
65
+        add_action('parse_request', function($wp) {
66 66
             if (isset($wp->query_vars[static::IMAGE_QUERY_VAR])) {
67 67
                 $this->checkAndGenerateImage($wp->query_vars[static::IMAGE_QUERY_VAR]);
68 68
             }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     protected function addHooks()
73 73
     {
74
-        add_action('timber/twig/filters', function ($twig) {
74
+        add_action('timber/twig/filters', function($twig) {
75 75
             $twig->addFilter(
76 76
                 new TwigFilter('resizeDynamic', [$this, 'resizeDynamic'])
77 77
             );
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
             add_filter('mod_rewrite_rules', [$this, 'addWebpRewriteRule']);
82 82
         }
83 83
         if ($this->enabled || $this->webpEnabled) {
84
-            add_action('after_switch_theme', function () {
84
+            add_action('after_switch_theme', function() {
85 85
                 add_action('shutdown', 'flush_rewrite_rules');
86 86
             });
87
-            add_action('switch_theme', function () {
87
+            add_action('switch_theme', function() {
88 88
                 remove_filter('mod_rewrite_rules', [$this, 'addWebpRewriteRule']);
89 89
                 flush_rewrite_rules();
90 90
             });
Please login to merge, or discard this patch.