Passed
Push — master ( b23fa6...8cf7d7 )
by Brian
15:03
created
vendor/composer/installers/src/Composer/Installers/Installer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $installPath = $this->getPackageBasePath($package);
167 167
         $io = $this->io;
168
-        $outputStatus = function () use ($io, $installPath) {
168
+        $outputStatus = function() use ($io, $installPath) {
169 169
             $io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
170 170
         };
171 171
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
236 236
         }
237 237
 
238
-        return $pattern ? : '(\w+)';
238
+        return $pattern ?: '(\w+)';
239 239
     }
240 240
 
241 241
     /**
Please login to merge, or discard this patch.
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function getLocations()
37 37
     {
38 38
         if ($this->matchesCakeVersion('>=', '3.0.0')) {
39
-            $this->locations['plugin'] =  $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
39
+            $this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
40 40
         }
41 41
         return $this->locations;
42 42
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     protected function matchesCakeVersion($matcher, $version)
52 52
     {
53 53
         $repositoryManager = $this->composer->getRepositoryManager();
54
-        if (! $repositoryManager) {
54
+        if (!$repositoryManager) {
55 55
             return false;
56 56
         }
57 57
 
Please login to merge, or discard this patch.
templates/frontend-head.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
Please login to merge, or discard this patch.
templates/frontend-footer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @version 1.0.19
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 ?>
13 13
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 		<div class="modal-dialog modal-dialog-centered modal-lg" role="checkout" style="max-width: 650px;">
17 17
 			<div class="modal-content">
18 18
 				<div class="modal-body">
19
-					<button type="button" class="close p-2 getpaid-payment-modal-close d-sm-none" data-dismiss="modal" aria-label="<?php esc_attr__( 'Close', 'invoicing' ); ?>">
19
+					<button type="button" class="close p-2 getpaid-payment-modal-close d-sm-none" data-dismiss="modal" aria-label="<?php esc_attr__('Close', 'invoicing'); ?>">
20 20
 						<i class="fa fa-times" aria-hidden="true"></i>
21 21
 					</button>
22 22
 					<div class="modal-body-wrapper"></div>
Please login to merge, or discard this patch.
includes/payments/class-getpaid-payment-exception.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
  * @since   2.2.2
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 /**
13 13
  * Payment exception class.
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 	 * @param int    $http_status_code Proper HTTP status code to respond with, e.g. 400.
37 37
 	 * @param array  $data             Extra error data.
38 38
 	 */
