Passed
Push — master ( 636ed8...d9712a )
by Daniel
02:22 queued 10s
created
classes/class-check-requirements.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -18,64 +18,64 @@
 block discarded – undo
18 18
  * Abort if this file is called directly
19 19
  */
20 20
 if (! defined('ABSPATH')) {
21
-    exit;
21
+	exit;
22 22
 }
23 23
 
24 24
 if (! class_exists('Algolia_Check_Requirements')) {
25
-    /**
26
-     * Check requirements for Algolia plugin
27
-     */
28
-    class Algolia_Check_Requirements
29
-    {
25
+	/**
26
+	 * Check requirements for Algolia plugin
27
+	 */
28
+	class Algolia_Check_Requirements
29
+	{
30 30
 
31
-        /**
32
-         * Check for required PHP version.
33
-         *
34
-         * @return bool
35
-         */
36
-        public static function algolia_php_version_check()
37
-        {
38
-            if (version_compare(PHP_VERSION, ALGOLIA_MIN_PHP_VERSION, '<')) {
39
-                return false;
40
-            }
41
-            return true;
42
-        }
31
+		/**
32
+		 * Check for required PHP version.
33
+		 *
34
+		 * @return bool
35
+		 */
36
+		public static function algolia_php_version_check()
37
+		{
38
+			if (version_compare(PHP_VERSION, ALGOLIA_MIN_PHP_VERSION, '<')) {
39
+				return false;
40
+			}
41
+			return true;
42
+		}
43 43
 
44
-        /**
45
-         * Check for required WordPress version.
46
-         *
47
-         * @return bool
48
-         */
49
-        public static function algolia_wp_version_check()
50
-        {
51
-            if (version_compare($GLOBALS['wp_version'], ALGOLIA_MIN_WP_VERSION, '<')) {
52
-                return false;
53
-            }
54
-            return true;
55
-        }
44
+		/**
45
+		 * Check for required WordPress version.
46
+		 *
47
+		 * @return bool
48
+		 */
49
+		public static function algolia_wp_version_check()
50
+		{
51
+			if (version_compare($GLOBALS['wp_version'], ALGOLIA_MIN_WP_VERSION, '<')) {
52
+				return false;
53
+			}
54
+			return true;
55
+		}
56 56
 
57
-        /**
58
-         * Check that we have all of the required PHP extensions installed
59
-         *
60
-         * @return void
61
-         */
62
-        public static function check_unmet_requirements()
63
-        {
64
-            if (! extension_loaded('mbstring')) {
65
-                echo '<div class="error notice">
57
+		/**
58
+		 * Check that we have all of the required PHP extensions installed
59
+		 *
60
+		 * @return void
61
+		 */
62
+		public static function check_unmet_requirements()
63
+		{
64
+			if (! extension_loaded('mbstring')) {
65
+				echo '<div class="error notice">
66 66
 					  <p>' . esc_html__('Algolia Woo Indexer requires the "mbstring" PHP extension to be enabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p>
67 67
 				  </div>';
68
-            } elseif (! function_exists('mb_ereg_replace')) {
69
-                echo '<div class="error notice">
68
+			} elseif (! function_exists('mb_ereg_replace')) {
69
+				echo '<div class="error notice">
70 70
 					  <p>' . esc_html__('Algolia Woo Indexer needs "mbregex" NOT to be disabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p>
71 71
 				  </div>';
72
-            }
73
-            if (! extension_loaded('curl')) {
74
-                echo '<div class="error notice">
72
+			}
73
+			if (! extension_loaded('curl')) {
74
+				echo '<div class="error notice">
75 75
 					  <p>' . esc_html__('Algolia Woo Indexer requires the "cURL" PHP extension to be enabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p>
76 76
 				  </div>';
77
-                return;
78
-            }
79
-        }
77
+				return;
78
+			}
79
+		}
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
classes/class-algolia-woo-indexer.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * Include plugin file if function is_plugin_active does not exist
23 23
  */
24 24
 if (! function_exists('is_plugin_active')) {
25
-    require_once(ABSPATH . '/wp-admin/includes/plugin.php');
25
+	require_once(ABSPATH . '/wp-admin/includes/plugin.php');
26 26
 }
27 27
 
28 28
 /**
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 		 */
91 91
 		public static function setup_settings_sections() {
92 92
 			/**
93
-			* Setup arguments for settings sections and fields
94
-			*
95
-			* @see https://developer.wordpress.org/reference/functions/register_setting/
96
-			*/
93
+			 * Setup arguments for settings sections and fields
94
+			 *
95
+			 * @see https://developer.wordpress.org/reference/functions/register_setting/
96
+			 */
97 97
 			if ( is_admin() ) {
98 98
 				$arguments = array(
99 99
 					'type'              => 'string',
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
 			);
466 466
 
467 467
 			/**
468
-			* Setup arguments for sending only a single product
469
-			*/
468
+			 * Setup arguments for sending only a single product
469
+			 */
470 470
 			if ( isset( $id ) && '' !== $id ) {
471 471
 				$arguments = array(
472 472
 					'status'   => 'publish',
@@ -483,8 +483,8 @@  discard block
 block discarded – undo
483 483
 			$products = /** @scrutinizer ignore-call */ wc_get_products( $arguments );
484 484
 
485 485
 			if ( ! $products ) {
486
-                return;
487
-            }
486
+				return;
487
+			}
488 488
 				$records = array();
489 489
 				$record  = array();
490 490
 
@@ -585,8 +585,8 @@  discard block
 block discarded – undo
585 585
 		 */
586 586
 		public static function algolia_woo_indexer_settings() {
587 587
 			/**
588
-			* Verify that the user can access the settings page
589
-			*/
588
+			 * Verify that the user can access the settings page
589
+			 */
590 590
 			if ( ! current_user_can( 'manage_options' ) ) {
591 591
 				wp_die( esc_html__( 'Action not allowed.', 'algolia_woo_indexer_settings' ) );
592 592
 			}
Please login to merge, or discard this patch.