Completed
Push — componentlibrary_featureless ( f542c2...921b57 )
by Dominik
01:42
created
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.
lib/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.
Components/ListComponents/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 use Flynt\ComponentManager;
7 7
 use Flynt\Utils\Asset;
8 8
 
9
-add_filter('Flynt/addComponentData?name=ListComponents', function ($data) {
9
+add_filter('Flynt/addComponentData?name=ListComponents', function($data) {
10 10
     if (!empty($data['componentBlocks'])) {
11
-        $data['componentBlocks'] = array_map(function ($block) {
11
+        $data['componentBlocks'] = array_map(function($block) {
12 12
             $componentPaths = explode('/', $block['component']);
13
-            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3));
13
+            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3));
14 14
 
15 15
             if (file_exists(Asset::requirePath($block['component'] . 'screenshot.png'))) {
16 16
                 $src = Asset::requireUrl($block['component'] . 'screenshot.png');
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 });
37 37
 
38 38
 
39
-add_filter('acf/load_field/name=component', function ($field) {
39
+add_filter('acf/load_field/name=component', function($field) {
40 40
     $componentManager = ComponentManager::getInstance();
41 41
     $field['choices'] = array_flip($componentManager->getAll());
42 42
     return $field;
Please login to merge, or discard this patch.
inc/fieldGroups/pageComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Api;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'pageComponents',
9 9
         'title' => 'Page Components',
Please login to merge, or discard this patch.
inc/fieldGroups/postComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Api;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'postComponents',
9 9
         'title' => 'Post Components',
Please login to merge, or discard this patch.
lib/Api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public static function registerHooks()
81 81
     {
82
-        add_filter('Flynt/renderComponent', function ($output, $componentName, $data) {
82
+        add_filter('Flynt/renderComponent', function($output, $componentName, $data) {
83 83
             return apply_filters(
84 84
                 "Flynt/renderComponent?name={$componentName}",
85 85
                 $output,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             );
89 89
         }, 10, 3);
90 90
 
91
-        add_filter('Flynt/addComponentData', function ($data, $componentName) {
91
+        add_filter('Flynt/addComponentData', function($data, $componentName) {
92 92
             return apply_filters(
93 93
                 "Flynt/addComponentData?name={$componentName}",
94 94
                 $data,
Please login to merge, or discard this patch.
lib/Init.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public static function setTemplateDirectory()
41 41
     {
42
-        add_action('after_switch_theme', function () {
42
+        add_action('after_switch_theme', function() {
43 43
             $stylesheet = get_option('stylesheet');
44 44
 
45 45
             if (basename($stylesheet) !== 'templates') {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }
48 48
         });
49 49
 
50
-        add_filter('stylesheet', function ($stylesheet) {
50
+        add_filter('stylesheet', function($stylesheet) {
51 51
             return dirname($stylesheet);
52 52
         });
53 53
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
 
63 63
         if (!$acfActive) {
64
-            add_filter('template_include', function () {
64
+            add_filter('template_include', function() {
65 65
                 die(
66 66
                     'One or more required plugins are not activated! Please <a href="'
67 67
                     . esc_url(admin_url('plugins.php'))
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     protected static function notifyRequiredPluginIsMissing($pluginName)
77 77
     {
78
-        add_action('admin_notices', function () use ($pluginName) {
78
+        add_action('admin_notices', function() use ($pluginName) {
79 79
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
80 80
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
81 81
         });
Please login to merge, or discard this patch.
Components/BlockVideoOembed/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\Api;
6 6
 use Flynt\Utils\Oembed;
7 7
 
8
-add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) {
8
+add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) {
9 9
     $data['video'] = Oembed::setSrcAsDataAttribute(
10 10
         $data['oembed'],
11 11
         [
Please login to merge, or discard this patch.
Components/ListPostCards/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
 use Flynt\Api;
5 5
 use Timber\Timber;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListPostCards', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListPostCards', function($data) {
8 8
     $posts = Timber::get_posts([
9 9
         'post_type'         => 'post',
10 10
         'posts_per_page'    => 4,
Please login to merge, or discard this patch.