39
-	public function __construct( $code, $message, $http_status_code = 400, $data = array() ) {
39
+	public function __construct($code, $message, $http_status_code = 400, $data = array()) {
40 40
 		$this->error_code = $code;
41
-		$this->error_data = array_merge( array( 'status' => $http_status_code ), $data );
41
+		$this->error_data = array_merge(array('status' => $http_status_code), $data);
42 42
 
43
-		parent::__construct( $message, $http_status_code );
43
+		parent::__construct($message, $http_status_code);
44 44
 	}
45 45
 
46 46
 	/**
Please login to merge, or discard this patch.
includes/admin/meta-boxes/class-getpaid-meta-box-invoice-subscription.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  *
6 6
  */
7 7
 
8
-if ( ! defined( 'ABSPATH' ) ) {
8
+if (!defined('ABSPATH')) {
9 9
 	exit; // Exit if accessed directly
10 10
 }
11 11
 
@@ -19,16 +19,16 @@  discard block
 block discarded – undo
19 19
 	 *
20 20
 	 * @param WP_Post $post
21 21
 	 */
22
-    public static function output( $post ) {
22
+    public static function output($post) {
23 23
 
24 24
         // Fetch the invoice.
25
-        $invoice = new WPInv_Invoice( $post );
25
+        $invoice = new WPInv_Invoice($post);
26 26
 
27 27
         // Fetch the subscription.
28
-        $subscription = getpaid_get_invoice_subscription( $invoice );
28
+        $subscription = getpaid_get_invoice_subscription($invoice);
29 29
 
30 30
         echo '<div class="bsui">';
31
-        getpaid_admin_subscription_details_metabox( /** @scrutinizer ignore-type */$subscription );
31
+        getpaid_admin_subscription_details_metabox(/** @scrutinizer ignore-type */$subscription);
32 32
         echo '</div>';
33 33
 
34 34
     }
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
 	 *
39 39
 	 * @param WP_Post $post
40 40
 	 */
41
-    public static function output_invoices( $post ) {
41
+    public static function output_invoices($post) {
42 42
 
43 43
         // Fetch the invoice.
44
-        $invoice = new WPInv_Invoice( $post );
44
+        $invoice = new WPInv_Invoice($post);
45 45
 
46 46
         // Fetch the subscription.
47
-        $subscription = getpaid_get_invoice_subscription( $invoice );
47
+        $subscription = getpaid_get_invoice_subscription($invoice);
48 48
 
49 49
         echo '<div class="bsui">';
50
-        getpaid_admin_subscription_invoice_details_metabox( /** @scrutinizer ignore-type */$subscription, false );
50
+        getpaid_admin_subscription_invoice_details_metabox(/** @scrutinizer ignore-type */$subscription, false);
51 51
         echo '</div>';
52 52
 
53 53
     }
@@ -57,16 +57,16 @@  discard block
 block discarded – undo
57 57
 	 *
58 58
 	 * @param WP_Post $post
59 59
 	 */
60
-    public static function output_related( $post ) {
60
+    public static function output_related($post) {
61 61
 
62 62
         // Fetch the invoice.
63
-        $invoice = new WPInv_Invoice( $post );
63
+        $invoice = new WPInv_Invoice($post);
64 64
 
65 65
         // Fetch the subscription.
66
-        $subscription = getpaid_get_invoice_subscription( $invoice );
66
+        $subscription = getpaid_get_invoice_subscription($invoice);
67 67
 
68 68
         echo '<div class="bsui">';
69
-        getpaid_admin_subscription_related_subscriptions_metabox( /** @scrutinizer ignore-type */$subscription, false );
69
+        getpaid_admin_subscription_related_subscriptions_metabox(/** @scrutinizer ignore-type */$subscription, false);
70 70
         echo '</div>';
71 71
 
72 72
     }
Please login to merge, or discard this patch.
includes/geolocation/class-getpaid-maxmind-geolocation.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  *
8 8
  */
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12 12
 /**
13 13
  * Uses MaxMind for Geolocation
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
 		 * @since 1.0.19
35 35
 		 * @return mixed|null The geolocation database service.
36 36
 		 */
37
-		$this->database_service = apply_filters( 'getpaid_maxmind_geolocation_database_service', null );
38
-		if ( null === $this->database_service ) {
39
-			$this->database_service = new GetPaid_MaxMind_Database_Service( $this->get_database_prefix() );
37
+		$this->database_service = apply_filters('getpaid_maxmind_geolocation_database_service', null);
38
+		if (null === $this->database_service) {
39
+			$this->database_service = new GetPaid_MaxMind_Database_Service($this->get_database_prefix());
40 40
 		}
41 41
 
42 42
 		// Bind to the scheduled updater action.
43
-		add_action( 'getpaid_update_geoip_databases', array( $this, 'update_database' ) );
43
+		add_action('getpaid_update_geoip_databases', array($this, 'update_database'));
44 44
 
45 45
 		// Bind to the geolocation filter for MaxMind database lookups.
46
-		add_filter( 'getpaid_get_geolocation', array( $this, 'get_geolocation' ), 10, 2 );
46
+		add_filter('getpaid_get_geolocation', array($this, 'get_geolocation'), 10, 2);
47 47
 
48 48
 		// Handle maxmind key updates.
49
-		add_filter( 'wpinv_settings_sanitize_maxmind_license_key', array( $this, 'handle_key_updates' ) );
49
+		add_filter('wpinv_settings_sanitize_maxmind_license_key', array($this, 'handle_key_updates'));
50 50
 
51 51
 	}
52 52
 
@@ -65,29 +65,29 @@  discard block
 block discarded – undo
65 65
 	 * @param string $license_key The new license key.
66 66
 	 * @return string
67 67
 	 */
68
-	public function handle_key_updates( $license_key ) {
68
+	public function handle_key_updates($license_key) {
69 69
 
70 70
 		// Trim whitespaces and strip slashes.
71
-		$license_key = trim( $license_key );
71
+		$license_key = trim($license_key);
72 72
 
73 73
 		// Abort if the license key is empty or unchanged.
74
-		if ( empty( $license_key ) ) {
74
+		if (empty($license_key)) {
75 75
 			return $license_key;
76 76
 		}
77 77
 
78 78
 		// Abort if a database exists and the license key is unchaged.
79
-		if ( file_exists( $this->database_service->get_database_path() && $license_key == wpinv_get_option( 'maxmind_license_key' ) ) ) {
79
+		if (file_exists($this->database_service->get_database_path() && $license_key == wpinv_get_option('maxmind_license_key'))) {
80 80
 			return $license_key;
81 81
 		}
82 82
 
83 83
 		// Check the license key by attempting to download the Geolocation database.
84
-		$tmp_database_path = $this->database_service->download_database( $license_key );
85
-		if ( is_wp_error( $tmp_database_path ) ) {
86
-			getpaid_admin()->show_error( $tmp_database_path->get_error_message() );
84
+		$tmp_database_path = $this->database_service->download_database($license_key);
85
+		if (is_wp_error($tmp_database_path)) {
86
+			getpaid_admin()->show_error($tmp_database_path->get_error_message());
87 87
 			return $license_key;
88 88
 		}
89 89
 
90
-		$this->update_database( /** @scrutinizer ignore-type */ $tmp_database_path );
90
+		$this->update_database(/** @scrutinizer ignore-type */ $tmp_database_path);
91 91
 
92 92
 		return $license_key;
93 93
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @param string $tmp_database_path Temporary database path.
99 99
 	 */
100
-	public function update_database( $tmp_database_path = null ) {
100
+	public function update_database($tmp_database_path = null) {
101 101
 
102 102
 		// Allow us to easily interact with the filesystem.
103 103
 		require_once ABSPATH . 'wp-admin/includes/file.php';
@@ -108,32 +108,32 @@  discard block
 block discarded – undo
108 108
 		$target_database_path = $this->database_service->get_database_path();
109 109
 
110 110
 		// If there's no database path, we can't store the database.
111
-		if ( empty( $target_database_path ) ) {
111
+		if (empty($target_database_path)) {
112 112
 			return;
113 113
 		}
114 114
 
115
-		if ( $wp_filesystem->exists( $target_database_path ) ) {
116
-			$wp_filesystem->delete( $target_database_path );
115
+		if ($wp_filesystem->exists($target_database_path)) {
116
+			$wp_filesystem->delete($target_database_path);
117 117
 		}
118 118
 
119 119
 		// We can't download a database if there's no license key configured.
120
-		$license_key = wpinv_get_option( 'maxmind_license_key' );
121
-		if ( empty( $license_key ) ) {
120
+		$license_key = wpinv_get_option('maxmind_license_key');
121
+		if (empty($license_key)) {
122 122
 			return;
123 123
 		}
124 124
 
125
-		if ( empty( $tmp_database_path ) ) {
126
-			$tmp_database_path = $this->database_service->download_database( $license_key );
125
+		if (empty($tmp_database_path)) {
126
+			$tmp_database_path = $this->database_service->download_database($license_key);
127 127
 		}
128 128
 
129
-		if ( is_wp_error( $tmp_database_path ) ) {
130
-			wpinv_error_log( $tmp_database_path->get_error_message() );
129
+		if (is_wp_error($tmp_database_path)) {
130
+			wpinv_error_log($tmp_database_path->get_error_message());
131 131
 			return;
132 132
 		}
133 133
 
134 134
 		// Move the new database into position.
135
-		$wp_filesystem->move( $tmp_database_path, $target_database_path, true );
136
-		$wp_filesystem->delete( dirname( $tmp_database_path ) );
135
+		$wp_filesystem->move($tmp_database_path, $target_database_path, true);
136
+		$wp_filesystem->delete(dirname($tmp_database_path));
137 137
 	}
138 138
 
139 139
 	/**
@@ -143,13 +143,13 @@  discard block
 block discarded – undo
143 143
 	 * @param string $ip_address The IP address to geolocate.
144 144
 	 * @return array Geolocation including country code, state, city and postcode based on an IP address.
145 145
 	 */
146
-	public function get_geolocation( $data, $ip_address ) {
146
+	public function get_geolocation($data, $ip_address) {
147 147
 
148
-		if ( ! empty( $data['country'] ) || empty( $ip_address ) ) {
148
+		if (!empty($data['country']) || empty($ip_address)) {
149 149
 			return $data;
150 150
 		}
151 151
 
152
-		$country_code = $this->database_service->get_iso_country_code_for_ip( $ip_address );
152
+		$country_code = $this->database_service->get_iso_country_code_for_ip($ip_address);
153 153
 
154 154
 		return array(
155 155
 			'country'  => $country_code,
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
 	 */
168 168
 	private function get_database_prefix() {
169 169
 
170
-		$prefix = get_option( 'wpinv_maxmind_database_prefix' );
170
+		$prefix = get_option('wpinv_maxmind_database_prefix');
171 171
 
172
-		if ( empty( $prefix ) ) {
173
-			$prefix = md5( uniqid( 'wpinv' ) );
174
-			update_option( 'wpinv_maxmind_database_prefix', $prefix );
172
+		if (empty($prefix)) {
173
+			$prefix = md5(uniqid('wpinv'));
174
+			update_option('wpinv_maxmind_database_prefix', $prefix);
175 175
 		}
176 176
 
177 177
 		return $prefix;
Please login to merge, or discard this patch.
vendor/ayecode/wp-deactivation-survey/plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
  * Tested up to: 5.8
15 15
  */
16 16
 
17
-if ( ! defined( 'ABSPATH' ) ) {
17
+if (!defined('ABSPATH')) {
18 18
 	exit;
19 19
 }
20 20
 
21
-if ( ! class_exists( 'AyeCode_Deactivation_Survey' ) ) {
21
+if (!class_exists('AyeCode_Deactivation_Survey')) {
22 22
 	// include the class if needed
23
-	include_once( dirname( __FILE__ ) . "/wp-deactivation-survey.php" );
23
+	include_once(dirname(__FILE__) . "/wp-deactivation-survey.php");
24 24
 }
25 25
 
26 26
 
Please login to merge, or discard this patch.
vendor/ayecode/wp-super-duper/sd-functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
  *
11 11
  * @return mixed|void
12 12
  */
13
-function sd_pagenow_exclude(){
14
-	return apply_filters( 'sd_pagenow_exclude', array(
13
+function sd_pagenow_exclude() {
14
+	return apply_filters('sd_pagenow_exclude', array(
15 15
 		'upload.php',
16 16
 		'edit-comments.php',
17 17
 		'edit-tags.php',
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 		'edit.php',
23 23
 		'themes.php',
24 24
 		'users.php',
25
-	) );
25
+	));
26 26
 }
27 27
 
28 28
 
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
  *
34 34
  * @return mixed|void
35 35
  */
36
-function sd_widget_exclude(){
37
-	return apply_filters( 'sd_widget_exclude', array() );
36
+function sd_widget_exclude() {
37
+	return apply_filters('sd_widget_exclude', array());
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.