Passed
Branch options (6cb94b)
by Dominik
06:35
created
inc/theContentFix.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
- use Timber\Timber;
4
- use Timber\Post;
3
+    use Timber\Timber;
4
+    use Timber\Post;
5 5
 
6 6
 add_filter('wp_insert_post_data', function ($data, $postArr) {
7 7
     if ($postArr['post_type'] === 'revision') {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  use Timber\Timber;
4 4
  use Timber\Post;
5 5
 
6
-add_filter('wp_insert_post_data', function ($data, $postArr) {
6
+add_filter('wp_insert_post_data', function($data, $postArr) {
7 7
     if ($postArr['post_type'] === 'revision') {
8 8
         return $data;
9 9
     }
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     return $data;
14 14
 }, 99, 2);
15 15
 
16
-add_shortcode('flyntTheContent', function ($attrs) {
16
+add_shortcode('flyntTheContent', function($attrs) {
17 17
     $postId = $attrs['id'];
18 18
     $context = Timber::get_context();
19 19
     $context['post'] = $post = new Post($postId);
Please login to merge, or discard this patch.
inc/twigReadingTime.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
 
5 5
 use Flynt\Utils\TwigReadingTimeExtension;
6 6
 
7
-add_filter('get_twig', function ($twig) {
7
+add_filter('get_twig', function($twig) {
8 8
     $twig->addExtension(new TwigReadingTimeExtension());
9 9
     return $twig;
10 10
 });
Please login to merge, or discard this patch.
Components/ListLogos/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Api;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListLogos', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListLogos', function($data) {
8 8
 
9 9
     if (!empty($data['items'])) {
10
-        $data['items'] = array_map(function ($item) {
10
+        $data['items'] = array_map(function($item) {
11 11
             if (isset($item['image']->post_mime_type) && $item['image']->post_mime_type === 'image/svg+xml') {
12 12
                 $path = get_attached_file($item['image']->ID);
13 13
                 $item['image']->svg = file_get_contents($path);
Please login to merge, or discard this patch.
Components/GridPostsArchive/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 const POST_TYPE = 'post';
10 10
 const FILTER_BY_TAXONOMY = 'category';
11 11
 
12
-add_filter('Flynt/addComponentData?name=GridPostsArchive', function ($data) {
12
+add_filter('Flynt/addComponentData?name=GridPostsArchive', function($data) {
13 13
     $postType = POST_TYPE;
14 14
     $taxonomy = FILTER_BY_TAXONOMY;
15 15
     $terms = get_terms([
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     ]);
19 19
     $queriedObject = get_queried_object();
20 20
     if (count($terms) > 1) {
21
-        $data['terms'] = array_map(function ($term) use ($queriedObject) {
21
+        $data['terms'] = array_map(function($term) use ($queriedObject) {
22 22
             $timberTerm = new Term($term);
23 23
             if ($queriedObject) {
24 24
                 $timberTerm->isActive = $queriedObject->taxonomy === $term->taxonomy && $queriedObject->term_id === $term->term_id;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $data['isHome'] = true;
38 38
         $data['title'] = $queriedObject->post_title ?? get_bloginfo('name');
39 39
     } else {
40
-        $data['title'] =  get_the_archive_title();
40
+        $data['title'] = get_the_archive_title();
41 41
         $data['description'] = get_the_archive_description();
42 42
     }
43 43
 
Please login to merge, or discard this patch.
Components/BlockCountUp/functions.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -385,12 +385,12 @@
 block discarded – undo
385 385
         'type' => 'text',
386 386
         'required' => 1,
387 387
         'default_value' => ','
388
-      ],
389
-      [
388
+        ],
389
+        [
390 390
         'label' => 'Thousands Separator',
391 391
         'name' => 'thousandsSeparator',
392 392
         'type' => 'text',
393 393
         'required' => 1,
394 394
         'default_value' => '.'
395
-      ]
395
+        ]
396 396
 ]);
Please login to merge, or discard this patch.
Components/ListIcons/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
 
7 7
 function createFeatherIconSelectChoices($iconKeys = [])
8 8
 {
9
-    return array_reduce($iconKeys, function ($acc, $iconKey) {
9
+    return array_reduce($iconKeys, function($acc, $iconKey) {
10 10
         $acc[$iconKey] = "<i style='width: 16px; height: 16px; vertical-align: middle; position: relative; top: -2px;margin-right: 5px' data-feather='{$iconKey}'></i> {$iconKey}";
11 11
         return $acc;
12 12
     }, []);
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
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
 use Flynt\Utils\Options;
8 8
 use Flynt\Utils\Asset;
9 9
 
10
-add_filter('Flynt/addComponentData?name=ListComponents', function ($data) {
10
+add_filter('Flynt/addComponentData?name=ListComponents', function($data) {
11 11
     if (!empty($data['componentBlocks'])) {
12
-        $data['componentBlocks'] = array_map(function ($block) {
12
+        $data['componentBlocks'] = array_map(function($block) {
13 13
             $componentPaths = explode('/', $block['component']);
14
-            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3));
14
+            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3));
15 15
 
16 16
             if (file_exists(Asset::requirePath($block['component'] . 'screenshot.png'))) {
17 17
                 $src = Asset::requireUrl($block['component'] . 'screenshot.png');
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     return $data;
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.
Components/GridPostsLatest/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 
9 9
 const POST_TYPE = 'post';
10 10
 
11
-add_filter('Flynt/addComponentData?name=GridPostsLatest', function ($data) {
11
+add_filter('Flynt/addComponentData?name=GridPostsLatest', function($data) {
12 12
     $postType = POST_TYPE;
13 13
     $data['taxonomies'] = $data['taxonomies'] ?: [];
14 14
 
15 15
     $data['items'] = Timber::get_posts([
16 16
         'post_status' => 'publish',
17 17
         'post_type' => $postType,
18
-        'category' => join(',', array_map(function ($taxonomy) {
18
+        'category' => join(',', array_map(function($taxonomy) {
19 19
             return $taxonomy->term_id;
20 20
         }, $data['taxonomies'])),
21 21
         'posts_per_page' => $data['options']['postCount'],
Please login to merge, or discard this patch.
Components/BlockPostHeader/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
 
5 5
 use Flynt\Utils\Options;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockPostHeader', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockPostHeader', function($data) {
8 8
 
9 9
     return $data;
10 10
 });
Please login to merge, or discard this patch.