Passed
Branch options (6cb94b)
by Dominik
06:35
created
Components/FeaturePasswordForm/functions.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 add_filter('the_password_form', function ($output) {
9 9
     $context = Timber::get_context();
10 10
     $context['form'] = [
11
-      'url' => site_url('/wp-login.php?action=postpass', 'login_post')
11
+        'url' => site_url('/wp-login.php?action=postpass', 'login_post')
12 12
     ];
13 13
 
14 14
     return Timber::fetch('index.twig', $context);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Timber\Timber;
6 6
 use Timber\Post;
7 7
 
8
-add_filter('the_password_form', function ($output) {
8
+add_filter('the_password_form', function($output) {
9 9
     $context = Timber::get_context();
10 10
     $context['form'] = [
11 11
       'url' => site_url('/wp-login.php?action=postpass', 'login_post')
Please login to merge, or discard this patch.
Components/NavigationFooter/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 
5 5
 use Timber\Menu;
6 6
 
7
-add_action('init', function () {
7
+add_action('init', function() {
8 8
     register_nav_menus([
9 9
         'navigation_footer' => __('Navigation Footer', 'flynt')
10 10
     ]);
11 11
 });
12 12
 
13
-add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) {
13
+add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) {
14 14
     $data['maxLevel'] = 0;
15 15
     $data['menu'] = new Menu('navigation_footer');
16 16
 
Please login to merge, or discard this patch.
Components/ListSocial/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_filter('Flynt/addComponentData?name=ListSocial', function ($data) {
8
+add_filter('Flynt/addComponentData?name=ListSocial', function($data) {
9 9
     if (!empty($data['social'])) {
10
-        $data['social'] = array_map(function ($item) {
10
+        $data['social'] = array_map(function($item) {
11 11
             $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg");
12 12
             return $item;
13 13
         }, $data['social']);
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.
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.
inc/timberLoader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post
28 28
 add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100);
29
-add_filter('get_twig', function ($twig) {
29
+add_filter('get_twig', function($twig) {
30 30
     $twig->addExtension(new TwigExtensionFlynt());
31 31
     return $twig;
32 32
 });
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 function formatGallery($value)
43 43
 {
44 44
     if (!empty($value)) {
45
-        $value = array_map(function ($image) {
45
+        $value = array_map(function($image) {
46 46
             return new Image($image);
47 47
         }, $value);
48 48
     }
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     return $value;
68 68
 }
69 69
 
70
-add_action('timber/twig/filters', function ($twig) {
71
-    $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function ($width, $height, $color = null) {
70
+add_action('timber/twig/filters', function($twig) {
71
+    $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function($width, $height, $color = null) {
72 72
         $width = round($width);
73 73
         $height = round($height);
74 74
         $colorRect = $color ? "<rect width='{$width}' height='{$height}' style='fill:$color' />" : '';
Please login to merge, or discard this patch.
inc/jquery.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
 use Flynt\Utils\Asset;
10 10
 
11
-add_action('wp_enqueue_scripts', function () {
11
+add_action('wp_enqueue_scripts', function() {
12 12
     $jqueryVersion = wp_scripts()->registered['jquery']->ver;
13 13
     wp_deregister_script('jquery');
14 14
 
Please login to merge, or discard this patch.
inc/componentLogServer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\');
12 12
 
13
-add_action('Flynt/afterRegisterComponents', function () {
13
+add_action('Flynt/afterRegisterComponents', function() {
14 14
     if ((WP_ENV === 'development' || current_user_can('editor') || current_user_can('administrator')) && isset($_GET['log'])) {
15 15
         if (isset($_GET['component']) && !empty($_GET['component'])) {
16 16
             define(__NAMESPACE__ . '\COMPONENT_WHITELIST', explode(',', $_GET['component']));
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
 {
37 37
     $type = gettype($data);
38 38
     $output = json_encode($data);
39
-    $result =  "<script>console.log({$output});</script>\n";
39
+    $result = "<script>console.log({$output});</script>\n";
40 40
     echoDebug($result, $postpone);
41 41
 }
42 42
 
43 43
 function consoleTable($data, $postpone = true)
44 44
 {
45 45
     $output = json_encode($data);
46
-    $result =  "<script>console.table({$output});</script>\n";
46
+    $result = "<script>console.table({$output});</script>\n";
47 47
     echoDebug($result, $postpone);
48 48
 }
49 49
 
50 50
 function echoDebug($data, $postpone)
51 51
 {
52 52
     if ($postpone) {
53
-        add_action('wp_footer', function () use ($data) {
53
+        add_action('wp_footer', function() use ($data) {
54 54
             echo $data;
55 55
         }, 30);
56 56
     } else {
Please login to merge, or discard this patch.