Completed
Push — environmentTesting ( 0dad9d...e29acf )
by Wahiba
03:20
created
Components/BlockImage/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_action('wp_enqueue_scripts', function () {
7
+add_action('wp_enqueue_scripts', function() {
8 8
     Component::enqueueAssets('BlockImage');
9 9
 });
Please login to merge, or discard this patch.
Components/ListProducts/functions.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use Timber\Post;
9 9
 use Flynt\Utils\Log;
10 10
 
11
-add_filter('Flynt/addComponentData?name=ListProducts', function ($data) {
11
+add_filter('Flynt/addComponentData?name=ListProducts', function($data) {
12 12
     $defaultCount = OptionPages::getOption('globalOptions', 'customPostType', 'product', 'defaultProductsNumber');
13 13
     $data['productTypesLabel'] = OptionPages::getOption('translatableOptions', 'customPostType', 'product', 'productTypesLabel');
14 14
     $data['overviewPage'] = OptionPages::getOption('translatableOptions', 'customPostType', 'product', 'overviewPage');
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
     return $data;
31 31
 });
32 32
 
33
-add_action('wp_enqueue_scripts', function () {
33
+add_action('wp_enqueue_scripts', function() {
34 34
     Component::enqueueAssets('ListProducts');
35 35
 });
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,8 @@
 block discarded – undo
2 2
 namespace Flynt\Components\ListProducts;
3 3
 
4 4
 use Flynt\Features\Components\Component;
5
-use Flynt\Utils\Feature;
6 5
 use Flynt\Features\Acf\OptionPages;
7 6
 use Timber\Timber;
8
-use Timber\Post;
9
-use Flynt\Utils\Log;
10 7
 
11 8
 add_filter('Flynt/addComponentData?name=ListProducts', function ($data) {
12 9
     $defaultCount = OptionPages::getOption('globalOptions', 'customPostType', 'product', 'defaultProductsNumber');
Please login to merge, or discard this patch.
Components/BlockWysiwyg/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Flynt\Features\Components\Component;
5 5
 
6
-add_action('wp_enqueue_scripts', function () {
6
+add_action('wp_enqueue_scripts', function() {
7 7
     Component::enqueueAssets('BlockWysiwyg');
8 8
 });
Please login to merge, or discard this patch.
Components/BlockNotFound/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_action('wp_enqueue_scripts', function () {
7
+add_action('wp_enqueue_scripts', function() {
8 8
     Component::enqueueAssets('BlockNotFound');
9 9
 });
Please login to merge, or discard this patch.
Features/TinyMce/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 // Clean Up TinyMCE Buttons
8 8
 
9 9
 // First Bar
10
-add_filter('mce_buttons', function ($buttons) {
10
+add_filter('mce_buttons', function($buttons) {
11 11
     return [
12 12
     'formatselect',
13 13
     'styleselect',
@@ -48,17 +48,17 @@  discard block
 block discarded – undo
48 48
 });
49 49
 
50 50
 // Second Bar
51
-add_filter('mce_buttons_2', function ($buttons) {
51
+add_filter('mce_buttons_2', function($buttons) {
52 52
     return [];
53 53
 });
54 54
 
55
-add_filter('tiny_mce_before_init', function ($init) {
55
+add_filter('tiny_mce_before_init', function($init) {
56 56
     // Add block format elements you want to show in dropdown
57 57
     $init['block_formats'] = 'Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6';
58 58
     return $init;
59 59
 });
60 60
 
61
-add_filter('tiny_mce_before_init', function ($init_array) {
61
+add_filter('tiny_mce_before_init', function($init_array) {
62 62
     $style_formats = array(
63 63
         [
64 64
             'title' => 'Turquoise Colour ',
Please login to merge, or discard this patch.
Features/ProductTinyMce/functions.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
     add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
7 7
         $toolbars['product'] = [];
8 8
         $toolbars['product'][1] = [
9
-          'bold',
10
-          'italic',
11
-          'underline',
12
-          '|',
13
-          'link',
14
-          'unlink',
15
-          '|',
16
-          'undo',
17
-          'redo',
9
+            'bold',
10
+            'italic',
11
+            'underline',
12
+            '|',
13
+            'link',
14
+            'unlink',
15
+            '|',
16
+            'undo',
17
+            'redo',
18 18
         ];
19 19
         return $toolbars;
20 20
     });
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Flynt\Features\ProductTinyMce;
4 4
 
5
-add_action('init', function () {
6
-    add_filter('acf/fields/wysiwyg/toolbars', function ($toolbars) {
5
+add_action('init', function() {
6
+    add_filter('acf/fields/wysiwyg/toolbars', function($toolbars) {
7 7
         $toolbars['product'] = [];
8 8
         $toolbars['product'][1] = [
9 9
           'bold',
Please login to merge, or discard this patch.
Features/SomeProductFeature/functions.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
         $manager = AdminNoticeManager::getInstance();
10 10
         $messages = ['Please fill Some Feature Number'];
11 11
         $options = [
12
-          'type' => 'error',
13
-          'title' => 'Some Product Feature',
14
-          'dismissible' => true,
15
-          'filenames' => 'functions.php'
12
+            'type' => 'error',
13
+            'title' => 'Some Product Feature',
14
+            'dismissible' => true,
15
+            'filenames' => 'functions.php'
16 16
         ];
17 17
         $manager->addNotice($messages, $options);
18 18
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use Flynt\Features\Acf\OptionPages;
4 4
 use Flynt\Features\AdminNotices\AdminNoticeManager;
5 5
 
6
-add_action('init', function () {
6
+add_action('init', function() {
7 7
     $someFeatureNumber = OptionPages::get('globalOptions', 'feature', 'someProductFeature', 'someFeatureNumber');
8 8
     if (!$someFeatureNumber) {
9 9
         $manager = AdminNoticeManager::getInstance();
Please login to merge, or discard this patch.
lib/Bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public static function setTemplateDirectory()
8 8
     {
9
-        add_action('after_switch_theme', function () {
9
+        add_action('after_switch_theme', function() {
10 10
             $stylesheet = get_option('stylesheet');
11 11
 
12 12
             if (basename($stylesheet) !== 'templates') {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             }
15 15
         });
16 16
 
17
-        add_filter('stylesheet', function ($stylesheet) {
17
+        add_filter('stylesheet', function($stylesheet) {
18 18
             return dirname($stylesheet);
19 19
         });
20 20
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         }
34 34
 
35 35
         if (!$acfActive || !$flyntCoreActive) {
36
-            add_filter('template_include', function () {
36
+            add_filter('template_include', function() {
37 37
                 $newTemplate = locate_template('plugin-inactive.php');
38 38
                 if ('' != $newTemplate) {
39 39
                     return $newTemplate;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     protected static function notifyRequiredPluginIsMissing($pluginName)
55 55
     {
56
-        add_action('admin_notices', function () use ($pluginName) {
56
+        add_action('admin_notices', function() use ($pluginName) {
57 57
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
58 58
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
59 59
         });
Please login to merge, or discard this patch.
Features/AdminComponentPreview/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         if (is_admin()) {
39 39
             add_action('admin_enqueue_scripts', NS . 'enqueueComponentScripts');
40 40
             // add image to the flexible content component name
41
-            add_filter('acf/fields/flexible_content/layout_title', function ($title, $field, $layout, $i) {
41
+            add_filter('acf/fields/flexible_content/layout_title', function($title, $field, $layout, $i) {
42 42
                 $componentName = ucfirst($layout['name']);
43 43
                 $componentPath = "Components/{$componentName}";
44
-                $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg") ;
44
+                $componentPreviewDesktopPath = Asset::requirePath("{$componentPath}/preview-desktop.jpg");
45 45
                 $componentPreviewDesktopUrl = Asset::requireUrl("{$componentPath}/preview-desktop.jpg");
46 46
                 if (is_file($componentPreviewDesktopPath)) {
47 47
                     $newTitle = '<span class="flyntComponentPreview">';
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         } else {
56 56
             add_action('wp_enqueue_scripts', NS . 'enqueueComponentScripts');
57 57
             // adds Component Previews button to admin bar on front-end when logged in
58
-            add_action('admin_bar_menu', function ($wpAdminBar) {
58
+            add_action('admin_bar_menu', function($wpAdminBar) {
59 59
                 $title = __('Component Previews', 'flynt-starter-theme');
60 60
                 $wpAdminBar->add_menu([
61 61
                     'id' => 'toggleComponentPreviews',
Please login to merge, or discard this patch.