Completed
Push — develop ( 9aa69a...b20875 )
by J.D.
03:27
created
src/components/points/classes/hook/extension/legacy/periods.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
 		$expected_settings = array( array( 'current:user' ) );
41 41
 
42
-		if ( ! isset( $settings['args'] ) || $settings['args'] !== $expected_settings ) {
42
+		if ( ! isset( $settings[ 'args' ] ) || $settings[ 'args' ] !== $expected_settings ) {
43 43
 			return false;
44 44
 		}
45 45
 
Please login to merge, or discard this patch.
src/components/points/classes/hook/extension/legacy/reversals.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	protected function get_points_logs_to_be_reversed( WordPoints_Hook_Fire $fire ) {
67 67
 
68
-		if ( isset( $fire->data[ $this->slug ]['points_logs'] ) ) {
69
-			return $fire->data[ $this->slug ]['points_logs'];
68
+		if ( isset( $fire->data[ $this->slug ][ 'points_logs' ] ) ) {
69
+			return $fire->data[ $this->slug ][ 'points_logs' ];
70 70
 		}
71 71
 
72 72
 		$meta_queries = array(
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 			$entities = $fire->event_args->get_signature_args();
86 86
 
87 87
 			if ( ! $entities ) {
88
-				$fire->data[ $this->slug ]['points_logs'] = array();
88
+				$fire->data[ $this->slug ][ 'points_logs' ] = array();
89 89
 				return array();
90 90
 			}
91 91
 
92 92
 			// Legacy hooks only ever related to a single entity.
93 93
 			$entity = reset( $entities );
94 94
 
95
-			$meta_queries[] = array(
95
+			$meta_queries[ ] = array(
96 96
 				'key'   => $meta_key,
97 97
 				'value' => $entity->get_the_id(),
98 98
 			);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			$logs = array();
118 118
 		}
119 119
 
120
-		$fire->data[ $this->slug ]['points_logs'] = $logs;
120
+		$fire->data[ $this->slug ][ 'points_logs' ] = $logs;
121 121
 
122 122
 		return $logs;
123 123
 	}
Please login to merge, or discard this patch.
src/components/points/classes/hook/event/post/publish/legacy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
 		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
49 49
 
50
-		switch ( $parsed['dynamic'] ) {
50
+		switch ( $parsed[ 'dynamic' ] ) {
51 51
 
52 52
 			case 'post':
53 53
 				return __( 'Post deleted.', 'wordpoints' );
Please login to merge, or discard this patch.
src/components/points/classes/widget/top/users.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	protected function verify_settings( $instance ) {
52 52
 
53
-		if ( empty( $instance['num_users'] ) ) {
54
-			$instance['num_users'] = $this->defaults['num_users'];
53
+		if ( empty( $instance[ 'num_users' ] ) ) {
54
+			$instance[ 'num_users' ] = $this->defaults[ 'num_users' ];
55 55
 		}
56 56
 
57 57
 		return parent::verify_settings( $instance );
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	protected function widget_body( $instance ) {
65 65
 
66 66
 		wordpoints_points_show_top_users(
67
-			$instance['num_users']
68
-			, $instance['points_type']
67
+			$instance[ 'num_users' ]
68
+			, $instance[ 'points_type' ]
69 69
 			, 'widget'
70 70
 		);
71 71
 	}
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 
86 86
 		parent::update( $new_instance, $old_instance );
87 87
 
88
-		if ( ! wordpoints_posint( $this->instance['num_users'] ) ) {
89
-			$this->instance['num_users'] = $this->defaults['num_users'];
88
+		if ( ! wordpoints_posint( $this->instance[ 'num_users' ] ) ) {
89
+			$this->instance[ 'num_users' ] = $this->defaults[ 'num_users' ];
90 90
 		}
91 91
 
92 92
 		return $this->instance;
@@ -100,15 +100,15 @@  discard block
 block discarded – undo
100 100
 
101 101
 		parent::form( $instance );
102 102
 
103
-		if ( ! wordpoints_posint( $this->instance['num_users'] ) ) {
104
-			$this->instance['num_users'] = $this->defaults['num_users'];
103
+		if ( ! wordpoints_posint( $this->instance[ 'num_users' ] ) ) {
104
+			$this->instance[ 'num_users' ] = $this->defaults[ 'num_users' ];
105 105
 		}
106 106
 
107 107
 		?>
108 108
 
109 109
 		<p>
110 110
 			<label for="<?php echo esc_attr( $this->get_field_id( 'num_users' ) ); ?>"><?php esc_html_e( 'Number of top users to show', 'wordpoints' ); ?></label>
111
-			<input type="number" min="1" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'num_users' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'num_users' ) ); ?>" value="<?php echo absint( $this->instance['num_users'] ); ?>" />
111
+			<input type="number" min="1" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'num_users' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'num_users' ) ); ?>" value="<?php echo absint( $this->instance[ 'num_users' ] ); ?>" />
112 112
 		</p>
113 113
 
114 114
 		<?php
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/shortcode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 	 */
20 20
 	protected function verify_atts() {
21 21
 
22
-		if ( isset( $this->pairs['rank_group'] ) && empty( $this->atts['rank_group'] ) ) {
22
+		if ( isset( $this->pairs[ 'rank_group' ] ) && empty( $this->atts[ 'rank_group' ] ) ) {
23 23
 
24 24
 			return sprintf(
25 25
 				// translators: 1. Attribute name; 2. Shortcode name.
Please login to merge, or discard this patch.
src/components/ranks/classes/rank/shortcode/user/rank.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
 	protected function generate() {
38 38
 
39 39
 		return wordpoints_get_formatted_user_rank(
40
-			$this->atts['user_id']
41
-			, $this->atts['rank_group']
40
+			$this->atts[ 'user_id' ]
41
+			, $this->atts[ 'rank_group' ]
42 42
 			, 'user_rank_shortcode'
43 43
 		);
44 44
 	}
Please login to merge, or discard this patch.
src/classes/entity/stored/db/table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 			'type' => 'db',
34 34
 			'info' => array(
35 35
 				'type'       => 'table',
36
-				'table_name' => $GLOBALS['wpdb']->{$this->wpdb_table_name},
36
+				'table_name' => $GLOBALS[ 'wpdb' ]->{$this->wpdb_table_name},
37 37
 			),
38 38
 		);
39 39
 	}
Please login to merge, or discard this patch.
src/classes/entity/contexts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 			}
93 93
 		}
94 94
 
95
-		$this->switched[] = $switched;
95
+		$this->switched[ ] = $switched;
96 96
 
97 97
 		return true;
98 98
 	}
Please login to merge, or discard this patch.
src/classes/entity/restrictions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$depth = count( $hierarchy );
52 52
 
53 53
 		if ( 1 === $depth ) {
54
-			$class_hierarchies[] = array();
54
+			$class_hierarchies[ ] = array();
55 55
 		}
56 56
 
57 57
 		if ( is_array( $entity_id ) ) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		// If a user isn't allowed to even know about an entity, they can't do
73 73
 		// anything else either. So we always check that too.
74 74
 		if ( 'know' !== $type ) {
75
-			$types[] = 'know';
75
+			$types[ ] = 'know';
76 76
 		}
77 77
 
78 78
 		foreach ( $types as $type ) {
Please login to merge, or discard this patch.