Passed
Pull Request — master (#258)
by Dominik
05:19
created
lib/Customizer/Typography/Control.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $json['default'] = $this->default ?? $this->setting->default;
62 62
         $json['defaultKey'] = sanitize_title($json['default']['family']);
63 63
         $json['fonts'] = $fonts;
64
-        $json['variants'] = array_filter($fonts[$key]['variants'], function ($variant) {
64
+        $json['variants'] = array_filter($fonts[$key]['variants'], function($variant) {
65 65
             return strpos($variant, 'italic') === false;
66 66
         });
67 67
         return $json;
Please login to merge, or discard this patch.
inc/cssVariables.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use Flynt\Variables;
10 10
 use Flynt\Utils\ColorHelpers;
11 11
 
12
-add_action('wp_head', function () {
12
+add_action('wp_head', function() {
13 13
     $variables = getCssVariables();
14 14
     ?>
15 15
     <style type="text/css">
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     return $fields;
61 61
 }
62 62
 
63
-add_filter('Flynt/cssVariable?type=color', function ($variable, $value, $field) {
63
+add_filter('Flynt/cssVariable?type=color', function($variable, $value, $field) {
64 64
     if (isset($field['hsl'])) {
65 65
         $colorHsla = ColorHelpers::hexToHsla($value);
66 66
         $variable["{$field['name']}-h"] = $colorHsla[0];
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
     return $variable;
72 72
 }, 10, 3);
73 73
 
74
-add_filter('Flynt/cssVariable?type=flynt-range', function ($variable, $value, $field) {
74
+add_filter('Flynt/cssVariable?type=flynt-range', function($variable, $value, $field) {
75 75
     $unit = $field['unit'] ?? '';
76 76
     $variable[$field['name']] = $value . $unit;
77 77
 
78 78
     return $variable;
79 79
 }, 10, 3);
80 80
 
81
-add_filter('Flynt/cssVariable?type=flynt-typography', function ($variable, $value, $field) {
81
+add_filter('Flynt/cssVariable?type=flynt-typography', function($variable, $value, $field) {
82 82
     $fontFamily = array_filter([
83 83
         $value['family'] ?? '',
84 84
         $field['fallback'] ?? '',
Please login to merge, or discard this patch.
inc/googleFonts.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 use Flynt\Variables;
10 10
 
11
-add_action('wp_enqueue_scripts', function () {
11
+add_action('wp_enqueue_scripts', function() {
12 12
     $url = getFontsUrl();
13 13
 
14 14
     if ($url) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
     }
51 51
 
52
-    return array_map(function ($setting) {
52
+    return array_map(function($setting) {
53 53
         return implode(',', array_values(array_unique($setting)));
54 54
     }, $settings);
55 55
 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
     }
71 71
 
72
-    return array_values(array_filter($fields, function ($field) {
72
+    return array_values(array_filter($fields, function($field) {
73 73
         return $field['type'] === 'flynt-typography';
74 74
     }));
75 75
 }
Please login to merge, or discard this patch.
inc/timberDynamicResize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use Flynt\Utils\Options;
6 6
 use Flynt\Utils\TimberDynamicResize;
7 7
 
8
-add_action('acf/init', function () {
8
+add_action('acf/init', function() {
9 9
     global $timberDynamicResize;
10 10
     $timberDynamicResize = new TimberDynamicResize();
11 11
 });
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 add_filter(
40 40
     'acf/load_field/key=field_global_TimberDynamicResize_relativeUploadPath',
41
-    function ($field) {
41
+    function($field) {
42 42
         $field['placeholder'] = TimberDynamicResize::getDefaultRelativeUploadDir();
43 43
         return $field;
44 44
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 add_action(
48 48
     'update_option_options_global_TimberDynamicResize_dynamicImageGeneration',
49
-    function ($oldValue, $value) {
49
+    function($oldValue, $value) {
50 50
         global $timberDynamicResize;
51 51
         $timberDynamicResize->toggleDynamic($value === '1');
52 52
     },
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 add_action(
58 58
     'update_option_options_global_TimberDynamicResize_relativeUploadPath',
59
-    function ($oldValue, $value) {
59
+    function($oldValue, $value) {
60 60
         global $timberDynamicResize;
61 61
         $timberDynamicResize->changeRelativeUploadPath($value);
62 62
     },
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 );
66 66
 
67 67
 # WPML REWRITE FIX
68
-add_filter('mod_rewrite_rules', function ($rules) {
68
+add_filter('mod_rewrite_rules', function($rules) {
69 69
     $homeRoot = parse_url(home_url());
70 70
     if (isset($homeRoot['path'])) {
71 71
         $homeRoot = trailingslashit($homeRoot['path']);
Please login to merge, or discard this patch.
lib/Utils/TimberDynamicResize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,17 +72,17 @@  discard block
 block discarded – undo
72 72
 
73 73
     protected function addHooks()
74 74
     {
75
-        add_action('timber/twig/filters', function ($twig) {
75
+        add_action('timber/twig/filters', function($twig) {
76 76
             $twig->addFilter(
77 77
                 new TwigFilter('resizeDynamic', [$this, 'resizeDynamic'])
78 78
             );
79 79
             return $twig;
80 80
         });
81 81
         if ($this->enabled) {
82
-            add_action('after_switch_theme', function () {
82
+            add_action('after_switch_theme', function() {
83 83
                 add_action('shutdown', 'flush_rewrite_rules');
84 84
             });
85
-            add_action('switch_theme', function () {
85
+            add_action('switch_theme', function() {
86 86
                 flush_rewrite_rules(true);
87 87
             });
88 88
         }
@@ -285,14 +285,14 @@  discard block
 block discarded – undo
285 285
             remove_action('generate_rewrite_rules', [$this, 'registerRewriteRule']);
286 286
             remove_action('parse_request', [$this, 'parseRequest']);
287 287
         }
288
-        add_action('shutdown', function () {
288
+        add_action('shutdown', function() {
289 289
             flush_rewrite_rules(false);
290 290
         });
291 291
     }
292 292
 
293 293
     public function changeRelativeUploadPath($relativeUploadPath)
294 294
     {
295
-        add_action('shutdown', function () {
295
+        add_action('shutdown', function() {
296 296
             flush_rewrite_rules(false);
297 297
         });
298 298
     }
Please login to merge, or discard this patch.