Completed
Push — develop ( 192d27...cb660e )
by J.D.
03:12
created
src/classes/class/registry/persistent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function get( $slug, array $args = array() ) {
53 53
 
54
-		if ( ! isset( $this->objects[ $slug ] ) ) {
54
+		if ( ! isset( $this->objects[$slug] ) ) {
55 55
 
56 56
 			$object = parent::get( $slug, $args );
57 57
 
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 				return false;
60 60
 			}
61 61
 
62
-			$this->objects[ $slug ] = $object;
62
+			$this->objects[$slug] = $object;
63 63
 		}
64 64
 
65
-		return $this->objects[ $slug ];
65
+		return $this->objects[$slug];
66 66
 	}
67 67
 
68 68
 	/**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 */
71 71
 	public function register( $slug, $class, array $args = array() ) {
72 72
 
73
-		unset( $this->objects[ $slug ] );
73
+		unset( $this->objects[$slug] );
74 74
 
75 75
 		return parent::register( $slug, $class, $args );
76 76
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 		parent::deregister( $slug );
84 84
 
85
-		unset( $this->objects[ $slug ] );
85
+		unset( $this->objects[$slug] );
86 86
 	}
87 87
 }
88 88
 
Please login to merge, or discard this patch.
src/classes/class/registry/children.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		}
60 60
 
