Completed
Push — componentlibrary ( b8e554...0baa2a )
by Doğa
01:37
created
lib/Utils/FileLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         if (count($files) === 0) {
45 45
             $dir = get_template_directory() . '/' . $dir;
46 46
 
47
-            self::iterateDir($dir, function ($file) {
47
+            self::iterateDir($dir, function($file) {
48 48
                 if ($file->isDir()) {
49 49
                     $dirPath = trim(str_replace(get_template_directory(), '', $file->getPathname()), '/');
50 50
                     self::loadPhpFiles($dirPath);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 }
55 55
             });
56 56
         } else {
57
-            array_walk($files, function ($file) use ($dir) {
57
+            array_walk($files, function($file) use ($dir) {
58 58
                 $filePath = $dir . '/' . ltrim($file, '/');
59 59
 
60 60
                 if (!locate_template($filePath, true, true)) {
Please login to merge, or discard this patch.
lib/Utils/Log.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
     public static function consoleDebug($data, $postpone = true, $title = 'PHP', $logType = 'log')
23 23
     {
24 24
         if (in_array($logType, ['log', 'error', 'trace'])) {
25
-            $title .= '(' . self::getCallerFile(2) .'):';
25
+            $title .= '(' . self::getCallerFile(2) . '):';
26 26
             $type = gettype($data);
27 27
             $output = json_encode($data);
28
-            $result =  "<script>console.{$logType}('{$title}', '({$type})', {$output});</script>\n";
28
+            $result = "<script>console.{$logType}('{$title}', '({$type})', {$output});</script>\n";
29 29
             self::echoDebug($result, $postpone);
30 30
         }
31 31
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected static function echoDebug($data, $postpone)
47 47
     {
48 48
         if ($postpone) {
49
-            add_action('wp_footer', function () use ($data) {
49
+            add_action('wp_footer', function() use ($data) {
50 50
                 echo $data;
51 51
             }, 30);
52 52
         } else {
Please login to merge, or discard this patch.
lib/Utils/ArrayHelpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
      */
35 35
     public static function indexedValuesToAssocKeys(array $array)
36 36
     {
37
-        $values = array_map(function ($value) {
37
+        $values = array_map(function($value) {
38 38
             return is_array($value) ? $value : [];
39 39
         }, $array);
40 40
 
41
-        $keys = array_map(function ($key) use ($array) {
41
+        $keys = array_map(function($key) use ($array) {
42 42
             return is_int($key) ? $array[$key] : $key;
43 43
         }, array_keys($array));
44 44
 
Please login to merge, or discard this patch.
inc/options.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 function addOptionsToComponent($data, $componentName)
15 15
 {
16 16
     // get fields for this component
17
-    $options = array_reduce(array_keys(Options::OPTION_TYPES), function ($carry, $optionType) use ($componentName) {
17
+    $options = array_reduce(array_keys(Options::OPTION_TYPES), function($carry, $optionType) use ($componentName) {
18 18
         return array_merge($carry, Options::get($optionType, 'Component', $componentName));
19 19
     }, []);
20 20
     // don't overwrite existing data
Please login to merge, or discard this patch.
lib/Utils/Asset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,10 +149,10 @@
 block discarded – undo
149 149
         }
150 150
         if ($type === 'style') {
151 151
             global $wp_styles;
152
-            $repo =& $wp_styles;
152
+            $repo = & $wp_styles;
153 153
         } else {
154 154
             global $wp_scripts;
155
-            $repo =& $wp_scripts;
155
+            $repo = & $wp_scripts;
156 156
         }
157 157
 
158 158
         $asset = $repo->query($handle, 'registered');
Please login to merge, or discard this patch.
inc/theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-add_action('after_setup_theme', function () {
3
+add_action('after_setup_theme', function() {
4 4
     add_theme_support('title-tag');
5 5
     add_theme_support('post-thumbnails');
6 6
 });
Please login to merge, or discard this patch.
lib/Utils/Options.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             acf_add_local_field_group($fieldGroup);
88 88
         }
89 89
 
90
-        add_action('current_screen', function ($currentScreen) {
90
+        add_action('current_screen', function($currentScreen) {
91 91
             foreach (static::OPTION_TYPES as $optionType => $option) {
92 92
                 $isTranslatable = $option['translatable'];
93 93
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                     add_filter('acf/settings/current_language', 'Flynt\Utils\Options::getDefaultAcfLanguage', 101);
102 102
 
103 103
                     // hide language selector in admin bar
104
-                    add_action('wp_before_admin_bar_render', function () {
104
+                    add_action('wp_before_admin_bar_render', function() {
105 105
                         $adminBar = $GLOBALS['wp_admin_bar'];
106 106
                         $adminBar->remove_menu('WPML_ALS');
107 107
                     });
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $optionNames = (((static::$registeredOptions[$optionType] ?? [])[lcfirst($optionCategory)] ?? [])[$subPageName] ?? []);
152 152
             return array_combine(
153 153
                 $optionNames,
154
-                array_map(function ($optionName) use ($prefix, $isTranslatable) {
154
+                array_map(function($optionName) use ($prefix, $isTranslatable) {
155 155
                     $fieldKey = $prefix . $optionName;
156 156
                     return static::getOptionField($fieldKey, $isTranslatable);
157 157
                 }, $optionNames)
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
     protected static function prefixFields($fields, $prefix)
237 237
     {
238
-        return array_map(function ($field) use ($prefix) {
238
+        return array_map(function($field) use ($prefix) {
239 239
             $field['name'] = $prefix . '_' . $field['name'];
240 240
             return $field;
241 241
         }, $fields);
Please login to merge, or discard this patch.
Components/ListSearchResults/functions.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
 use Flynt\Utils\Options;
7 7
 use Timber\Timber;
8 8
 
9
-add_filter('Flynt/addComponentData?name=ListSearchResults', function ($data) {
9
+add_filter('Flynt/addComponentData?name=ListSearchResults', function($data) {
10 10
     $data['prevIcon'] = Asset::getContents('Components/ListSearchResults/Assets/navigation-prev.svg');
11 11
     $data['nextIcon'] = Asset::getContents('Components/ListSearchResults/Assets/navigation-next.svg');
12 12
     $data['searchIcon'] = Asset::getContents('Components/ListSearchResults/Assets/search.svg');
Please login to merge, or discard this patch.
lib/ComponentManager.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@
 block discarded – undo
15 15
         return self::$instance;
16 16
     }
17 17
 
18
-  /**
19
-   * clone
20
-   *
21
-   * Prevent cloning with 'protected' keyword
22
-  **/
18
+    /**
19
+     * clone
20
+     *
21
+     * Prevent cloning with 'protected' keyword
22
+     **/
23 23
     protected function __clone()
24 24
     {
25 25
     }
26 26
 
27
-  /**
28
-   * constructor
29
-   *
30
-   * Prevent instantiation with 'protected' keyword
31
-  **/
27
+    /**
28
+     * constructor
29
+     *
30
+     * Prevent instantiation with 'protected' keyword
31
+     **/
32 32
     protected function __construct()
33 33
     {
34 34
     }
Please login to merge, or discard this patch.