Passed
Pull Request — master (#272)
by
unknown
04:56
created
inc/assets.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@  discard block
 block discarded – undo
3 3
 use Flynt\Utils\Asset;
4 4
 use Flynt\Utils\ScriptLoader;
5 5
 
6
-call_user_func(function () {
6
+call_user_func(function() {
7 7
     $loader = new ScriptLoader();
8 8
     add_filter('script_loader_tag', [$loader, 'filterScriptLoaderTag'], 10, 2);
9 9
 });
10 10
 
11
-add_action('wp_enqueue_scripts', function () {
11
+add_action('wp_enqueue_scripts', function() {
12 12
     Asset::enqueue([
13 13
         'name' => 'Flynt/assets',
14 14
         'path' => 'assets/main.js',
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     ]);
23 23
 });
24 24
 
25
-add_action('admin_enqueue_scripts', function () {
25
+add_action('admin_enqueue_scripts', function() {
26 26
     Asset::enqueue([
27 27
         'name' => 'Flynt/assets/admin',
28 28
         'path' => 'assets/admin.js',
Please login to merge, or discard this patch.
inc/baseStyle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
 function setDocumentTitle()
23 23
 {
24 24
     // prevent yoast overwriting the title
25
-    add_filter('pre_get_document_title', function ($title) {
25
+    add_filter('pre_get_document_title', function($title) {
26 26
         return '';
27 27
     }, 99);
28 28
 
29 29
     // set custom title and keep the default separator and site name
30
-    add_filter('document_title_parts', function ($title) {
30
+    add_filter('document_title_parts', function($title) {
31 31
         $title['title'] = 'Base Style';
32 32
         return $title;
33 33
     }, 99);
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
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
         $pluginUrl = esc_url(admin_url('plugins.php'));
54 54
         $message = ["${pluginName} plugin not activated. Make sure you activate the plugin on the <a href=\"${pluginUrl}\">plugin page</a>."];
55 55
         $options = [
56
-          'type' => 'error',
57
-          'title' => 'Flynt is missing a required plugin',
58
-          'dismissible' => false,
56
+            'type' => 'error',
57
+            'title' => 'Flynt is missing a required plugin',
58
+            'dismissible' => false,
59 59
         ];
60 60
 
61 61
         $manager->addNotice($message, $options);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         if (!$acfActive) {
36 36
             self::notifyRequiredPluginIsMissing('<a href="https://www.advancedcustomfields.com/pro/">Advanced Custom Fields PRO</a>');
37
-            add_filter('template_include', function () {
37
+            add_filter('template_include', function() {
38 38
                 die(
39 39
                     'One or more required plugins are not activated! Please <a href="'
40 40
                     . esc_url(admin_url('plugins.php'))
Please login to merge, or discard this patch.
inc/theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-add_action('after_setup_theme', function () {
3
+add_action('after_setup_theme', function() {
4 4
     add_theme_support('title-tag');
5 5
     add_theme_support('post-thumbnails');
6 6
 
Please login to merge, or discard this patch.
lib/Utils/TimberDynamicResize.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         add_filter('init', [$this, 'addRewriteTag']);
64 64
         add_action('generate_rewrite_rules', [$this, 'registerRewriteRule']);
65
-        add_action('parse_request', function ($wp) {
65
+        add_action('parse_request', function($wp) {
66 66
             if (isset($wp->query_vars[static::IMAGE_QUERY_VAR])) {
67 67
                 $this->checkAndGenerateImage($wp->query_vars[static::IMAGE_QUERY_VAR]);
68 68
             }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     protected function addHooks()
73 73
     {
74
-        add_action('timber/twig/filters', function ($twig) {
74
+        add_action('timber/twig/filters', function($twig) {
75 75
             $twig->addFilter(
76 76
                 new TwigFilter('resizeDynamic', [$this, 'resizeDynamic'])
77 77
             );
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
             add_filter('mod_rewrite_rules', [$this, 'addWebpRewriteRule']);
82 82
         }
83 83
         if ($this->enabled || $this->webpEnabled) {
84
-            add_action('after_switch_theme', function () {
84
+            add_action('after_switch_theme', function() {
85 85
                 add_action('shutdown', 'flush_rewrite_rules');
86 86
             });
87
-            add_action('switch_theme', function () {
87
+            add_action('switch_theme', function() {
88 88
                 remove_filter('mod_rewrite_rules', [$this, 'addWebpRewriteRule']);
89 89
                 flush_rewrite_rules();
90 90
             });
Please login to merge, or discard this patch.
lib/Utils/Log.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $title .= '(' . self::getCallerFile(2) . '):';
70 70
             $type = gettype($data);
71 71
             $output = json_encode($data);
72
-            $result =  "<script>console.{$logType}('{$title}', '({$type})', {$output});</script>\n";
72
+            $result = "<script>console.{$logType}('{$title}', '({$type})', {$output});</script>\n";
73 73
             self::echoDebug($result, $postpone);
74 74
         }
75 75
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     protected static function echoDebug($data, $postpone)
111 111
     {
112 112
         if ($postpone) {
113
-            add_action('wp_footer', function () use ($data) {
113
+            add_action('wp_footer', function() use ($data) {
114 114
                 echo $data;
115 115
             }, 30);
116 116
         } else {
Please login to merge, or discard this patch.
inc/removeEditor.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
 namespace Flynt\RemoveEditor;
8 8
 
9
-add_action('init', function () {
9
+add_action('init', function() {
10 10
     remove_post_type_support('page', 'editor');
11 11
     remove_post_type_support('post', 'editor');
12 12
 });
Please login to merge, or discard this patch.
inc/hideProtectedPosts.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
 namespace Flynt\HideProtectedPosts;
8 8
 
9
-add_action('pre_get_posts', function ($query) {
9
+add_action('pre_get_posts', function($query) {
10 10
     if (!$query->is_singular() && !is_admin()) {
11 11
         $query->set('has_password', false);
12 12
     }
Please login to merge, or discard this patch.
inc/mimeTypes.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
 namespace Flynt\MimeTypes;
8 8
 
9
-add_filter('upload_mimes', function ($mimes) {
9
+add_filter('upload_mimes', function($mimes) {
10 10
     $mimes['svg'] = 'image/svg+xml';
11 11
     return $mimes;
12 12
 });
Please login to merge, or discard this patch.