Completed
Branch develop (9aa69a)
by J.D.
03:55
created
src/classes/installer/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 			// Make sure the version is set properly even if the data is already
39 39
 			// there, in case the plugin is being reactivated and things had been
40 40
 			// corrupted somehow.
41
-			$data['version'] = WORDPOINTS_VERSION;
41
+			$data[ 'version' ] = WORDPOINTS_VERSION;
42 42
 
43 43
 			wordpoints_update_maybe_network_option( 'wordpoints_data', $data );
44 44
 		}
Please login to merge, or discard this patch.
src/classes/installer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 		$this->installable->set_network_installed();
76 76
 
77
-		if ( ! isset( $this->install_routines['site'] ) ) {
77
+		if ( ! isset( $this->install_routines[ 'site' ] ) ) {
78 78
 			return;
79 79
 		}
80 80
 
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	protected function run_for_network() {
105 105
 
106
-		if ( ! empty( $this->install_routines['network'] ) ) {
107
-			$this->run_routines( $this->install_routines['network'] );
106
+		if ( ! empty( $this->install_routines[ 'network' ] ) ) {
107
+			$this->run_routines( $this->install_routines[ 'network' ] );
108 108
 		}
109 109
 
110 110
 		$this->installable->set_db_version( null, true );
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 	 */
116 116
 	protected function run_for_site() {
117 117
 
118
-		if ( ! empty( $this->install_routines['site'] ) ) {
119
-			$this->run_routines( $this->install_routines['site'] );
118
+		if ( ! empty( $this->install_routines[ 'site' ] ) ) {
119
+			$this->run_routines( $this->install_routines[ 'site' ] );
120 120
 		}
121 121
 
122 122
 		if ( ! $this->network_wide ) {
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	protected function run_for_single() {
132 132
 
133
-		if ( ! empty( $this->install_routines['single'] ) ) {
134
-			$this->run_routines( $this->install_routines['single'] );
133
+		if ( ! empty( $this->install_routines[ 'single' ] ) ) {
134
+			$this->run_routines( $this->install_routines[ 'single' ] );
135 135
 		}
136 136
 
137 137
 		$this->installable->set_db_version();
Please login to merge, or discard this patch.
src/classes/breaking/updater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 		foreach ( $modules as $module ) {
182 182
 			if ( ! $this->check_module( $module ) ) {
183
-				$incompatible_modules[]           = $module;
183
+				$incompatible_modules[ ]           = $module;
184 184
 				$this->checked_modules[ $module ] = false;
185 185
 			}
186 186
 		}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 				unset( $modules[ $index ] );
213 213
 
214 214
 				if ( ! $this->checked_modules[ $module ] ) {
215
-					$incompatible[] = $module;
215
+					$incompatible[ ] = $module;
216 216
 				}
217 217
 			}
218 218
 
Please login to merge, or discard this patch.
src/classes/uninstaller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	protected function run_for_network() {
108 108
 
109
-		if ( ! empty( $this->uninstall_routines['network'] ) ) {
110
-			$this->run_routines( $this->uninstall_routines['network'] );
109
+		if ( ! empty( $this->uninstall_routines[ 'network' ] ) ) {
110
+			$this->run_routines( $this->uninstall_routines[ 'network' ] );
111 111
 		}
112 112
 
113 113
 		$this->installable->unset_db_version( true );
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 	 */
128 128
 	protected function run_for_site() {
129 129
 
130
-		if ( ! empty( $this->uninstall_routines['site'] ) ) {
131
-			$this->run_routines( $this->uninstall_routines['site'] );
130
+		if ( ! empty( $this->uninstall_routines[ 'site' ] ) ) {
131
+			$this->run_routines( $this->uninstall_routines[ 'site' ] );
132 132
 		}
133 133
 
134 134
 		$this->installable->unset_db_version();
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	protected function run_for_single() {
141 141
 
142
-		if ( ! empty( $this->uninstall_routines['single'] ) ) {
143
-			$this->run_routines( $this->uninstall_routines['single'] );
142
+		if ( ! empty( $this->uninstall_routines[ 'single' ] ) ) {
143
+			$this->run_routines( $this->uninstall_routines[ 'single' ] );
144 144
 		}
145 145
 
146 146
 		$this->installable->unset_db_version();
Please login to merge, or discard this patch.
src/classes/dropdown/builder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function start() {
102 102
 
103
-		echo '<select id="', esc_attr( $this->args['id'] ), '" name="', esc_attr( $this->args['name'] ), '" class="', esc_attr( $this->args['class'] ), '">';
103
+		echo '<select id="', esc_attr( $this->args[ 'id' ] ), '" name="', esc_attr( $this->args[ 'name' ] ), '" class="', esc_attr( $this->args[ 'class' ] ), '">';
104 104
 	}
105 105
 
106 106
 	/**
@@ -110,20 +110,20 @@  discard block
 block discarded – undo
110 110
 	 */
111 111
 	public function options() {
112 112
 
113
-		if ( ! empty( $this->args['show_option_none'] ) ) {
113
+		if ( ! empty( $this->args[ 'show_option_none' ] ) ) {
114 114
 
115
-			echo '<option value="-1"', selected( '-1', $this->args['selected'], false ), '>', esc_html( $this->args['show_option_none'] ), '</option>';
115
+			echo '<option value="-1"', selected( '-1', $this->args[ 'selected' ], false ), '>', esc_html( $this->args[ 'show_option_none' ] ), '</option>';
116 116
 		}
117 117
 
118 118
 		foreach ( $this->options as $value => $option ) {
119 119
 
120
-			if ( isset( $this->args['values_key'], $this->args['options_key'] ) ) {
120
+			if ( isset( $this->args[ 'values_key' ], $this->args[ 'options_key' ] ) ) {
121 121
 				$option = (array) $option;
122
-				$value  = $option[ $this->args['values_key'] ];
123
-				$option = $option[ $this->args['options_key'] ];
122
+				$value  = $option[ $this->args[ 'values_key' ] ];
123
+				$option = $option[ $this->args[ 'options_key' ] ];
124 124
 			}
125 125
 
126
-			echo '<option value="', esc_attr( $value ), '"', selected( $value, $this->args['selected'], false ), '>', esc_html( $option ), '</option>';
126
+			echo '<option value="', esc_attr( $value ), '"', selected( $value, $this->args[ 'selected' ], false ), '>', esc_html( $option ), '</option>';
127 127
 		}
128 128
 	}
129 129
 
Please login to merge, or discard this patch.
src/classes/updater/core/extension/merge.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 			, $is_multisite
54 54
 		);
55 55
 
56
-		$merged[] = $this->extension;
56
+		$merged[ ] = $this->extension;
57 57
 
58 58
 		wordpoints_update_maybe_network_option(
59 59
 			'wordpoints_merged_extensions'
Please login to merge, or discard this patch.
src/classes/updater/core/breaking.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
 		foreach ( $extensions as $extension ) {
194 194
 			if ( ! $this->check_extension( $extension ) ) {
195
-				$incompatible_extensions[]              = $extension;
195
+				$incompatible_extensions[ ]              = $extension;
196 196
 				$this->checked_extensions[ $extension ] = false;
197 197
 			}
198 198
 		}
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 				unset( $extensions[ $index ] );
225 225
 
226 226
 				if ( ! $this->checked_extensions[ $extension ] ) {
227
-					$incompatible[] = $extension;
227
+					$incompatible[ ] = $extension;
228 228
 				}
229 229
 			}
230 230
 
Please login to merge, or discard this patch.
src/classes/updater/factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
 				$class = $data;
101 101
 				$args  = array();
102 102
 			} else {
103
-				$class = $data['class'];
104
-				$args  = $data['args'];
103
+				$class = $data[ 'class' ];
104
+				$args  = $data[ 'args' ];
105 105
 			}
106 106
 
107
-			$routines[] = wordpoints_construct_class_with_args( $class, $args );
107
+			$routines[ ] = wordpoints_construct_class_with_args( $class, $args );
108 108
 		}
109 109
 
110 110
 		return $routines;
Please login to merge, or discard this patch.
src/classes/installable.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
 
60 60
 		if ( 'wordpoints' === $this->slug ) {
61 61
 
62
-			if ( isset( $wordpoints_data['version'] ) ) {
63
-				return $wordpoints_data['version'];
62
+			if ( isset( $wordpoints_data[ 'version' ] ) ) {
63
+				return $wordpoints_data[ 'version' ];
64 64
 			}
65 65
 
66
-		} elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] ) ) {
67
-			return $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'];
66
+		} elseif ( isset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] ) ) {
67
+			return $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ];
68 68
 		}
69 69
 
70 70
 		return false;
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 		);
86 86
 
87 87
 		if ( 'wordpoints' === $this->slug ) {
88
-			$wordpoints_data['version'] = $version;
88
+			$wordpoints_data[ 'version' ] = $version;
89 89
 		} else {
90
-			$wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] = $version;
90
+			$wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] = $version;
91 91
 		}
92 92
 
93 93
 		wordpoints_update_maybe_network_option(
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 		);
109 109
 
110 110
 		if ( 'wordpoints' === $this->slug ) {
111
-			unset( $wordpoints_data['version'] );
111
+			unset( $wordpoints_data[ 'version' ] );
112 112
 		} else {
113
-			unset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ]['version'] );
113
+			unset( $wordpoints_data[ "{$this->type}s" ][ $this->slug ][ 'version' ] );
114 114
 		}
115 115
 
116 116
 		wordpoints_update_maybe_network_option(
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
 		if ( ! in_array( $id, $sites, true ) ) {
323 323
 
324
-			$sites[] = $id;
324
+			$sites[ ] = $id;
325 325
 
326 326
 			update_site_option( $option_name, $sites );
327 327
 		}
@@ -358,22 +358,22 @@  discard block
 block discarded – undo
358 358
 
359 359
 		$db_tables = wordpoints_map_context_shortcuts( $this->get_db_tables() );
360 360
 
361
-		if ( isset( $db_tables['single'] ) ) {
362
-			$routines['single'][] = new WordPoints_Installer_DB_Tables(
363
-				$db_tables['single']
361
+		if ( isset( $db_tables[ 'single' ] ) ) {
362
+			$routines[ 'single' ][ ] = new WordPoints_Installer_DB_Tables(
363
+				$db_tables[ 'single' ]
364 364
 				, 'base'
365 365
 			);
366 366
 		}
367 367
 
368
-		if ( isset( $db_tables['site'] ) ) {
369
-			$routines['site'][] = new WordPoints_Installer_DB_Tables(
370
-				$db_tables['site']
368
+		if ( isset( $db_tables[ 'site' ] ) ) {
369
+			$routines[ 'site' ][ ] = new WordPoints_Installer_DB_Tables(
370
+				$db_tables[ 'site' ]
371 371
 			);
372 372
 		}
373 373
 
374
-		if ( isset( $db_tables['network'] ) ) {
375
-			$routines['network'][] = new WordPoints_Installer_DB_Tables(
376
-				$db_tables['network']
374
+		if ( isset( $db_tables[ 'network' ] ) ) {
375
+			$routines[ 'network' ][ ] = new WordPoints_Installer_DB_Tables(
376
+				$db_tables[ 'network' ]
377 377
 				, 'base'
378 378
 			);
379 379
 		}
@@ -467,11 +467,11 @@  discard block
 block discarded – undo
467 467
 			foreach ( $factories as $factory ) {
468 468
 
469 469
 				if ( $factory instanceof WordPoints_Uninstaller_Factory_SiteI ) {
470
-					$routines['site'] = array_merge( $routines['site'], $factory->get_for_site() );
470
+					$routines[ 'site' ] = array_merge( $routines[ 'site' ], $factory->get_for_site() );
471 471
 				}
472 472
 
473 473
 				if ( $factory instanceof WordPoints_Uninstaller_Factory_NetworkI ) {
474
-					$routines['network'] = array_merge( $routines['network'], $factory->get_for_network() );
474
+					$routines[ 'network' ] = array_merge( $routines[ 'network' ], $factory->get_for_network() );
475 475
 				}
476 476
 			}
477 477
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 
480 480
 			foreach ( $factories as $factory ) {
481 481
 				if ( $factory instanceof WordPoints_Uninstaller_Factory_SingleI ) {
482
-					$routines['single'] = array_merge( $routines['single'], $factory->get_for_single() );
482
+					$routines[ 'single' ] = array_merge( $routines[ 'single' ], $factory->get_for_single() );
483 483
 				}
484 484
 			}
485 485
 		}
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 		$db_tables = $this->get_db_tables();
502 502
 
503 503
 		if ( ! empty( $db_tables ) ) {
504
-			$factories[] = new WordPoints_Uninstaller_Factory_DB_Tables(
504
+			$factories[ ] = new WordPoints_Uninstaller_Factory_DB_Tables(
505 505
 				array_map( 'array_keys', $db_tables )
506 506
 			);
507 507
 		}
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 		$custom_caps = $this->get_custom_caps();
510 510
 
511 511
 		if ( ! empty( $custom_caps ) ) {
512
-			$factories[] = new WordPoints_Uninstaller_Factory_Caps(
512
+			$factories[ ] = new WordPoints_Uninstaller_Factory_Caps(
513 513
 				array_keys( $custom_caps )
514 514
 			);
515 515
 		}
Please login to merge, or discard this patch.