Completed
Push — constructionplanless ( d2cf5e...f41850 )
by Dominik
22s
created
inc/Utils/Options.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             acf_add_local_field_group($fieldGroup);
86 86
         }
87 87
 
88
-        add_action('current_screen', function ($currentScreen) {
88
+        add_action('current_screen', function($currentScreen) {
89 89
             foreach (static::OPTION_TYPES as $optionType => $option) {
90 90
                 $isTranslatable = $option['translatable'];
91 91
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101);
100 100
 
101 101
                     // hide language selector in admin bar
102
-                    add_action('wp_before_admin_bar_render', function () {
102
+                    add_action('wp_before_admin_bar_render', function() {
103 103
                         $adminBar = $GLOBALS['wp_admin_bar'];
104 104
                         $adminBar->remove_menu('WPML_ALS');
105 105
                     });
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     protected static function prefixFields($fields, $prefix)
220 220
     {
221
-        return array_map(function ($field) use ($prefix) {
221
+        return array_map(function($field) use ($prefix) {
222 222
             $field['name'] = $prefix . '_' . $field['name'];
223 223
             return $field;
224 224
         }, $fields);
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
     protected static function collectOptionsWithPrefix($options, $prefix)
283 283
     {
284 284
         $optionKeys = is_array($options) ? array_keys($options) : [];
285
-        return array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) {
285
+        return array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) {
286 286
             $count = 0;
287 287
             $option = $options[$key];
288 288
             $key = str_replace($prefix, '', $key, $count);
Please login to merge, or discard this patch.
inc/Utils/Component.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         }
17 17
 
18 18
         // collect script dependencies
19
-        $scriptDeps = array_reduce($dependencies, function ($list, $dependency) {
19
+        $scriptDeps = array_reduce($dependencies, function($list, $dependency) {
20 20
             if ($dependency['type'] === 'script') {
21 21
                 array_push($list, $dependency['name']);
22 22
             }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         }
36 36
 
37 37
         // collect style dependencies
38
-        $styleDeps = array_reduce($dependencies, function ($list, $dependency) {
38
+        $styleDeps = array_reduce($dependencies, function($list, $dependency) {
39 39
             if ($dependency['type'] === 'style') {
40 40
                 array_push($list, $dependency['name']);
41 41
             }
Please login to merge, or discard this patch.
inc/Core/Flynt/Defaults.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,13 +48,13 @@
 block discarded – undo
48 48
             return '';
49 49
         }
50 50
 
51
-        $area = function ($areaName) use ($areaHtml) {
51
+        $area = function($areaName) use ($areaHtml) {
52 52
             if (array_key_exists($areaName, $areaHtml)) {
53 53
                 return $areaHtml[$areaName];
54 54
             }
55 55
         };
56 56
 
57
-        $data = function () use ($componentData) {
57
+        $data = function() use ($componentData) {
58 58
             $args = func_get_args();
59 59
             array_unshift($args, $componentData);
60 60
             return Helpers::extractNestedDataFromArray($args);
Please login to merge, or discard this patch.
inc/Core/Flynt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     return is_null($output) ? '' : $output;
44 44
 }
45 45
 
46
-add_filter('Flynt/renderComponent', function ($output, $componentName, $data) {
46
+add_filter('Flynt/renderComponent', function($output, $componentName, $data) {
47 47
     return apply_filters(
48 48
         "Flynt/renderComponent?name={$componentName}",
49 49
         $output,
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     );
53 53
 }, 10, 3);
54 54
 
55
-add_filter('Flynt/addComponentData', function ($data, $componentName) {
55
+add_filter('Flynt/addComponentData', function($data, $componentName) {
56 56
     return apply_filters(
57 57
         "Flynt/addComponentData?name={$componentName}",
58 58
         $data,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
     foreach ($fields as $key => $fieldData) {
70 70
         $key = ucfirst($key);
71
-        add_filter("Flynt/{$type}/{$scope}/Fields/{$key}", function () use ($fieldData) {
71
+        add_filter("Flynt/{$type}/{$scope}/Fields/{$key}", function() use ($fieldData) {
72 72
             return $fieldData;
73 73
         });
74 74
     }
Please login to merge, or discard this patch.
Features/TimberLoader/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post
24 24
 add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100);
25
-add_filter('get_twig', function ($twig) {
25
+add_filter('get_twig', function($twig) {
26 26
     $twig->addExtension(new TwigExtensionFlynt());
27 27
     return $twig;
28 28
 });
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 function formatGallery($value)
39 39
 {
40 40
     if (!empty($value)) {
41
-        $value = array_map(function ($image) {
41
+        $value = array_map(function($image) {
42 42
             return new Image($image);
43 43
         }, $value);
44 44
     }
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
     return $value;
64 64
 }
65 65
 
66
-add_action('timber/twig/filters', function ($twig) {
67
-    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
66
+add_action('timber/twig/filters', function($twig) {
67
+    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
68 68
         $ratio = aspectToRatio($aspect);
69 69
         //create image with specified sizes
70 70
         $image = imagecreatetruecolor($ratio['width'], $ratio['height']);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     $k2 = 1;
94 94
     $b = 1 / $n;
95 95
     do {
96
-        $b = 1/$b;
96
+        $b = 1 / $b;
97 97
         $a = floor($b);
98 98
         $aux = $h1;
99 99
         $h1 = $a * $h1 + $h2;
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
     return crypt(serialize($args), NONCE_SALT);
116 116
 }
117 117
 
118
-add_action('timber/twig/filters', function ($twig) {
119
-    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) {
118
+add_action('timber/twig/filters', function($twig) {
119
+    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) {
120 120
         $arguments = [
121 121
             'src' => $src,
122 122
             'w' => $w,
Please login to merge, or discard this patch.
Components/ListTestimonialCards/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListTestimonialCards', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListTestimonialCards', function($data) {
8 8
     Component::enqueueAssets('ListTestimonialCards');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.
Components/ListFacts/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListFacts', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListFacts', function($data) {
8 8
     Component::enqueueAssets('ListFacts', [
9 9
         [
10 10
             'name' => 'countup',
Please login to merge, or discard this patch.
Components/GridPostsSlider/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 // use Flynt\Utils\Asset;
6 6
 use Flynt\Features\Components\Component;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) {
9 9
     Component::enqueueAssets('GridPostsSlider', [
10 10
         [
11 11
             'name' => 'slick-carousel',
Please login to merge, or discard this patch.