Completed
Pull Request — master (#195)
by Dominik
03:10 queued 25s
created
Features/Acf/FieldGroupComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             return;
39 39
         }
40 40
 
41
-        FileLoader::iterateDir($dir, function ($file) {
41
+        FileLoader::iterateDir($dir, function($file) {
42 42
             if ($file->getExtension() === 'json') {
43 43
                 $filePath = $file->getPathname();
44 44
                 $config = json_decode(file_get_contents($filePath), true);
Please login to merge, or discard this patch.
Features/Acf/OptionPages.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         self::createOptionPages();
72 72
 
73 73
         // Register Categories
74
-        add_action('acf/init', function () {
74
+        add_action('acf/init', function() {
75 75
             foreach (self::$optionCategories as $categoryName => $categorySettings) {
76 76
                 $name = ucfirst($categoryName);
77 77
                 $registerFn = "add{$name}SubPages";
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         // find and replace relevant keys, then return an array of all options for this Sub-Page
133 133
         $optionKeys = is_array($options) ? array_keys($options) : [];
134
-        $options = array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) {
134
+        $options = array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) {
135 135
             $count = 0;
136 136
             $option = $options[$key];
137 137
             $key = str_replace($prefix, '', $key, $count);
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public static function addComponentData($data, $parentData, $config)
156 156
     {
157 157
         // get fields for this component
158
-        $options = array_reduce(array_keys(self::$optionTypes), function ($carry, $optionType) use ($config) {
158
+        $options = array_reduce(array_keys(self::$optionTypes), function($carry, $optionType) use ($config) {
159 159
             return array_merge($carry, self::get($optionType, 'Component', $config['name']));
160 160
         }, []);
161 161
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             ];
224 224
         }
225 225
 
226
-        add_action('current_screen', function ($currentScreen) {
226
+        add_action('current_screen', function($currentScreen) {
227 227
             foreach (self::$optionTypes as $optionType => $option) {
228 228
                 $isTranslatable = $option['translatable'];
229 229
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                     add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101);
238 238
 
239 239
                     // hide language selector in admin bar
240
-                    add_action('wp_before_admin_bar_render', function () {
240
+                    add_action('wp_before_admin_bar_render', function() {
241 241
                         $adminBar = $GLOBALS['wp_admin_bar'];
242 242
                         $adminBar->remove_menu('WPML_ALS');
243 243
                     });
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
     protected static function prefixFields($fields, $prefix)
336 336
     {
337
-        return array_map(function ($field) use ($prefix) {
337
+        return array_map(function($field) use ($prefix) {
338 338
             $field['name'] = $prefix . '_' . $field['name'];
339 339
             return $field;
340 340
         }, $fields);
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
     protected static function combineArrayDefaults(array $array, array $defaults)
387 387
     {
388
-        return array_map(function ($value) use ($defaults) {
388
+        return array_map(function($value) use ($defaults) {
389 389
             return is_array($value) ? array_merge($defaults, $value) : [];
390 390
         }, $array);
391 391
     }
Please login to merge, or discard this patch.
Features/Acf/FieldLoader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
             $filterNamespace = self::FILTER_NAMESPACES[$type];
85 85
             $filterName = "{$filterNamespace}/{$name}/Fields/{$groupKey}";
86 86
 
87
-            add_filter($filterName, function ($config) use ($groupValue) {
87
+            add_filter($filterName, function($config) use ($groupValue) {
88 88
                 return $groupValue;
89 89
             });
90 90
             if (ArrayHelpers::isAssoc($groupValue) && array_key_exists('sub_fields', $groupValue)) {
91 91
                 $filterName .= '/SubFields';
92 92
                 $subFields = $groupValue['sub_fields'];
93 93
 
94
-                add_filter($filterName, function ($subFieldsconfig) use ($subFields) {
94
+                add_filter($filterName, function($subFieldsconfig) use ($subFields) {
95 95
                     return $subFields;
96 96
                 });
97 97
                 self::addFilterForSubFields($filterName, $subFields);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $subFieldName = ucfirst($subField['name']);
115 115
             $subFilterName = $parentFilterName . "/{$subFieldName}";
116 116
 
117
-            add_filter($subFilterName, function ($subFieldConfig) use ($subField) {
117
+            add_filter($subFilterName, function($subFieldConfig) use ($subField) {
118 118
                 return $subField;
119 119
             });
120 120
         }
Please login to merge, or discard this patch.