Completed
Push — fix_deploy_and_tests ( ce15f8...8178de )
by Armando
02:01
created
wp-to-diaspora.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return WP_To_Diaspora Instance of this class.
82 82
 	 */
83 83
 	public static function instance() {
84
-		echo 'before: '; var_dump(self::$_instance);
84
+		echo 'before: '; var_dump( self::$_instance );
85 85
 		if ( ! isset( self::$_instance ) ) {
86 86
 			self::$_instance = new self();
87 87
 			self::$_instance->_constants();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				self::$_instance = null;
93 93
 			}
94 94
 		}
95
-		echo 'after: '; var_dump(self::$_instance);
95
+		echo 'after: '; var_dump( self::$_instance );
96 96
 		return self::$_instance;
97 97
 	}
98 98
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	private function _constants() {
105 105
 		// Are we in debugging mode?
106
-		if ( isset( $_GET['debugging'] ) ) {
106
+		if ( isset( $_GET[ 'debugging' ] ) ) {
107 107
 			defined( 'WP2D_DEBUGGING' ) || define( 'WP2D_DEBUGGING', true );
108 108
 		}
109 109
 
@@ -122,15 +122,15 @@  discard block
 block discarded – undo
122 122
 	private function _version_check() {
123 123
 		printf(
124 124
 			'WP (min): %s (%s) => %s' . PHP_EOL . 'PHP (min): %s (%s) => %s' . PHP_EOL,
125
-			$GLOBALS['wp_version'],
125
+			$GLOBALS[ 'wp_version' ],
126 126
 			$this->_min_wp,
127
-			version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' ) ? 'fail' : 'ok',
127
+			version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' ) ? 'fail' : 'ok',
128 128
 			PHP_VERSION,
129 129
 			$this->_min_php,
130 130
 			version_compare( PHP_VERSION, $this->_min_php, '<' ) ? 'fail' : 'ok'
131 131
 		);
132 132
 		// Check for version requirements.
133
-		if ( version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' )
133
+		if ( version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' )
134 134
 			|| version_compare( PHP_VERSION, $this->_min_php, '<' ) ) {
135 135
 			add_action( 'admin_notices', array( $this, 'deactivate' ) );
136 136
 			return false;
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
 		deactivate_plugins( plugin_basename( __FILE__ ) );
150 150
 
151 151
 		// Get rid of the "Plugin activated" message.
152
-		unset( $_GET['activate'] );
152
+		unset( $_GET[ 'activate' ] );
153 153
 
154 154
 		// Then display the admin notice.
155 155
 		?>
156 156
 		<div class="error">
157
-			<p><?php echo esc_html( sprintf( 'WP to diaspora* requires at least WordPress %1$s (you have %2$s) and PHP %3$s (you have %4$s)!', $this->_min_wp, $GLOBALS['wp_version'], $this->_min_php, PHP_VERSION ) ); ?></p>
157
+			<p><?php echo esc_html( sprintf( 'WP to diaspora* requires at least WordPress %1$s (you have %2$s) and PHP %3$s (you have %4$s)!', $this->_min_wp, $GLOBALS[ 'wp_version' ], $this->_min_php, PHP_VERSION ) ); ?></p>
158 158
 		</div>
159 159
 		<?php
160 160
 	}
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 				$tags_to_post = array_filter( array(
251 251
 					( ( false !== strpos( $tags_to_post_old, 'g' ) ) ? 'global' : null ),
252 252
 					( ( false !== strpos( $tags_to_post_old, 'c' ) ) ? 'custom' : null ),
253
-					( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post'   : null ),
253
+					( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ),
254 254
 				) );
255 255
 				$options->set_option( 'tags_to_post', $tags_to_post );
256 256
 			}
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 	 * @return array Links to display for plugin on plugins page.
305 305
 	 */
306 306
 	public function settings_link( $links ) {
307
-		$links[] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';
307
+		$links[ ] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';
308 308
 		return $links;
309 309
 	}
310 310
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 			if ( isset( $pod_list->pods ) ) {
328 328
 				foreach ( $pod_list->pods as $pod ) {
329 329
 					if ( 'no' === $pod->hidden ) {
330
-						$pods[] = array(
330
+						$pods[ ] = array(
331 331
 							'secure' => $pod->secure,
332 332
 							'domain' => $pod->domain,
333 333
 						);
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 	 * @todo esc_html
435 435
 	 */
436 436
 	public function check_pod_connection_status_callback() {
437
-		if ( isset( $_REQUEST['debugging'] ) && ! defined( 'WP2D_DEBUGGING' ) ) {
437
+		if ( isset( $_REQUEST[ 'debugging' ] ) && ! defined( 'WP2D_DEBUGGING' ) ) {
438 438
 			define( 'WP2D_DEBUGGING', true );
439 439
 		}
440 440
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 		if ( true === $status ) {
449 449
 			wp_send_json_success( $data );
450 450
 		} elseif ( false === $status && $this->_load_api()->has_last_error() ) {
451
-			$data['message'] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );
451
+			$data[ 'message' ] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );
452 452
 			wp_send_json_error( $data );
453 453
 		}
454 454
 		// If $status === null, do nothing.
Please login to merge, or discard this patch.