Completed
Push — componentlibrary ( e8d0dd...512a9e )
by
unknown
01:37
created
inc/Utils/TwigExtensionFlynt.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@
 block discarded – undo
29 29
         return $output;
30 30
     }
31 31
 
32
+    /**
33
+     * @param string $componentName
34
+     */
32 35
     public function renderComponent(Twig_Environment $env, $context, $componentName, $data = [], $withContext = true, $ignoreMissing = false, $sandboxed = false)
33 36
     {
34 37
         $data = $this->getComponentData($data, $componentName);
Please login to merge, or discard this patch.
inc/Bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public static function setTemplateDirectory()
8 8
     {
9
-        add_action('after_switch_theme', function () {
9
+        add_action('after_switch_theme', function() {
10 10
             $stylesheet = get_option('stylesheet');
11 11
 
12 12
             if (basename($stylesheet) !== 'templates') {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             }
15 15
         });
16 16
 
17
-        add_filter('stylesheet', function ($stylesheet) {
17
+        add_filter('stylesheet', function($stylesheet) {
18 18
             return dirname($stylesheet);
19 19
         });
20 20
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         }
34 34
 
35 35
         if (!$acfActive || !$flyntCoreActive) {
36
-            add_filter('template_include', function () {
36
+            add_filter('template_include', function() {
37 37
                 die(
38 38
                     'One or more required plugins are not activated! Please <a href="'
39 39
                     . esc_url(admin_url('plugins.php'))
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected static function notifyRequiredPluginIsMissing($pluginName)
49 49
     {
50
-        add_action('admin_notices', function () use ($pluginName) {
50
+        add_action('admin_notices', function() use ($pluginName) {
51 51
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
52 52
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
53 53
         });
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Flynt\Utils\Asset;
4 4
 
5
-add_action('wp_enqueue_scripts', function () {
5
+add_action('wp_enqueue_scripts', function() {
6 6
     Asset::register([
7 7
         'name' => 'console-polyfill',
8 8
         'type' => 'script',
Please login to merge, or discard this patch.
Features/ComponentLogServer/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
8 8
 
9
-add_action('Flynt/afterRegisterComponents', function () {
9
+add_action('Flynt/afterRegisterComponents', function() {
10 10
     $componentManager = Flynt\ComponentManager::getInstance();
11 11
     $componentWhitelist = [];
12 12
     if (isset($_GET['component']) && !empty($_GET['component'])) {
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 {
42 42
     $type = gettype($data);
43 43
     $output = json_encode($data);
44
-    $result =  "<script>console.log({$output});</script>\n";
44
+    $result = "<script>console.log({$output});</script>\n";
45 45
     echoDebug($result, $postpone);
46 46
 }
47 47
 
48 48
 function consoleTable($data, $postpone = true)
49 49
 {
50 50
     $output = json_encode($data);
51
-    $result =  "<script>console.table({$output});</script>\n";
51
+    $result = "<script>console.table({$output});</script>\n";
52 52
     echoDebug($result, $postpone);
53 53
 }
54 54
 
55 55
 function echoDebug($data, $postpone)
56 56
 {
57 57
     if ($postpone) {
58
-        add_action('wp_footer', function () use ($data) {
58
+        add_action('wp_footer', function() use ($data) {
59 59
             echo $data;
60 60
         }, 30);
61 61
     } else {
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
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public static function init()
10 10
     {
11
-        add_filter('acf/fields/google_map/api', function ($api) {
11
+        add_filter('acf/fields/google_map/api', function($api) {
12 12
             $apiKey = Options::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey');
13 13
             if ($apiKey) {
14 14
                 $api['key'] = $apiKey;
Please login to merge, or discard this patch.
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/Core/Flynt/Defaults.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         return $output;
28 28
     }
29 29
 
30
-  // this action needs to be removed by the user if they want to overwrite this functionality
30
+    // this action needs to be removed by the user if they want to overwrite this functionality
31 31
     public static function loadFunctionsFile($componentName)
32 32
     {
33 33
         $componentManager = ComponentManager::getInstance();
Please login to merge, or discard this 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/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.
inc/Utils/Feature.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @since 0.1.0
17 17
      *
18
-     * @param string $feature Name of the feature.
18
+     * @param string $featureName Name of the feature.
19 19
      *
20 20
      * @return array|null Returns an array of options or null if the feature wasn't found.
21 21
      */
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @since 0.1.0
34 34
      *
35
-     * @param string $feature Name of the feature.
35
+     * @param string $featureName Name of the feature.
36 36
      * @param string $key The option key.
37 37
      *
38 38
      * @return mixed|null Returns the option or null if the option / the feature doesn't exist.
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @since 0.1.0
65 65
      *
66
-     * @param string $feature Name of the feature.
66
+     * @param string $featureName Name of the feature.
67 67
      * @param string $basePath The feature base path.
68 68
      * @param array $options An array of options. Optional.
69 69
      *
70
-     * @return boolean
70
+     * @return boolean|null
71 71
      */
72 72
     public static function register($featureName, $basePath, $options = [])
73 73
     {
Please login to merge, or discard this patch.