Completed
Push — develop ( 192d27...cb660e )
by J.D.
03:12
created
src/components/ranks/admin/screens/ranks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	return;
21 21
 }
22 22
 
23
-$rank_group = $rank_groups[ wordpoints_admin_get_current_tab( $rank_groups ) ];
23
+$rank_group = $rank_groups[wordpoints_admin_get_current_tab( $rank_groups )];
24 24
 
25 25
 ?>
26 26
 
Please login to merge, or discard this patch.
src/components/ranks/classes/user/ranks/query.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 		$filled = wordpoints_get_array_option( 'wordpoints_filled_base_ranks' );
157 157
 
158
-		if ( isset( $filled[ $rank->ID ] ) ) {
158
+		if ( isset( $filled[$rank->ID] ) ) {
159 159
 			return true;
160 160
 		}
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			return false;
164 164
 		}
165 165
 
166
-		$filled[ $rank->ID ] = true;
166
+		$filled[$rank->ID] = true;
167 167
 
168 168
 		update_option( 'wordpoints_filled_base_ranks', $filled );
169 169
 
Please login to merge, or discard this patch.
src/components/ranks/classes/user/ranks/maybe/change.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 			$new_rank_users = array();
69 69
 
70 70
 			foreach ( $new_ranks as $user_id => $new_rank ) {
71
-				$new_rank_users[ $new_rank ][] = $user_id;
71
+				$new_rank_users[$new_rank][] = $user_id;
72 72
 			}
73 73
 
74 74
 			unset( $new_ranks );
Please login to merge, or discard this patch.
src/components/ranks/classes/ranks/updater/2/4/0/tables.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		if ( ! is_multisite() ) {
123 123
 
124 124
 			foreach ( $duplicates as $duplicate ) {
125
-				$rank_groups[ $duplicate->rank_group ][ $duplicate->user_id ] = $duplicate->user_id;
125
+				$rank_groups[$duplicate->rank_group][$duplicate->user_id] = $duplicate->user_id;
126 126
 			}
127 127
 
128 128
 			$this->regenerate_user_ranks( $rank_groups );
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
 			foreach ( $duplicates as $duplicate ) {
133 133
 
134 134
 				$rank_groups
135
-				[ $duplicate->site_id ]
136
-				[ $duplicate->blog_id ]
137
-				[ $duplicate->rank_group ]
138
-				[ $duplicate->user_id ] = $duplicate->user_id;
135
+				[$duplicate->site_id]
136
+				[$duplicate->blog_id]
137
+				[$duplicate->rank_group]
138
+				[$duplicate->user_id] = $duplicate->user_id;
139 139
 			}
140 140
 
141 141
 			/** @var WordPoints_Entity_Contexts $switcher */
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/types.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public static function is_type_registered( $type ) {
39 39
 
40
-		return isset( self::$types[ $type ] );
40
+		return isset( self::$types[$type] );
41 41
 	}
42 42
 
43 43
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		$args['slug'] = $type;
64 64
 
65
-		self::$types[ $type ] = new $class( $args );
65
+		self::$types[$type] = new $class( $args );
66 66
 
67 67
 		return true;
68 68
 	}
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 			return false;
89 89
 		}
90 90
 
91
-		self::$types[ $type ]->destruct();
91
+		self::$types[$type]->destruct();
92 92
 
93 93
 		foreach ( WordPoints_Rank_Groups::get() as $group ) {
94 94
 			$group->remove_type( $type );
95 95
 		}
96 96
 
97
-		unset( self::$types[ $type ] );
97
+		unset( self::$types[$type] );
98 98
 
99 99
 		return true;
100 100
 	}
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 			return false;
135 135
 		}
136 136
 
137
-		return self::$types[ $type ];
137
+		return self::$types[$type];
138 138
 	}
139 139
 
