Completed
Push — develop ( 9aa69a...b20875 )
by J.D.
03:27
created
src/classes/entity/restrictioni.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -21,6 +21,7 @@
 block discarded – undo
21 21
 	 * @param string[]   $hierarchy The hierarchy of this entity, consisting of the
22 22
 	 *                              entity slug followed by the slugs leading to the
23 23
 	 *                              descendant in question, if not the entity itself.
24
+	 * @return void
24 25
 	 */
25 26
 	public function __construct( $entity_id, array $hierarchy );
26 27
 
Please login to merge, or discard this patch.
src/classes/hook/extension/hit/listeneri.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@
 block discarded – undo
20 20
 	 * @since 2.1.0
21 21
 	 *
22 22
 	 * @param WordPoints_Hook_Fire $fire The hook fire object.
23
+	 * @return void
23 24
 	 */
24 25
 	public function after_hit( WordPoints_Hook_Fire $fire );
25 26
 }
Please login to merge, or discard this patch.
src/classes/hook/extension/miss/listeneri.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -20,6 +20,7 @@
 block discarded – undo
20 20
 	 * @since 2.1.0
21 21
 	 *
22 22
 	 * @param WordPoints_Hook_Fire $fire The fire that was a miss.
23
+	 * @return void
23 24
 	 */
24 25
 	public function after_miss( WordPoints_Hook_Fire $fire );
25 26
 }
Please login to merge, or discard this patch.
src/classes/hook/settingsi.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -38,6 +38,7 @@
 block discarded – undo
38 38
 	 *
39 39
 	 * @param WordPoints_Hook_ReactionI $reaction The reaction object.
40 40
 	 * @param array                     $settings The settings for a hook reaction.
41
+	 * @return void
41 42
 	 */
