Completed
Push — master ( c8e708...99aa56 )
by Doğa
47:09 queued 44:04
created
lib/Utils/ArrayHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,18 +17,18 @@
 block discarded – undo
17 17
     // only converts first dimension of object
18 18
     public static function objectToArray($obj)
19 19
     {
20
-        return array_map(function ($val) {
20
+        return array_map(function($val) {
21 21
             return (array) $val;
22 22
         }, $obj);
23 23
     }
24 24
 
25 25
     public static function indexedValuesToAssocKeys(array $array)
26 26
     {
27
-        $values = array_map(function ($value) {
27
+        $values = array_map(function($value) {
28 28
             return is_array($value) ? $value : [];
29 29
         }, $array);
30 30
 
31
-        $keys = array_map(function ($key) use ($array) {
31
+        $keys = array_map(function($key) use ($array) {
32 32
             return is_int($key) ? $array[$key] : $key;
33 33
         }, array_keys($array));
34 34
 
Please login to merge, or discard this patch.
Features/CustomPostTypes/Translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         if (is_array($value)) {
52 52
             // Loop through array and apply translations while keeping keys intact
53 53
             // NOTE: assuming it's a single dimensional array
54
-            return array_reduce(array_keys($value), function ($carry, $key) use ($value) {
54
+            return array_reduce(array_keys($value), function($carry, $key) use ($value) {
55 55
                 return array_merge($carry, [
56 56
                     $key => _x($value[$key], $key, 'flynt-starter-theme')
57 57
                 ]);
Please login to merge, or discard this patch.
Features/Components/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 // register all components
13 13
 $componentPath = trailingslashit(Feature::getOption('flynt-components', 0));
14 14
 
15
-add_action('Flynt/afterRegisterFeatures', function () use ($componentPath) {
15
+add_action('Flynt/afterRegisterFeatures', function() use ($componentPath) {
16 16
     if (is_dir($componentPath)) {
17 17
         $components = [];
18
-        FileLoader::iterateDir($componentPath, function ($dir) use (&$components) {
18
+        FileLoader::iterateDir($componentPath, function($dir) use (&$components) {
19 19
             if ($dir->isDir()) {
20 20
                 $components[] = $dir->getFilename();
21 21
             }
@@ -26,6 +26,6 @@  discard block
 block discarded – undo
26 26
 });
27 27
 
28 28
 // set Component Path
29
-add_filter('Flynt/componentPath', function ($defaultPath, $componentName) use ($componentPath) {
29
+add_filter('Flynt/componentPath', function($defaultPath, $componentName) use ($componentPath) {
30 30
     return $componentPath . $componentName;
31 31
 }, 10, 2);
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
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         // find and replace relevant keys, then return an array of all options for this Sub-Page
117 117
         $optionKeys = is_array($options) ? array_keys($options) : [];
118
-        $options = array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) {
118
+        $options = array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) {
119 119
             $count = 0;
120 120
             $option = $options[$key];
121 121
             $key = str_replace($prefix, '', $key, $count);
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
             12
145 145
         );
146 146
 
147
-        add_filter('Flynt/addComponentData', function ($data, $parentData, $config) {
147
+        add_filter('Flynt/addComponentData', function($data, $parentData, $config) {
148 148
 
149 149
             // get fields for this component
150
-            $options = array_reduce(array_keys(self::$optionTypes), function ($carry, $optionType) use ($config) {
150
+            $options = array_reduce(array_keys(self::$optionTypes), function($carry, $optionType) use ($config) {
151 151
                 return array_merge($carry, self::getOptions($optionType, 'Component', $config['name']));
152 152
             }, []);
153 153
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             ];
248 248
         }
249 249
 
250
-        add_action('current_screen', function ($currentScreen) {
250
+        add_action('current_screen', function($currentScreen) {
251 251
             foreach (self::$optionTypes as $optionType => $option) {
252 252
                 $isTranslatable = $option['translatable'];
253 253
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                     add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101);
262 262
 
263 263
                     // hide language selector in admin bar
264
-                    add_action('wp_before_admin_bar_render', function () {
264
+                    add_action('wp_before_admin_bar_render', function() {
265 265
                         $adminBar = $GLOBALS['wp_admin_bar'];
266 266
                         $adminBar->remove_menu('WPML_ALS');
267 267
                     });
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
     protected static function prefixFields($fields, $prefix)
359 359
     {
360
-        return array_map(function ($field) use ($prefix) {
360
+        return array_map(function($field) use ($prefix) {
361 361
             $field['name'] = $prefix . '_' . $field['name'];
362 362
             return $field;
363 363
         }, $fields);
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 
409 409
     protected static function combineArrayDefaults(array $array, array $defaults)
410 410
     {
411
-        return array_map(function ($value) use ($defaults) {
411
+        return array_map(function($value) use ($defaults) {
412 412
             return is_array($value) ? array_merge($defaults, $value) : [];
413 413
         }, $array);
414 414
     }
Please login to merge, or discard this patch.
Features/Acf/GoogleMaps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 {
7 7
     public static function init()
8 8
     {
9
-        add_filter('acf/fields/google_map/api', function ($api) {
9
+        add_filter('acf/fields/google_map/api', function($api) {
10 10
             $apiKey = OptionPages::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey');
11 11
             if ($apiKey) {
12 12
                 $api['key'] = $apiKey;
Please login to merge, or discard this patch.