140 140
 	/**
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/groups.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public static function is_group_registered( $slug ) {
36 36
 
37
-		return isset( self::$groups[ $slug ] );
37
+		return isset( self::$groups[$slug] );
38 38
 	}
39 39
 
40 40
 	/**
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 			return false;
54 54
 		}
55 55
 
56
-		self::$groups[ $slug ] = new WordPoints_Rank_Group( $slug, $data );
56
+		self::$groups[$slug] = new WordPoints_Rank_Group( $slug, $data );
57 57
 
58 58
 		// If this is a brand new group, create the base rank.
59
-		if ( ! self::$groups[ $slug ]->get_base_rank() ) {
59
+		if ( ! self::$groups[$slug]->get_base_rank() ) {
60 60
 			wordpoints_add_rank( '', 'base', $slug, 0 );
61 61
 		}
62 62
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			return false;
79 79
 		}
80 80
 
81
-		unset( self::$groups[ $slug ] );
81
+		unset( self::$groups[$slug] );
82 82
 
83 83
 		return true;
84 84
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 			return false;
119 119
 		}
120 120
 
121
-		return self::$groups[ $group ];
121
+		return self::$groups[$group];
122 122
 	}
123 123
 
124 124
 	/**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			return false;
142 142
 		}
143 143
 
144
-		return self::$groups[ $group ]->has_type( $type );
144
+		return self::$groups[$group]->has_type( $type );
145 145
 	}
146 146
 
147 147
 	/**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			return false;
163 163
 		}
164 164
 
165
-		return self::$groups[ $group ]->add_type( $type );
165
+		return self::$groups[$group]->add_type( $type );
166 166
 	}
167 167
 
168 168
 	/**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			return false;
187 187
 		}
188 188
 
189
-		return self::$groups[ $group ]->remove_type( $type );
189
+		return self::$groups[$group]->remove_type( $type );
190 190
 	}
191 191
 }
192 192
 
Please login to merge, or discard this patch.
src/components/ranks/includes/ranks.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 	$group_ranks = wp_cache_get( $group, 'wordpoints_user_ranks' );
462 462
 
463 463
 	foreach ( (array) $group_ranks as $_rank_id => $user_ids ) {
464
-		if ( isset( $user_ids[ $user_id ] ) ) {
464
+		if ( isset( $user_ids[$user_id] ) ) {
465 465
 			$rank_id = $_rank_id;
466 466
 			break;
467 467
 		}
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 			$rank_id = $rank_group->get_base_rank();
491 491
 		}
492 492
 
493
-		$group_ranks[ $rank_id ][ $user_id ] = $user_id;
493
+		$group_ranks[$rank_id][$user_id] = $user_id;
494 494
 
495 495
 		wp_cache_set( $group, $group_ranks, 'wordpoints_user_ranks' );
496 496
 	}
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 	$group_ranks = wp_cache_get( $rank->rank_group, 'wordpoints_user_ranks' );
580 580
 
581 581
 	foreach ( $group_ranks as $_rank_id => $user_ids ) {
582
-		unset( $group_ranks[ $_rank_id ][ $user_id ] );
582
+		unset( $group_ranks[$_rank_id][$user_id] );
583 583
 	}
584 584
 
585 585
 	wp_cache_set( $rank->rank_group, $group_ranks, 'wordpoints_user_ranks' );
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 
662 662
 	$group_ranks = wp_cache_get( $rank->rank_group, 'wordpoints_user_ranks' );
663 663
 
664
-	unset( $group_ranks[ $from_rank_id ], $group_ranks[ $to_rank_id ] );
664
+	unset( $group_ranks[$from_rank_id], $group_ranks[$to_rank_id] );
665 665
 
666 666
 	wp_cache_set( $rank->rank_group, $group_ranks, 'wordpoints_user_ranks' );
667 667
 
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
 		}
855 855
 
856 856
 		foreach ( $group_ranks as $rank_id => $user_ids ) {
857
-			unset( $group_ranks[ $rank_id ][ $user_id ] );
857
+			unset( $group_ranks[$rank_id][$user_id] );
858 858
 		}
859 859
 
860 860
 		wp_cache_set( $rank_group->slug, $group_ranks, 'wordpoints_user_ranks' );
Please login to merge, or discard this patch.
src/classes/installables/app.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function register( $type, $slug, $loader, $version, $network_wide = false ) {
63 63
 
64
-		$this->loaders[ $type ][ $slug ] = $loader;
64
+		$this->loaders[$type][$slug] = $loader;
65 65
 
66 66
 		if ( $network_wide ) {
67
-			$this->network_versions[ $type ][ $slug ] = $version;
67
+			$this->network_versions[$type][$slug] = $version;
68 68
 		} else {
69
-			$this->versions[ $type ][ $slug ] = $version;
69
+			$this->versions[$type][$slug] = $version;
70 70
 		}
71 71
 	}
72 72
 
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 
109 109
 		foreach ( $versions as $type => $installables ) {
110 110
 
111
-			if ( isset( $last_checked[ $type ] ) ) {
111
+			if ( isset( $last_checked[$type] ) ) {
112 112
 
113
-				if ( $installables === $last_checked[ $type ] ) {
113
+				if ( $installables === $last_checked[$type] ) {
114 114
 					continue;
115 115
 				}
116 116
 
117
-				$diff = array_diff_assoc( $installables, $last_checked[ $type ] );
117
+				$diff = array_diff_assoc( $installables, $last_checked[$type] );
118 118
 
119 119
 			} else {
120 120
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	protected function get_installable( $type, $slug ) {
205 205
 
206
-		$loader = $this->loaders[ $type ][ $slug ];
206
+		$loader = $this->loaders[$type][$slug];
207 207
 
208 208
 		// May be a loader function or the class name itself.
209 209
 		if ( is_callable( $loader ) ) {
Please login to merge, or discard this patch.
src/classes/shortcodes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 */
48 48
 	public static function register( $shortcode, $class ) {
49 49
 
50
-		self::$shortcodes[ $shortcode ] = $class;
50
+		self::$shortcodes[$shortcode] = $class;
51 51
 
52 52
 		add_shortcode( $shortcode, array( __CLASS__, 'do_shortcode' ) );
53 53
 	}
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 
76 76
 		if ( isset( $shortcode ) ) {
77 77
 
78
-			if ( isset( self::$shortcodes[ $shortcode ] ) ) {
79
-				return new self::$shortcodes[ $shortcode ]( $atts, $content, $shortcode );
78
+			if ( isset( self::$shortcodes[$shortcode] ) ) {
79
+				return new self::$shortcodes[$shortcode]( $atts, $content, $shortcode );
80 80
 			} else {
81 81
 				return false;
82 82
 			}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public static function do_shortcode( $atts, $content, $shortcode ) {
107 107
 
108
-		if ( ! isset( self::$shortcodes[ $shortcode ] ) ) {
108
+		if ( ! isset( self::$shortcodes[$shortcode] ) ) {
109 109
 			return wordpoints_shortcode_error(
110 110
 				sprintf(
111 111
 					// translators: Shortcode name.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		}
117 117
 
118 118
 		/** @var WordPoints_Shortcode $shortcode */
119
-		$shortcode = new self::$shortcodes[ $shortcode ]( $atts, $content, $shortcode );
119
+		$shortcode = new self::$shortcodes[$shortcode]( $atts, $content, $shortcode );
120 120
 		return $shortcode->expand();
121 121
 	}
122 122
 }
Please login to merge, or discard this patch.