42 43
 	public function update_settings(
43 44
 		WordPoints_Hook_ReactionI $reaction,
Please login to merge, or discard this patch.
src/components/points/classes/logs/viewing/restrictioni.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -18,6 +18,7 @@
 block discarded – undo
18 18
 	 * @since 2.2.0
19 19
 	 *
20 20
 	 * @param object $log The object for the points log the restriction is for.
21
+	 * @return void
21 22
 	 */
22 23
 	public function __construct( $log );
23 24
 
Please login to merge, or discard this patch.
src/classes/shortcode.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
 	 *
281 281
 	 * @since 1.8.0
282 282
 	 *
283
-	 * @return string|WP_Error|null An error message or object on failure.
283
+	 * @return string|null An error message or object on failure.
284 284
 	 */
285 285
 	protected function verify_atts() {
286 286
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
 	protected function verify_atts() {
172 172
 
173 173
 		// If this shortcode supports the user_id attribute, verify it.
174
-		if ( isset( $this->pairs['user_id'] ) ) {
174
+		if ( isset( $this->pairs[ 'user_id' ] ) ) {
175 175
 
176
-			if ( 'post_author' === $this->atts['user_id'] ) {
176
+			if ( 'post_author' === $this->atts[ 'user_id' ] ) {
177 177
 
178 178
 				$post = get_post();
179 179
 
@@ -186,13 +186,13 @@  discard block
 block discarded – undo
186 186
 					);
187 187
 				}
188 188
 
189
-				$this->atts['user_id'] = $post->post_author;
189
+				$this->atts[ 'user_id' ] = $post->post_author;
190 190
 
191
-			} elseif ( ! $this->atts['user_id'] ) {
191
+			} elseif ( ! $this->atts[ 'user_id' ] ) {
192 192
 
193
-				$this->atts['user_id'] = get_current_user_id();
193
+				$this->atts[ 'user_id' ] = get_current_user_id();
194 194
 
195
-			} elseif ( ! wordpoints_posint( $this->atts['user_id'] ) ) {
195
+			} elseif ( ! wordpoints_posint( $this->atts[ 'user_id' ] ) ) {
196 196
 
197 197
 				return sprintf(
198 198
 					// translators: 1. Attribute name; 2. Shortcode name; 3. Expected value.
Please login to merge, or discard this patch.
src/includes/maintenance.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 }
21 21
 
22 22
 // If we're not running a module check, let the maintenance message show.
23
-if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
23
+if ( ! isset( $_GET[ 'wordpoints_module_check' ], $_GET[ 'check_module' ] ) ) { // WPCS: CSRF OK.
24 24
 	return;
25 25
 }
26 26
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
 }
21 21
 
22 22
 // If we're not running a module check, let the maintenance message show.
23
-if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) { // WPCS: CSRF OK.
23
+if ( ! isset( $_GET['wordpoints_module_check'], $_GET['check_module'] ) ) {
24
+// WPCS: CSRF OK.
24 25
 	return;
25 26
 }
26 27
 
Please login to merge, or discard this patch.
src/admin/classes/ajax/hooks.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 	private function verify_request( $action ) {
317 317
 
318 318
 		if (
319
-			empty( $_POST['nonce'] )
319
+			empty( $_POST[ 'nonce' ] )
320 320
 			|| ! wordpoints_verify_nonce( 'nonce', $action, null, 'post' )
321 321
 		) {
322 322
 			wp_send_json_error(
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
 	 */
335 335
 	protected function get_reaction_store() {
336 336
 
337
-		if ( ! isset( $_POST['reaction_store'] ) ) { // WPCS: CSRF OK.
337
+		if ( ! isset( $_POST[ 'reaction_store' ] ) ) { // WPCS: CSRF OK.
338 338
 			$this->unexpected_error( 'reaction_store' );
339 339
 		}
340 340
 
341
-		$reactor_slug = sanitize_key( $_POST['reaction_store'] ); // WPCS: CSRF OK.
341
+		$reactor_slug = sanitize_key( $_POST[ 'reaction_store' ] ); // WPCS: CSRF OK.
342 342
 
343 343
 		$reaction_store = wordpoints_hooks()->get_reaction_store( $reactor_slug );
344 344
 
@@ -361,12 +361,12 @@  discard block
 block discarded – undo
361 361
 	 */
362 362
 	protected function get_reaction() {
363 363
 
364
-		if ( ! isset( $_POST['id'] ) ) { // WPCS: CSRF OK.
364
+		if ( ! isset( $_POST[ 'id' ] ) ) { // WPCS: CSRF OK.
365 365
 			$this->unexpected_error( 'id' );
366 366
 		}
367 367
 
368 368
 		$reaction = $this->reaction_store->get_reaction(
369
-			wordpoints_int( $_POST['id'] ) // WPCS: CSRF OK.
369
+			wordpoints_int( $_POST[ 'id' ] ) // WPCS: CSRF OK.
370 370
 		);
371 371
 
372 372
 		if ( ! $reaction ) {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
 		$data = wp_unslash( $_POST ); // WPCS: CSRF OK.
389 389
 
390
-		unset( $data['id'], $data['action'], $data['nonce'], $data['reaction_store'] );
390
+		unset( $data[ 'id' ], $data[ 'action' ], $data[ 'nonce' ], $data[ 'reaction_store' ] );
391 391
 
392 392
 		return $data;
393 393
 	}
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -334,7 +334,8 @@  discard block
 block discarded – undo
334 334
 	 */
335 335
 	protected function get_reaction_store() {
336 336
 
337
-		if ( ! isset( $_POST['reaction_store'] ) ) { // WPCS: CSRF OK.
337
+		if ( ! isset( $_POST['reaction_store'] ) ) {
338
+// WPCS: CSRF OK.
338 339
 			$this->unexpected_error( 'reaction_store' );
339 340
 		}
340 341
 
@@ -361,7 +362,8 @@  discard block
 block discarded – undo
361 362
 	 */
362 363
 	protected function get_reaction() {
363 364
 
364
-		if ( ! isset( $_POST['id'] ) ) { // WPCS: CSRF OK.
365
+		if ( ! isset( $_POST['id'] ) ) {
366
+// WPCS: CSRF OK.
365 367
 			$this->unexpected_error( 'id' );
366 368
 		}
367 369
 
Please login to merge, or discard this patch.
src/admin/screens/configure-components-load.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,15 +13,15 @@
 block discarded – undo
13 13
 
14 14
 if (
15 15
 	'components' !== wordpoints_admin_get_current_tab()
16
-	|| ! isset( $_POST['wordpoints_component'], $_POST['wordpoints_component_action'], $_POST['_wpnonce'] )
16
+	|| ! isset( $_POST[ 'wordpoints_component' ], $_POST[ 'wordpoints_component_action' ], $_POST[ '_wpnonce' ] )
17 17
 ) {
18 18
 	return;
19 19
 }
20 20
 
21 21
 $components = WordPoints_Components::instance();
22
-$component  = sanitize_key( $_POST['wordpoints_component'] );
22
+$component  = sanitize_key( $_POST[ 'wordpoints_component' ] );
23 23
 
24
-$action = sanitize_key( $_POST['wordpoints_component_action'] );
24
+$action = sanitize_key( $_POST[ 'wordpoints_component_action' ] );
25 25
 
26 26
 check_admin_referer( "wordpoints_{$action}_component-{$component}" );
27 27
 
Please login to merge, or discard this patch.