61 61
 		foreach ( $this->classes as $parent_slug => $classes ) {
62
-			$items[ $parent_slug ] = WordPoints_Class_Registry::construct_with_args(
62
+			$items[$parent_slug] = WordPoints_Class_Registry::construct_with_args(
63 63
 				$classes
64 64
 				, $this->settings['pass_slugs'] ? array( $parent_slug ) + $args : $args
65 65
 				, $this->settings
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
 		$items = array();
85 85
 
86
-		if ( isset( $this->classes[ $parent_slug ] ) ) {
86
+		if ( isset( $this->classes[$parent_slug] ) ) {
87 87
 
88 88
 			if ( $this->settings['pass_slugs'] ) {
89 89
 				array_unshift( $args, $parent_slug );
90 90
 			}
91 91
 
92 92
 			$items = WordPoints_Class_Registry::construct_with_args(
93
-				$this->classes[ $parent_slug ]
93
+				$this->classes[$parent_slug]
94 94
 				, $args
95 95
 				, $this->settings
96 96
 			);
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 
107 107
 		$slugs = array();
108 108
 
109
-		if ( isset( $this->classes[ $parent_slug ] ) ) {
110
-			$slugs = array_keys( $this->classes[ $parent_slug ] );
109
+		if ( isset( $this->classes[$parent_slug] ) ) {
110
+			$slugs = array_keys( $this->classes[$parent_slug] );
111 111
 		}
112 112
 
113 113
 		return $slugs;
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public function get( $parent_slug, $slug, array $args = array() ) {
120 120
 
121
-		if ( ! isset( $this->classes[ $parent_slug ][ $slug ] ) ) {
121
+		if ( ! isset( $this->classes[$parent_slug][$slug] ) ) {
122 122
 			return false;
123 123
 		}
124 124
 
125
-		$class = $this->classes[ $parent_slug ][ $slug ];
125
+		$class = $this->classes[$parent_slug][$slug];
126 126
 
127 127
 		if ( empty( $args ) ) {
128 128
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	public function register( $parent_slug, $slug, $class, array $args = array() ) {
149 149
 
150
-		$this->classes[ $parent_slug ][ $slug ] = $class;
150
+		$this->classes[$parent_slug][$slug] = $class;
151 151
 
152 152
 		return true;
153 153
 	}
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
 	 * @since 2.1.0
157 157
 	 */
158 158
 	public function deregister( $parent_slug, $slug ) {
159
-		unset( $this->classes[ $parent_slug ][ $slug ] );
159
+		unset( $this->classes[$parent_slug][$slug] );
160 160
 	}
161 161
 
162 162
 	/**
163 163
 	 * @since 2.1.0
164 164
 	 */
165 165
 	public function deregister_children( $parent_slug ) {
166
-		unset( $this->classes[ $parent_slug ] );
166
+		unset( $this->classes[$parent_slug] );
167 167
 	}
168 168
 
169 169
 	/**
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 	public function is_registered( $parent_slug, $slug = null ) {
173 173
 
174 174
 		if ( isset( $slug ) ) {
175
-			return isset( $this->classes[ $parent_slug ][ $slug ] );
175
+			return isset( $this->classes[$parent_slug][$slug] );
176 176
 		} else {
177
-			return isset( $this->classes[ $parent_slug ] );
177
+			return isset( $this->classes[$parent_slug] );
178 178
 		}
179 179
 	}
180 180
 }
Please login to merge, or discard this patch.
src/classes/class/registry/deep/multilevel.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 
113 113
 		$classes = $this->get_deep( $this->classes, $parent_slugs );
114 114
 
115
-		if ( ! $classes || ! isset( $classes['_classes'][ $slug ] ) ) {
115
+		if ( ! $classes || ! isset( $classes['_classes'][$slug] ) ) {
116 116
 			return false;
117 117
 		}
118 118
 
119
-		$class = $classes['_classes'][ $slug ];
119
+		$class = $classes['_classes'][$slug];
120 120
 
121 121
 		if ( empty( $args ) ) {
122 122
 
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
 
151 151
 		foreach ( $parent_slugs as $parent_slug ) {
152 152
 
153
-			if ( ! isset( $classes[ $parent_slug ] ) ) {
154
-				$classes[ $parent_slug ] = array();
153
+			if ( ! isset( $classes[$parent_slug] ) ) {
154
+				$classes[$parent_slug] = array();
155 155
 			}
156 156
 
157
-			$classes =& $classes[ $parent_slug ];
157
+			$classes = & $classes[$parent_slug];
158 158
 		}
159 159
 
160
-		$classes['_classes'][ $slug ] = $class;
160
+		$classes['_classes'][$slug] = $class;
161 161
 
162 162
 		return true;
163 163
 	}
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 			return;
174 174
 		}
175 175
 
176
-		unset( $classes['_classes'][ $slug ] );
176
+		unset( $classes['_classes'][$slug] );
177 177
 	}
178 178
 
179 179
 	/**
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
 
223 223
 		foreach ( $indexes as $index ) {
224 224
 
225
-			if ( ! isset( $array[ $index ] ) ) {
225
+			if ( ! isset( $array[$index] ) ) {
226 226
 				return $false_reference;
227 227
 			}
228 228
 
229
-			$array = &$array[ $index ];
229
+			$array = &$array[$index];
230 230
 		}
231 231
 
232 232
 		return $array;
Please login to merge, or discard this patch.
src/classes/installable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 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;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		if ( 'wordpoints' === $this->slug ) {
88 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(
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		if ( 'wordpoints' === $this->slug ) {
111 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(
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 			, 'site'
131 131
 		);
132 132
 
133
-		return isset( $network_installed[ $this->type ][ $this->slug ] );
133
+		return isset( $network_installed[$this->type][$this->slug] );
134 134
 	}
135 135
 
136 136
 	/**
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 			, 'site'
196 196
 		);
197 197
 
198
-		$data[ $this->type ][ $this->slug ] = $value;
198
+		$data[$this->type][$this->slug] = $value;
199 199
 
200 200
 		update_site_option( "wordpoints_{$option}", $data );
201 201
 	}
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 			, 'site'
215 215
 		);
216 216
 
217
-		unset( $data[ $this->type ][ $this->slug ] );
217
+		unset( $data[$this->type][$this->slug] );
218 218
 
219 219
 		update_site_option( "wordpoints_{$option}", $data );
220 220
 	}
Please login to merge, or discard this patch.
src/classes/uninstaller/factory/options.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 
72 72
 		$routines = array();
73 73
 
74
-		if ( ! isset( $this->options[ $context ] ) ) {
74
+		if ( ! isset( $this->options[$context] ) ) {
75 75
 			return $routines;
76 76
 		}
77 77
 
78
-		$options = $this->options[ $context ];
78
+		$options = $this->options[$context];
79 79
 
80 80
 		foreach ( $options as $index => $option ) {
81 81
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 				$routines[] = new WordPoints_Uninstaller_Options_Wildcards( $option );
90 90
 			}
91 91
 
92
-			unset( $options[ $index ] );
92
+			unset( $options[$index] );
93 93
 		}
94 94
 
95 95
 		if ( ! empty( $options ) ) {
Please login to merge, or discard this patch.
src/classes/uninstaller/factory/metadata.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,11 +101,11 @@  discard block
 block discarded – undo
101 101
 
102 102
 		$routines = array();
103 103
 
104
-		if ( ! isset( $this->keys[ $context ] ) ) {
104
+		if ( ! isset( $this->keys[$context] ) ) {
105 105
 			return $routines;
106 106
 		}
107 107
 
108
-		$keys = $this->keys[ $context ];
108
+		$keys = $this->keys[$context];
109 109
 
110 110
 		foreach ( $keys as $index => $key ) {
111 111
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 				, $this->prefix_for_site && 'site' === $context
120 120
 			);
121 121
 
122
-			unset( $keys[ $index ] );
122
+			unset( $keys[$index] );
123 123
 		}
124 124
 
125 125
 		if ( ! empty( $keys ) ) {
Please login to merge, or discard this patch.
src/classes/uninstaller/factory/admin/screens/with/list/tables.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	 */
95 95
 	protected function get_for_context( $context ) {
96 96
 
97
-		if ( empty( $this->screens[ $context ] ) ) {
97
+		if ( empty( $this->screens[$context] ) ) {
98 98
 			return array();
99 99
 		}
100 100
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 			'options' => array( 'per_page' ),
105 105
 		);
106 106
 
107
-		foreach ( $this->screens[ $context ] as $screen_id => $args ) {
107
+		foreach ( $this->screens[$context] as $screen_id => $args ) {
108 108
 
109 109
 			$args = array_merge( $defaults, $args );
110 110
 
Please login to merge, or discard this patch.
src/classes/uninstaller/factory/admin/screens/with/meta/boxes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	protected function get_for_context( $context ) {
98 98
 
99
-		if ( empty( $this->screens[ $context ] ) ) {
99
+		if ( empty( $this->screens[$context] ) ) {
100 100
 			return array();
101 101
 		}
102 102
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			'options' => array(),
108 108
 		);
109 109
 
110
-		foreach ( $this->screens[ $context ] as $screen_id => $args ) {
110
+		foreach ( $this->screens[$context] as $screen_id => $args ) {
111 111
 
112 112
 			$args            = array_merge( $defaults, $args );
113 113
 			$args['options'] = array_merge( $options, $args['options'] );
Please login to merge, or discard this patch.
src/classes/uninstaller/factory/db/tables.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
 
71 71
 		$routines = array();
72 72
 
73
-		if ( ! empty( $this->db_tables[ $context ] ) ) {
73
+		if ( ! empty( $this->db_tables[$context] ) ) {
74 74
 			$routines[] = new WordPoints_Uninstaller_DB_Tables(
75
-				$this->db_tables[ $context ]
75
+				$this->db_tables[$context]
76 76
 				, 'site' === $context ? 'site' : 'base'
77 77
 			);
78 78
 		}
Please login to merge, or discard this patch.