Passed
Push — master ( 553534...d77e2c )
by Dominik
06:58 queued 03:32
created
inc/timberLoader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post
28 28
 add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100);
29
-add_filter('get_twig', function ($twig) {
29
+add_filter('get_twig', function($twig) {
30 30
     $twig->addExtension(new TwigExtensionFlynt());
31 31
     return $twig;
32 32
 });
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 function formatGallery($value)
43 43
 {
44 44
     if (!empty($value)) {
45
-        $value = array_map(function ($image) {
45
+        $value = array_map(function($image) {
46 46
             return new Image($image);
47 47
         }, $value);
48 48
     }
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     return $value;
68 68
 }
69 69
 
70
-add_action('timber/twig/filters', function ($twig) {
71
-    $twig->addFunction(new TwigFunction('placeholderImage', function ($width, $height, $color = null) {
70
+add_action('timber/twig/filters', function($twig) {
71
+    $twig->addFunction(new TwigFunction('placeholderImage', function($width, $height, $color = null) {
72 72
         $width = round($width);
73 73
         $height = round($height);
74 74
         $colorRect = $color ? "<rect width='{$width}' height='{$height}' style='fill:$color' />" : '';
Please login to merge, or discard this patch.
inc/timberDynamicResize.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     return $wpdb->prefix . TABLE_NAME;
18 18
 }
19 19
 
20
-call_user_func(function () {
20
+call_user_func(function() {
21 21
     $optionName = TABLE_NAME . '_db_version';
22 22
 
23 23
     $installedVersion = get_option($optionName);
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
     return $uploadDir['relative'];
47 47
 }
48 48
 
49
-add_action('timber/twig/filters', function ($twig) {
49
+add_action('timber/twig/filters', function($twig) {
50 50
     $twig->addFilter(
51
-        new TwigFilter('resizeDynamic', function (
51
+        new TwigFilter('resizeDynamic', function(
52 52
             $src,
53 53
             $w,
54 54
             $h = 0,
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
             global $flyntResizedImages;
74 74
             if (empty($flyntResizedImages)) {
75
-                add_action('shutdown', function () {
75
+                add_action('shutdown', function() {
76 76
                     storeResizedUrls();
77 77
                 }, -1);
78 78
             }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     return $twig;
92 92
 });
93 93
 
94
-Routes::map(IMAGE_ROUTE, function () {
94
+Routes::map(IMAGE_ROUTE, function() {
95 95
     $uploadDirRelative = getRelativeUploadDir();
96 96
     $src = str_replace(
97 97
         trailingslashit($uploadDirRelative) . IMAGE_PATH_SEPARATOR,
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     if ($localDev) {
116 116
         $src = http_build_url($homeUrl, ['path' => $urlParts['path']]);
117 117
     }
118
-    $moveImageFunction = function ($location) use ($uploadDirRelative) {
118
+    $moveImageFunction = function($location) use ($uploadDirRelative) {
119 119
         return str_replace(
120 120
             $uploadDirRelative,
121 121
             trailingslashit($uploadDirRelative) . IMAGE_PATH_SEPARATOR,
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
 
192 192
 add_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule');
193 193
 
194
-add_action('after_switch_theme', function () {
194
+add_action('after_switch_theme', function() {
195 195
     add_action('shutdown', 'flush_rewrite_rules');
196 196
 });
197 197
 
198
-add_action('switch_theme', function () {
198
+add_action('switch_theme', function() {
199 199
     remove_filter('mod_rewrite_rules', 'Flynt\\TimberDynamicResize\\addRewriteRule');
200 200
     flush_rewrite_rules();
201 201
 });
Please login to merge, or discard this patch.