Passed
Pull Request — master (#60)
by Markus
04:19
created
lib/Defaults.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         return $output;
26 26
     }
27 27
 
28
-  // this action needs to be removed by the user if they want to overwrite this functionality
28
+    // this action needs to be removed by the user if they want to overwrite this functionality
29 29
     public static function loadFunctionsFile($componentName)
30 30
     {
31 31
         $componentManager = ComponentManager::getInstance();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             return '';
40 40
         }
41 41
 
42
-        $data = function () use ($componentData) {
42
+        $data = function() use ($componentData) {
43 43
             $args = func_get_args();
44 44
             array_unshift($args, $componentData);
45 45
             return Helpers::extractNestedDataFromArray($args);
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
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     public static function registerHooks()
74 74
     {
75
-        add_filter('Flynt/renderComponent', function ($output, $componentName, $data) {
75
+        add_filter('Flynt/renderComponent', function($output, $componentName, $data) {
76 76
             return apply_filters(
77 77
                 "Flynt/renderComponent?name={$componentName}",
78 78
                 $output,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             );
82 82
         }, 10, 3);
83 83
 
84
-        add_filter('Flynt/addComponentData', function ($data, $componentName) {
84
+        add_filter('Flynt/addComponentData', function($data, $componentName) {
85 85
             return apply_filters(
86 86
                 "Flynt/addComponentData?name={$componentName}",
87 87
                 $data,
Please login to merge, or discard this patch.
lib/Init.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
         $pluginUrl = esc_url(admin_url('plugins.php'));
71 71
         $message = ["${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\"${pluginUrl}\">plugin page</a>."];
72 72
         $options = [
73
-          'type' => 'error',
74
-          'title' => 'Flynt is missing a required plugin',
75
-          'dismissible' => false,
73
+            'type' => 'error',
74
+            'title' => 'Flynt is missing a required plugin',
75
+            'dismissible' => false,
76 76
         ];
77 77
 
78 78
         $manager->addNotice($message, $options);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public static function setTemplateDirectory()
34 34
     {
35
-        add_action('after_switch_theme', function () {
35
+        add_action('after_switch_theme', function() {
36 36
             $stylesheet = get_option('stylesheet');
37 37
 
38 38
             if (basename($stylesheet) !== 'templates') {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             }
41 41
         });
42 42
 
43
-        add_filter('stylesheet', function ($stylesheet) {
43
+        add_filter('stylesheet', function($stylesheet) {
44 44
             return dirname($stylesheet);
45 45
         });
46 46
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         if (!$acfActive) {
53 53
             self::notifyRequiredPluginIsMissing('ACF');
54
-            add_filter('template_include', function () {
54
+            add_filter('template_include', function() {
55 55
                 die(
56 56
                     'One or more required plugins are not activated! Please <a href="'
57 57
                     . esc_url(admin_url('plugins.php'))
Please login to merge, or discard this patch.
Components/NavigationBurger/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
 use Flynt\Utils\Asset;
7 7
 use Flynt\Utils\Options;
8 8
 
9
-add_action('init', function () {
9
+add_action('init', function() {
10 10
     register_nav_menus([
11 11
         'navigation_burger' => __('Navigation Burger', 'flynt')
12 12
     ]);
13 13
 });
14 14
 
15
-add_filter('Flynt/addComponentData?name=NavigationBurger', function ($data) {
15
+add_filter('Flynt/addComponentData?name=NavigationBurger', function($data) {
16 16
     $data['menu'] = new Timber\Menu('navigation_burger');
17 17
     $data['logo'] = [
18 18
         'src' => Asset::requireUrl(
Please login to merge, or discard this patch.
Components/NavigationMain/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 use Timber;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_action('init', function () {
8
+add_action('init', function() {
9 9
     register_nav_menus([
10 10
         'navigation_main' => __('Navigation Main', 'flynt')
11 11
     ]);
12 12
 });
13 13
 
14
-add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) {
14
+add_filter('Flynt/addComponentData?name=NavigationMain', function($data) {
15 15
     $data['menu'] = new Timber\Menu('navigation_main');
16 16
     $data['logo'] = [
17 17
         'src' => Asset::requireUrl('Components/NavigationMain/Assets/logo.svg'),
Please login to merge, or discard this patch.
Components/SliderImages/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\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderImages', function ($data) {
8
+add_filter('Flynt/addComponentData?name=SliderImages', function($data) {
9 9
     $translatableOptions = Options::get('translatableOptions', 'feature', 'SliderOptions');
10 10
     $data['jsonData'] = [
11 11
         'options' => array_merge($translatableOptions, $data['options']),
Please login to merge, or discard this patch.
Components/SliderImagesCentered/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\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderImagesCentered', function ($data) {
8
+add_filter('Flynt/addComponentData?name=SliderImagesCentered', function($data) {
9 9
     $translatableOptions = Options::get('translatableOptions', 'feature', 'SliderOptions');
10 10
     $data['jsonData'] = [
11 11
         'options' => array_merge($translatableOptions, $data['options']),
Please login to merge, or discard this patch.
Components/GridPostsSlider/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 Timber\Timber;
7 7
 use Flynt\Utils\Options;
8 8
 
9
-add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) {
9
+add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) {
10 10
     $posts = Timber::get_posts([
11 11
         'post_type'         => 'post',
12 12
         'posts_per_page'    => -1,
Please login to merge, or discard this patch.
inc/timberDynamicResize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     return $wpdb->prefix . TABLE_NAME;
18 18
 }
19 19
 
20
-call_user_func(function () {
20
+call_user_func(function() {
21 21
     $optionName = TABLE_NAME . '_db_version';
22 22
 
23 23
     $installedVersion = get_option($optionName);
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
     }
42 42
 });
43 43
 
44
-add_action('timber/twig/filters', function ($twig) {
45
-    $twig->addFilter(new Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) {
44
+add_action('timber/twig/filters', function($twig) {
45
+    $twig->addFilter(new Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) {
46 46
         $resizeOp = new Timber\Image\Operation\Resize($w, $h, $crop);
47 47
         $fileinfo = pathinfo($src);
48 48
         $resizedUrl = $resizeOp->filename($fileinfo['dirname'] . '/' . $fileinfo['filename'], $fileinfo['extension']);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     return $twig;
66 66
 });
67 67
 
68
-Routes::map(IMAGE_ROUTE, function () {
68
+Routes::map(IMAGE_ROUTE, function() {
69 69
     $src = str_replace('/app/uploads/' . IMAGE_PATH_SEPARATOR . '/', '/app/uploads/', home_url($_GET['src'] ?? ''));
70 70
 
71 71
     global $wpdb;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     if ($localDev) {
83 83
         $src = http_build_url($homeUrl, ['path' => $urlParts['path']]);
84 84
     }
85
-    $moveImageFunction = function ($location) {
85
+    $moveImageFunction = function($location) {
86 86
         return str_replace('/app/uploads/', '/app/uploads/' . IMAGE_PATH_SEPARATOR . '/', $location);
87 87
     };
88 88
     add_filter('timber/image/new_url', $moveImageFunction);
Please login to merge, or discard this patch.