Completed
Push — master ( 144c08...e73d65 )
by J.D.
02:53
created
src/admin/includes/classes/ajax/hooks.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 	) {
101 101
 
102 102
 		return 'wordpoints_create_hook_reaction|' . $reaction_store->get_slug()
103
-		       . '|' . wordpoints_hooks()->get_current_mode()
104
-		       . '|' . wp_json_encode( $reaction_store->get_context_id() );
103
+			   . '|' . wordpoints_hooks()->get_current_mode()
104
+			   . '|' . wp_json_encode( $reaction_store->get_context_id() );
105 105
 	}
106 106
 
107 107
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		WordPoints_Hook_ReactionI $reaction
132 132
 	) {
133 133
 		return 'wordpoints_update_hook_reaction|'
134
-		       . wp_json_encode( $reaction->get_guid() );
134
+			   . wp_json_encode( $reaction->get_guid() );
135 135
 	}
136 136
 
137 137
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		WordPoints_Hook_ReactionI $reaction
162 162
 	) {
163 163
 		return 'wordpoints_delete_hook_reaction|'
164
-		       . wp_json_encode( $reaction->get_guid() );
164
+			   . wp_json_encode( $reaction->get_guid() );
165 165
 	}
166 166
 
167 167
 	//
Please login to merge, or discard this patch.
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 *
53 53
 	 * @return array The hook reaction data extracted into an array.
54 54
 	 */
55
-	public static function prepare_hook_reaction( WordPoints_Hook_ReactionI $reaction ) {
55
+	public static function prepare_hook_reaction(WordPoints_Hook_ReactionI $reaction) {
56 56
 
57 57
 		return array_merge(
58 58
 			$reaction->get_all_meta()
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 				'id' => $reaction->ID,
61 61
 				'event' => $reaction->get_event_slug(),
62 62
 				'reaction_store' => $reaction->get_store_slug(),
63
-				'nonce' => self::get_update_nonce( $reaction ),
64
-				'delete_nonce' => self::get_delete_nonce( $reaction ),
63
+				'nonce' => self::get_update_nonce($reaction),
64
+				'delete_nonce' => self::get_delete_nonce($reaction),
65 65
 			)
66 66
 		);
67 67
 	}
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		WordPoints_Hook_Reaction_StoreI $reaction_store
82 82
 	) {
83 83
 
84
-		return wp_create_nonce( self::get_create_nonce_action( $reaction_store ) );
84
+		return wp_create_nonce(self::get_create_nonce_action($reaction_store));
85 85
 	}
86 86
 
87 87
 	/**
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 		WordPoints_Hook_Reaction_StoreI $reaction_store
100 100
 	) {
101 101
 
102
-		return 'wordpoints_create_hook_reaction|' . $reaction_store->get_slug()
103
-		       . '|' . wordpoints_hooks()->get_current_mode()
104
-		       . '|' . wp_json_encode( $reaction_store->get_context_id() );
102
+		return 'wordpoints_create_hook_reaction|'.$reaction_store->get_slug()
103
+		       . '|'.wordpoints_hooks()->get_current_mode()
104
+		       . '|'.wp_json_encode($reaction_store->get_context_id());
105 105
 	}
106 106
 
107 107
 	/**
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 	 *
114 114
 	 * @return string A nonce for updating this reaction.
115 115
 	 */
116
-	public static function get_update_nonce( WordPoints_Hook_ReactionI $reaction ) {
116
+	public static function get_update_nonce(WordPoints_Hook_ReactionI $reaction) {
117 117
 
118
-		return wp_create_nonce( self::get_update_nonce_action( $reaction ) );
118
+		return wp_create_nonce(self::get_update_nonce_action($reaction));
119 119
 	}
120 120
 
121 121
 	/**
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		WordPoints_Hook_ReactionI $reaction
132 132
 	) {
133 133
 		return 'wordpoints_update_hook_reaction|'
134
-		       . wp_json_encode( $reaction->get_guid() );
134
+		       . wp_json_encode($reaction->get_guid());
135 135
 	}
136 136
 
137 137
 	/**
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 	 *
144 144
 	 * @return string A nonce for deleting this reaction.
145 145
 	 */
146
-	public static function get_delete_nonce( WordPoints_Hook_ReactionI $reaction ) {
146
+	public static function get_delete_nonce(WordPoints_Hook_ReactionI $reaction) {
147 147
 
148
-		return wp_create_nonce( self::get_delete_nonce_action( $reaction ) );
148
+		return wp_create_nonce(self::get_delete_nonce_action($reaction));
149 149
 	}
150 150
 
151 151
 	/**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 		WordPoints_Hook_ReactionI $reaction
162 162
 	) {
163 163
 		return 'wordpoints_delete_hook_reaction|'
164
-		       . wp_json_encode( $reaction->get_guid() );
164
+		       . wp_json_encode($reaction->get_guid());
165 165
 	}
166 166
 
167 167
 	//
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
 
188 188
 		add_action(
189 189
 			'wp_ajax_wordpoints_admin_create_hook_reaction'
190
-			, array( $this, 'create_hook_reaction' )
190
+			, array($this, 'create_hook_reaction')
191 191
 		);
192 192
 
193 193
 		add_action(
194 194
 			'wp_ajax_wordpoints_admin_update_hook_reaction'
195
-			, array( $this, 'update_hook_reaction' )
195
+			, array($this, 'update_hook_reaction')
196 196
 		);
197 197
 
198 198
 		add_action(
199 199
 			'wp_ajax_wordpoints_admin_delete_hook_reaction'
200
-			, array( $this, 'delete_hook_reaction' )
200
+			, array($this, 'delete_hook_reaction')
201 201
 		);
202 202
 	}
203 203
 
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
 
213 213
 		$reaction_store = $this->get_reaction_store();
214 214
 
215
-		$this->verify_request( $this->get_create_nonce_action( $reaction_store ) );
215
+		$this->verify_request($this->get_create_nonce_action($reaction_store));
216 216
 
217
-		$reaction = $reaction_store->create_reaction( $this->get_data() );
217
+		$reaction = $reaction_store->create_reaction($this->get_data());
218 218
 
219
-		$this->send_json_result( $reaction, 'create' );
219
+		$this->send_json_result($reaction, 'create');
220 220
 	}
221 221
 
222 222
 	/**
@@ -231,14 +231,14 @@  discard block
 block discarded – undo
231 231
 		$reaction_store = $this->get_reaction_store();
232 232
 		$reaction = $this->get_reaction();
233 233
 
234
-		$this->verify_request( $this->get_update_nonce_action( $reaction ) );
234
+		$this->verify_request($this->get_update_nonce_action($reaction));
235 235
 
236 236
 		$reaction = $reaction_store->update_reaction(
237 237
 			$reaction->ID
238 238
 			, $this->get_data()
239 239
 		);
240 240
 
241
-		$this->send_json_result( $reaction, 'update' );
241
+		$this->send_json_result($reaction, 'update');
242 242
 	}
243 243
 
244 244
 	/**
@@ -253,12 +253,12 @@  discard block
 block discarded – undo
253 253
 		$reaction_store = $this->get_reaction_store();
254 254
 		$reaction = $this->get_reaction();
255 255
 
256
-		$this->verify_request( $this->get_delete_nonce_action( $reaction ) );
256
+		$this->verify_request($this->get_delete_nonce_action($reaction));
257 257
 
258
-		$result = $reaction_store->delete_reaction( $reaction->ID );
258
+		$result = $reaction_store->delete_reaction($reaction->ID);
259 259
 
260
-		if ( ! $result ) {
261
-			wp_send_json_error( array( 'message' => __( 'There was an error deleting the reaction. Please try again.', 'wordpoints' ) ) );
260
+		if ( ! $result) {
261
+			wp_send_json_error(array('message' => __('There was an error deleting the reaction. Please try again.', 'wordpoints')));
262 262
 		}
263 263
 
264 264
 		wp_send_json_success();
@@ -279,11 +279,11 @@  discard block
 block discarded – undo
279 279
 	 *
280 280
 	 * @param string $debug_context Context sent with the message (for debugging).
281 281
 	 */
282
-	private function unexpected_error( $debug_context ) {
282
+	private function unexpected_error($debug_context) {
283 283
 
284 284
 		wp_send_json_error(
285 285
 			array(
286
-				'message' => __( 'There was an unexpected error. Try reloading the page.', 'wordpoints' ),
286
+				'message' => __('There was an unexpected error. Try reloading the page.', 'wordpoints'),
287 287
 				'debug'   => $debug_context,
288 288
 			)
289 289
 		);
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
 	 */
300 300
 	private function verify_user_can() {
301 301
 
302
-		if ( ! current_user_can( 'manage_options' ) ) {
303
-			wp_send_json_error( array( 'message' => __( 'You do not have permission to perform this action. Maybe you have been logged out?', 'wordpoints' ) ) );
302
+		if ( ! current_user_can('manage_options')) {
303
+			wp_send_json_error(array('message' => __('You do not have permission to perform this action. Maybe you have been logged out?', 'wordpoints')));
304 304
 		}
305 305
 	}
306 306
 
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
 	 *
314 314
 	 * @param string $action The action the nonce should be for.
315 315
 	 */
316
-	private function verify_request( $action ) {
316
+	private function verify_request($action) {
317 317
 
318 318
 		if (
319
-			empty( $_POST['nonce'] )
320
-			|| ! wordpoints_verify_nonce( 'nonce', $action, null, 'post' )
319
+			empty($_POST['nonce'])
320
+			|| ! wordpoints_verify_nonce('nonce', $action, null, 'post')
321 321
 		) {
322 322
 			wp_send_json_error(
323
-				array( 'message' => __( 'Your security token for this action has expired. Refresh the page and try again.', 'wordpoints' ) )
323
+				array('message' => __('Your security token for this action has expired. Refresh the page and try again.', 'wordpoints'))
324 324
 			);
325 325
 		}
326 326
 	}
@@ -334,16 +334,16 @@  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.
338
-			$this->unexpected_error( 'reaction_store' );
337
+		if ( ! isset($_POST['reaction_store'])) { // WPCS: CSRF OK.
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
-		$reaction_store = wordpoints_hooks()->get_reaction_store( $reactor_slug );
343
+		$reaction_store = wordpoints_hooks()->get_reaction_store($reactor_slug);
344 344
 
345
-		if ( ! $reaction_store instanceof WordPoints_Hook_Reaction_StoreI ) {
346
-			$this->unexpected_error( 'reaction_store_invalid' );
345
+		if ( ! $reaction_store instanceof WordPoints_Hook_Reaction_StoreI) {
346
+			$this->unexpected_error('reaction_store_invalid');
347 347
 		}
348 348
 
349 349
 		$this->reaction_store_slug = $reactor_slug;
@@ -361,16 +361,16 @@  discard block
 block discarded – undo
361 361
 	 */
362 362
 	protected function get_reaction() {
363 363
 
364
-		if ( ! isset( $_POST['id'] ) ) { // WPCS: CSRF OK.
365
-			$this->unexpected_error( 'id' );
364
+		if ( ! isset($_POST['id'])) { // WPCS: CSRF OK.
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
-		if ( ! $reaction ) {
373
-			wp_send_json_error( array( 'message' => __( 'The reaction ID passed to the server is invalid. Perhaps it has been deleted. Try reloading the page.', 'wordpoints' ) ) );
372
+		if ( ! $reaction) {
373
+			wp_send_json_error(array('message' => __('The reaction ID passed to the server is invalid. Perhaps it has been deleted. Try reloading the page.', 'wordpoints')));
374 374
 		}
375 375
 
376 376
 		return $reaction;
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 	 */
386 386
 	protected function get_data() {
387 387
 
388
-		$data = wp_unslash( $_POST ); // WPCS: CSRF OK.
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
 	}
@@ -400,30 +400,30 @@  discard block
 block discarded – undo
400 400
 	 * @param mixed  $result The result of the action.
401 401
 	 * @param string $action The action being performed: 'create' or 'update'.
402 402
 	 */
403
-	private function send_json_result( $result, $action ) {
403
+	private function send_json_result($result, $action) {
404 404
 
405
-		if ( ! $result ) {
405
+		if ( ! $result) {
406 406
 
407
-			if ( 'create' === $action ) {
408
-				$message = __( 'There was an error adding the reaction. Please try again.', 'wordpoints' );
407
+			if ('create' === $action) {
408
+				$message = __('There was an error adding the reaction. Please try again.', 'wordpoints');
409 409
 			} else {
410
-				$message = __( 'There was an error updating the reaction. Please try again.', 'wordpoints' );
410
+				$message = __('There was an error updating the reaction. Please try again.', 'wordpoints');
411 411
 			}
412 412
 
413
-			wp_send_json_error( array( 'message' => $message ) );
413
+			wp_send_json_error(array('message' => $message));
414 414
 
415
-		} elseif ( $result instanceof WordPoints_Hook_Reaction_Validator ) {
415
+		} elseif ($result instanceof WordPoints_Hook_Reaction_Validator) {
416 416
 
417
-			wp_send_json_error( array( 'errors' => $result->get_errors() ) );
417
+			wp_send_json_error(array('errors' => $result->get_errors()));
418 418
 		}
419 419
 
420 420
 		$data = null;
421 421
 
422
-		if ( 'create' === $action ) {
423
-			$data = self::prepare_hook_reaction( $result );
422
+		if ('create' === $action) {
423
+			$data = self::prepare_hook_reaction($result);
424 424
 		}
425 425
 
426
-		wp_send_json_success( $data );
426
+		wp_send_json_success($data);
427 427
 	}
428 428
 }
429 429
 
Please login to merge, or discard this patch.
src/admin/includes/classes/screen/points/types.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @since 1.0.0
57 57
 	 */
58 58
 	protected function get_title() {
59
-		return _x( 'Points Types', 'page title', 'wordpoints' );
59
+		return _x('Points Types', 'page title', 'wordpoints');
60 60
 	}
61 61
 
62 62
 	/**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
 		parent::hooks();
68 68
 
69
-		add_action( 'add_meta_boxes', array( $this, 'add_points_settings_meta_box' ) );
70
-		add_action( 'add_meta_boxes', array( $this, 'add_event_meta_boxes' ) );
69
+		add_action('add_meta_boxes', array($this, 'add_points_settings_meta_box'));
70
+		add_action('add_meta_boxes', array($this, 'add_event_meta_boxes'));
71 71
 	}
72 72
 
73 73
 	/**
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	public function enqueue_scripts() {
77 77
 
78
-		wp_enqueue_style( 'wordpoints-hooks-admin' );
78
+		wp_enqueue_style('wordpoints-hooks-admin');
79 79
 
80
-		wp_enqueue_script( 'postbox' );
80
+		wp_enqueue_script('postbox');
81 81
 
82 82
 		wordpoints_hooks_ui_setup_script_data();
83 83
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 					.addClass( 'closed' );
98 98
 
99 99
 				postboxes.add_postbox_toggles(
100
-					<?php echo wp_json_encode( $this->id ); ?>
100
+					<?php echo wp_json_encode($this->id); ?>
101 101
 				);
102 102
 			} );
103 103
 		</script>
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function add_points_settings_meta_box() {
114 114
 
115
-		if ( ! current_user_can( 'manage_wordpoints_points_types' ) ) {
115
+		if ( ! current_user_can('manage_wordpoints_points_types')) {
116 116
 			return;
117 117
 		}
118 118
 
119 119
 		add_meta_box(
120 120
 			'settings'
121
-			, __( 'Settings', 'wordpoints' )
122
-			, array( $this, 'display_points_settings_meta_box' )
121
+			, __('Settings', 'wordpoints')
122
+			, array($this, 'display_points_settings_meta_box')
123 123
 			, $this->id
124 124
 			, 'side'
125 125
 			, 'default'
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function display_points_settings_meta_box() {
135 135
 
136
-		if ( ! current_user_can( 'manage_wordpoints_points_types' ) ) {
136
+		if ( ! current_user_can('manage_wordpoints_points_types')) {
137 137
 			return;
138 138
 		}
139 139
 
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 
142 142
 		$add_new = 0;
143 143
 
144
-		$points_type = wordpoints_get_points_type( $slug );
144
+		$points_type = wordpoints_get_points_type($slug);
145 145
 
146
-		if ( ! $points_type ) {
146
+		if ( ! $points_type) {
147 147
 
148 148
 			$points_type = array();
149
-			$add_new     = wp_create_nonce( 'wordpoints_add_new_points_type' );
149
+			$add_new     = wp_create_nonce('wordpoints_add_new_points_type');
150 150
 		}
151 151
 
152 152
 		$points_type = array_merge(
@@ -161,15 +161,15 @@  discard block
 block discarded – undo
161 161
 		?>
162 162
 
163 163
 		<form method="post">
164
-			<?php if ( $slug ) : ?>
164
+			<?php if ($slug) : ?>
165 165
 				<p>
166 166
 					<span class="wordpoints-points-slug">
167 167
 						<em>
168
-							<?php echo esc_html( sprintf( __( 'Slug: %s', 'wordpoints' ), $slug ) ); ?>
168
+							<?php echo esc_html(sprintf(__('Slug: %s', 'wordpoints'), $slug)); ?>
169 169
 						</em>
170 170
 					</span>
171 171
 				</p>
172
-				<?php wp_nonce_field( "wordpoints_update_points_type-$slug", 'update_points_type' ); ?>
172
+				<?php wp_nonce_field("wordpoints_update_points_type-$slug", 'update_points_type'); ?>
173 173
 			<?php endif; ?>
174 174
 
175 175
 			<?php
@@ -183,45 +183,45 @@  discard block
 block discarded – undo
183 183
 			 *
184 184
 			 * @param string $points_type The slug of the points type.
185 185
 			 */
186
-			do_action( 'wordpoints_points_type_form_top', $slug );
186
+			do_action('wordpoints_points_type_form_top', $slug);
187 187
 
188
-			if ( $add_new ) {
188
+			if ($add_new) {
189 189
 
190 190
 				// Mark the prefix and suffix optional on the add new form.
191
-				$prefix = _x( 'Prefix (optional):', 'points type', 'wordpoints' );
192
-				$suffix = _x( 'Suffix (optional):', 'points type', 'wordpoints' );
191
+				$prefix = _x('Prefix (optional):', 'points type', 'wordpoints');
192
+				$suffix = _x('Suffix (optional):', 'points type', 'wordpoints');
193 193
 
194 194
 			} else {
195 195
 
196
-				$prefix = _x( 'Prefix:', 'points type', 'wordpoints' );
197
-				$suffix = _x( 'Suffix:', 'points type', 'wordpoints' );
196
+				$prefix = _x('Prefix:', 'points type', 'wordpoints');
197
+				$suffix = _x('Suffix:', 'points type', 'wordpoints');
198 198
 			}
199 199
 
200 200
 			?>
201 201
 
202 202
 			<p>
203 203
 				<label
204
-					for="points-name-<?php echo esc_attr( $slug ); ?>"><?php echo esc_html_x( 'Name:', 'points type', 'wordpoints' ); ?></label>
204
+					for="points-name-<?php echo esc_attr($slug); ?>"><?php echo esc_html_x('Name:', 'points type', 'wordpoints'); ?></label>
205 205
 				<input class="widefat" type="text"
206
-				       id="points-name-<?php echo esc_attr( $slug ); ?>"
206
+				       id="points-name-<?php echo esc_attr($slug); ?>"
207 207
 				       name="points-name"
208
-				       value="<?php echo esc_attr( $points_type['name'] ); ?>"/>
208
+				       value="<?php echo esc_attr($points_type['name']); ?>"/>
209 209
 			</p>
210 210
 			<p>
211 211
 				<label
212
-					for="points-prefix-<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $prefix ); ?></label>
212
+					for="points-prefix-<?php echo esc_attr($slug); ?>"><?php echo esc_html($prefix); ?></label>
213 213
 				<input class="widefat" type="text"
214
-				       id="points-prefix-<?php echo esc_attr( $slug ); ?>"
214
+				       id="points-prefix-<?php echo esc_attr($slug); ?>"
215 215
 				       name="points-prefix"
216
-				       value="<?php echo esc_attr( $points_type['prefix'] ); ?>"/>
216
+				       value="<?php echo esc_attr($points_type['prefix']); ?>"/>
217 217
 			</p>
218 218
 			<p>
219 219
 				<label
220
-					for="points-suffix-<?php echo esc_attr( $slug ); ?>"><?php echo esc_html( $suffix ); ?></label>
220
+					for="points-suffix-<?php echo esc_attr($slug); ?>"><?php echo esc_html($suffix); ?></label>
221 221
 				<input class="widefat" type="text"
222
-				       id="points-suffix-<?php echo esc_attr( $slug ); ?>"
222
+				       id="points-suffix-<?php echo esc_attr($slug); ?>"
223 223
 				       name="points-suffix"
224
-				       value="<?php echo esc_attr( $points_type['suffix'] ); ?>"/>
224
+				       value="<?php echo esc_attr($points_type['suffix']); ?>"/>
225 225
 			</p>
226 226
 
227 227
 			<?php
@@ -235,28 +235,28 @@  discard block
 block discarded – undo
235 235
 			 *
236 236
 			 * @param string $points_type The slug of the points type.
237 237
 			 */
238
-			do_action( 'wordpoints_points_type_form_bottom', $slug );
238
+			do_action('wordpoints_points_type_form_bottom', $slug);
239 239
 
240 240
 			?>
241 241
 
242 242
 			<input type="hidden" name="points-slug"
243
-			       value="<?php echo esc_attr( $slug ); ?>"/>
243
+			       value="<?php echo esc_attr($slug); ?>"/>
244 244
 			<input type="hidden" name="add_new" class="add_new"
245
-			       value="<?php echo esc_attr( $add_new ); ?>"/>
245
+			       value="<?php echo esc_attr($add_new); ?>"/>
246 246
 
247 247
 			<div class="hook-control-actions">
248 248
 				<div class="alignleft">
249 249
 					<?php
250 250
 
251
-					if ( ! $add_new ) {
252
-						wp_nonce_field( "wordpoints_delete_points_type-{$slug}", 'delete-points-type-nonce' );
253
-						submit_button( _x( 'Delete', 'points type', 'wordpoints' ), 'delete', 'delete-points-type', false, array( 'id' => "delete_points_type-{$slug}" ) );
251
+					if ( ! $add_new) {
252
+						wp_nonce_field("wordpoints_delete_points_type-{$slug}", 'delete-points-type-nonce');
253
+						submit_button(_x('Delete', 'points type', 'wordpoints'), 'delete', 'delete-points-type', false, array('id' => "delete_points_type-{$slug}"));
254 254
 					}
255 255
 
256 256
 					?>
257 257
 				</div>
258 258
 				<div class="alignright">
259
-					<?php submit_button( _x( 'Save', 'points type', 'wordpoints' ), 'button-primary hook-control-save right', 'save-points-type', false, array( 'id' => "points-{$slug}-save" ) ); ?>
259
+					<?php submit_button(_x('Save', 'points type', 'wordpoints'), 'button-primary hook-control-save right', 'save-points-type', false, array('id' => "points-{$slug}-save")); ?>
260 260
 					<span class="spinner"></span>
261 261
 				</div>
262 262
 				<br class="clear"/>
@@ -273,17 +273,17 @@  discard block
 block discarded – undo
273 273
 	 */
274 274
 	public function add_event_meta_boxes() {
275 275
 
276
-		if ( ! $this->current_points_type ) {
276
+		if ( ! $this->current_points_type) {
277 277
 			return;
278 278
 		}
279 279
 
280 280
 		/** @var WordPoints_Hook_EventI $event */
281
-		foreach ( $this->hooks->events->get_all() as $slug => $event ) {
281
+		foreach ($this->hooks->events->get_all() as $slug => $event) {
282 282
 
283 283
 			add_meta_box(
284 284
 				"{$this->current_points_type}-{$slug}"
285 285
 				, $event->get_title()
286
-				, array( $this, 'display_event_meta_box' )
286
+				, array($this, 'display_event_meta_box')
287 287
 				, $this->id
288 288
 				, 'events'
289 289
 				, 'default'
@@ -304,54 +304,54 @@  discard block
 block discarded – undo
304 304
 	 * @param array $points_type The points type this meta-box relates to.
305 305
 	 * @param array $meta_box    The data the meta-box was created with.
306 306
 	 */
307
-	public function display_event_meta_box( $points_type, $meta_box ) {
307
+	public function display_event_meta_box($points_type, $meta_box) {
308 308
 
309 309
 		$event_slug = $meta_box['args']['slug'];
310 310
 
311 311
 		$data = array();
312 312
 
313
-		$reaction_store = wordpoints_hooks()->get_reaction_store( 'points' );
313
+		$reaction_store = wordpoints_hooks()->get_reaction_store('points');
314 314
 
315
-		foreach ( $reaction_store->get_reactions_to_event( $event_slug ) as $id => $reaction ) {
316
-			if ( $reaction->get_meta( 'points_type' ) === $this->current_points_type ) {
315
+		foreach ($reaction_store->get_reactions_to_event($event_slug) as $id => $reaction) {
316
+			if ($reaction->get_meta('points_type') === $this->current_points_type) {
317 317
 				$data[] = WordPoints_Admin_Ajax_Hooks::prepare_hook_reaction(
318 318
 					$reaction
319 319
 				);
320 320
 			}
321 321
 		}
322 322
 
323
-		$args = $this->hooks->events->args->get_children( $event_slug );
323
+		$args = $this->hooks->events->args->get_children($event_slug);
324 324
 
325
-		$event_data = array( 'args' => array() );
325
+		$event_data = array('args' => array());
326 326
 
327
-		foreach ( $args as $slug => $arg ) {
327
+		foreach ($args as $slug => $arg) {
328 328
 
329
-			$event_data['args'][ $slug ] = array(
329
+			$event_data['args'][$slug] = array(
330 330
 				'slug' => $slug,
331 331
 			);
332 332
 
333
-			if ( $arg instanceof WordPoints_Hook_Arg ) {
334
-				$event_data['args'][ $slug ]['title'] = $arg->get_title();
335
-				$event_data['args'][ $slug ]['is_stateful'] = $arg->is_stateful();
333
+			if ($arg instanceof WordPoints_Hook_Arg) {
334
+				$event_data['args'][$slug]['title'] = $arg->get_title();
335
+				$event_data['args'][$slug]['is_stateful'] = $arg->is_stateful();
336 336
 			}
337 337
 		}
338 338
 
339 339
 		?>
340 340
 
341 341
 		<script>
342
-			WordPointsHooksAdminData.events[<?php echo wp_json_encode( $event_slug ); ?>] = <?php echo wp_json_encode( $event_data ); ?>;
343
-			WordPointsHooksAdminData.reactions[<?php echo wp_json_encode( $event_slug ); ?>] = <?php echo wp_json_encode( $data ); ?>;
342
+			WordPointsHooksAdminData.events[<?php echo wp_json_encode($event_slug); ?>] = <?php echo wp_json_encode($event_data); ?>;
343
+			WordPointsHooksAdminData.reactions[<?php echo wp_json_encode($event_slug); ?>] = <?php echo wp_json_encode($data); ?>;
344 344
 		</script>
345 345
 
346 346
 		<div class="wordpoints-hook-reaction-group-container">
347 347
 			<p class="description wordpoints-hook-reaction-group-description">
348
-				<?php echo esc_html( $meta_box['args']['event']->get_description() ); ?>
348
+				<?php echo esc_html($meta_box['args']['event']->get_description()); ?>
349 349
 			</p>
350 350
 
351 351
 			<div class="wordpoints-hook-reaction-group"
352
-				data-wordpoints-hooks-hook-event="<?php echo esc_attr( $event_slug ); ?>"
353
-				data-wordpoints-hooks-points-type="<?php echo esc_attr( $this->current_points_type ); ?>"
354
-				data-wordpoints-hooks-create-nonce="<?php echo esc_attr( WordPoints_Admin_Ajax_Hooks::get_create_nonce( $reaction_store ) ); ?>"
352
+				data-wordpoints-hooks-hook-event="<?php echo esc_attr($event_slug); ?>"
353
+				data-wordpoints-hooks-points-type="<?php echo esc_attr($this->current_points_type); ?>"
354
+				data-wordpoints-hooks-create-nonce="<?php echo esc_attr(WordPoints_Admin_Ajax_Hooks::get_create_nonce($reaction_store)); ?>"
355 355
 				data-wordpoints-hooks-reaction-store="points"
356 356
 				data-wordpoints-hooks-reactor="points">
357 357
 			</div>
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 			<div class="controls">
368 368
 				<button type="button" class="button-primary add-reaction">
369
-					<?php esc_html_e( 'Add New', 'wordpoints' ); ?>
369
+					<?php esc_html_e('Add New', 'wordpoints'); ?>
370 370
 				</button>
371 371
 			</div>
372 372
 		</div>
@@ -386,19 +386,19 @@  discard block
 block discarded – undo
386 386
 		// Show a tab for each points type.
387 387
 		$tabs = array();
388 388
 
389
-		foreach ( $points_types as $slug => $settings ) {
390
-			$tabs[ $slug ] = $settings['name'];
389
+		foreach ($points_types as $slug => $settings) {
390
+			$tabs[$slug] = $settings['name'];
391 391
 		}
392 392
 
393
-		$tabs['add-new'] = __( 'Add New', 'wordpoints' );
393
+		$tabs['add-new'] = __('Add New', 'wordpoints');
394 394
 
395
-		$tab = wordpoints_admin_get_current_tab( $tabs );
395
+		$tab = wordpoints_admin_get_current_tab($tabs);
396 396
 
397
-		if ( 'add-new' !== $tab ) {
397
+		if ('add-new' !== $tab) {
398 398
 			$this->current_points_type = $tab;
399 399
 		}
400 400
 
401
-		do_action( 'add_meta_boxes', $this->id );
401
+		do_action('add_meta_boxes', $this->id);
402 402
 
403 403
 		$this->tabs = $tabs;
404 404
 	}
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	 */
411 411
 	public function save_points_type() {
412 412
 
413
-		if ( ! current_user_can( 'manage_wordpoints_points_types' ) ) {
413
+		if ( ! current_user_can('manage_wordpoints_points_types')) {
414 414
 			return;
415 415
 		}
416 416
 
@@ -425,43 +425,43 @@  discard block
 block discarded – undo
425 425
 
426 426
 			$settings = array();
427 427
 
428
-			$settings['name']   = trim( sanitize_text_field( wp_unslash( $_POST['points-name'] ) ) ); // WPCS: CSRF OK
429
-			$settings['prefix'] = ltrim( sanitize_text_field( wp_unslash( $_POST['points-prefix'] ) ) ); // WPCS: CSRF OK
430
-			$settings['suffix'] = rtrim( sanitize_text_field( wp_unslash( $_POST['points-suffix'] ) ) ); // WPCS: CSRF OK
428
+			$settings['name']   = trim(sanitize_text_field(wp_unslash($_POST['points-name']))); // WPCS: CSRF OK
429
+			$settings['prefix'] = ltrim(sanitize_text_field(wp_unslash($_POST['points-prefix']))); // WPCS: CSRF OK
430
+			$settings['suffix'] = rtrim(sanitize_text_field(wp_unslash($_POST['points-suffix']))); // WPCS: CSRF OK
431 431
 
432 432
 			if (
433
-				isset( $_POST['points-slug'] )
434
-				&& wordpoints_verify_nonce( 'update_points_type', 'wordpoints_update_points_type-%s', array( 'points-slug' ), 'post' )
433
+				isset($_POST['points-slug'])
434
+				&& wordpoints_verify_nonce('update_points_type', 'wordpoints_update_points_type-%s', array('points-slug'), 'post')
435 435
 			) {
436 436
 
437 437
 				// - We are updating an existing points type.
438 438
 
439
-				$points_type = sanitize_key( $_POST['points-slug'] );
439
+				$points_type = sanitize_key($_POST['points-slug']);
440 440
 
441
-				$old_settings = wordpoints_get_points_type( $points_type );
441
+				$old_settings = wordpoints_get_points_type($points_type);
442 442
 
443
-				if ( false === $old_settings ) {
443
+				if (false === $old_settings) {
444 444
 
445 445
 					add_settings_error(
446 446
 						''
447 447
 						, 'wordpoints_points_type_update'
448
-						, __( 'Error: failed updating points type.', 'wordpoints' )
448
+						, __('Error: failed updating points type.', 'wordpoints')
449 449
 						, 'updated'
450 450
 					);
451 451
 
452 452
 					return;
453 453
 				}
454 454
 
455
-				if ( is_array( $old_settings ) ) {
456
-					$settings = array_merge( $old_settings, $settings );
455
+				if (is_array($old_settings)) {
456
+					$settings = array_merge($old_settings, $settings);
457 457
 				}
458 458
 
459
-				if ( ! wordpoints_update_points_type( $points_type, $settings ) ) {
459
+				if ( ! wordpoints_update_points_type($points_type, $settings)) {
460 460
 
461 461
 					add_settings_error(
462 462
 						''
463 463
 						, 'wordpoints_points_type_update'
464
-						, __( 'Error: failed updating points type.', 'wordpoints' )
464
+						, __('Error: failed updating points type.', 'wordpoints')
465 465
 						, 'updated'
466 466
 					);
467 467
 
@@ -470,23 +470,23 @@  discard block
 block discarded – undo
470 470
 					add_settings_error(
471 471
 						''
472 472
 						, 'wordpoints_points_type_update'
473
-						, __( 'Points type updated.', 'wordpoints' )
473
+						, __('Points type updated.', 'wordpoints')
474 474
 						, 'updated'
475 475
 					);
476 476
 				}
477 477
 
478
-			} elseif ( wordpoints_verify_nonce( 'add_new', 'wordpoints_add_new_points_type', null, 'post' ) ) {
478
+			} elseif (wordpoints_verify_nonce('add_new', 'wordpoints_add_new_points_type', null, 'post')) {
479 479
 
480 480
 				// - We are creating a new points type.
481 481
 
482
-				$slug = wordpoints_add_points_type( $settings );
482
+				$slug = wordpoints_add_points_type($settings);
483 483
 
484
-				if ( ! $slug ) {
484
+				if ( ! $slug) {
485 485
 
486 486
 					add_settings_error(
487 487
 						''
488 488
 						, 'wordpoints_points_type_create'
489
-						, __( 'Please choose a unique name for this points type.', 'wordpoints' )
489
+						, __('Please choose a unique name for this points type.', 'wordpoints')
490 490
 					);
491 491
 
492 492
 				} else {
@@ -496,26 +496,26 @@  discard block
 block discarded – undo
496 496
 					add_settings_error(
497 497
 						''
498 498
 						, 'wordpoints_points_type_create'
499
-						, __( 'Points type created.', 'wordpoints' )
499
+						, __('Points type created.', 'wordpoints')
500 500
 						, 'updated'
501 501
 					);
502 502
 				}
503 503
 			}
504 504
 
505 505
 		} elseif (
506
-			! empty( $_POST['delete-points-type'] )
507
-			&& isset( $_POST['points-slug'] )
508
-			&& wordpoints_verify_nonce( 'delete-points-type-nonce', 'wordpoints_delete_points_type-%s', array( 'points-slug' ), 'post' )
506
+			! empty($_POST['delete-points-type'])
507
+			&& isset($_POST['points-slug'])
508
+			&& wordpoints_verify_nonce('delete-points-type-nonce', 'wordpoints_delete_points_type-%s', array('points-slug'), 'post')
509 509
 		) {
510 510
 
511 511
 			// - We are deleting a points type.
512 512
 
513
-			if ( wordpoints_delete_points_type( sanitize_key( $_POST['points-slug'] ) ) ) {
513
+			if (wordpoints_delete_points_type(sanitize_key($_POST['points-slug']))) {
514 514
 
515 515
 				add_settings_error(
516 516
 					''
517 517
 					, 'wordpoints_points_type_delete'
518
-					, __( 'Points type deleted.', 'wordpoints' )
518
+					, __('Points type deleted.', 'wordpoints')
519 519
 					, 'updated'
520 520
 				);
521 521
 
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 				add_settings_error(
525 525
 					''
526 526
 					, 'wordpoints_points_type_delete'
527
-					, __( 'Error while deleting.', 'wordpoints' )
527
+					, __('Error while deleting.', 'wordpoints')
528 528
 				);
529 529
 			}
530 530
 		}
@@ -540,25 +540,25 @@  discard block
 block discarded – undo
540 540
 		 *
541 541
 		 * @since 1.0.0
542 542
 		 */
543
-		do_action( 'wordpoints_admin_points_events_head' );
543
+		do_action('wordpoints_admin_points_events_head');
544 544
 
545
-		if ( is_network_admin() ) {
546
-			$title = __( 'Network Events', 'wordpoints' );
547
-			$description = __( 'Award points when various events happen on this network.', 'wordpoints' );
545
+		if (is_network_admin()) {
546
+			$title = __('Network Events', 'wordpoints');
547
+			$description = __('Award points when various events happen on this network.', 'wordpoints');
548 548
 		} else {
549
-			$title = __( 'Events', 'wordpoints' );
550
-			$description = __( 'Award points when various events happen on this site.', 'wordpoints' );
549
+			$title = __('Events', 'wordpoints');
550
+			$description = __('Award points when various events happen on this site.', 'wordpoints');
551 551
 		}
552 552
 
553
-		$points_type = wordpoints_get_points_type( $this->current_points_type );
553
+		$points_type = wordpoints_get_points_type($this->current_points_type);
554 554
 
555 555
 		?>
556 556
 
557 557
 		<div class="wordpoints-points-type-meta-box-wrap">
558 558
 
559 559
 				<form>
560
-					<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
561
-					<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
560
+					<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
561
+					<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
562 562
 				</form>
563 563
 
564 564
 				<div id="poststuff">
@@ -566,17 +566,17 @@  discard block
 block discarded – undo
566 566
 					<div id="post-body" class="metabox-holder columns-<?php echo 1 === (int) get_current_screen()->get_columns() ? '1' : '2'; ?>">
567 567
 
568 568
 						<div id="postbox-container-1" class="postbox-container">
569
-							<?php do_meta_boxes( $this->id, 'side', $points_type ); ?>
569
+							<?php do_meta_boxes($this->id, 'side', $points_type); ?>
570 570
 						</div>
571 571
 
572
-						<?php if ( isset( $this->current_points_type ) ) : ?>
572
+						<?php if (isset($this->current_points_type)) : ?>
573 573
 							<div class="wordpoints-hook-events-heading">
574
-								<h2><?php echo esc_html( $title ); ?></h2>
575
-								<p class="description"><?php echo esc_html( $description ); ?></p>
574
+								<h2><?php echo esc_html($title); ?></h2>
575
+								<p class="description"><?php echo esc_html($description); ?></p>
576 576
 							</div>
577 577
 
578 578
 							<div id="postbox-container-2" class="postbox-container">
579
-								<?php do_meta_boxes( $this->id, 'events', $points_type ); ?>
579
+								<?php do_meta_boxes($this->id, 'events', $points_type); ?>
580 580
 							</div>
581 581
 						<?php endif; ?>
582 582
 
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 		 *
596 596
 		 * @since 1.0.0
597 597
 		 */
598
-		do_action( 'wordpoints_admin_points_events_foot' );
598
+		do_action('wordpoints_admin_points_events_foot');
599 599
 	}
600 600
 }
601 601
 
Please login to merge, or discard this patch.
src/includes/classes/entity/attr/field.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
 	/**
38 38
 	 * @since 1.0.0
39 39
 	 */
40
-	protected function get_attr_value_from_entity( WordPoints_Entity $entity ) {
41
-		return $entity->get_the_attr_value( $this->field );
40
+	protected function get_attr_value_from_entity(WordPoints_Entity $entity) {
41
+		return $entity->get_the_attr_value($this->field);
42 42
 	}
43 43
 	
44 44
 	/**
Please login to merge, or discard this patch.
src/includes/classes/entity/stored/array.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	public function get_storage_info() {
32 32
 		return array(
33 33
 			'type' => 'array',
34
-			'info' => array( 'type' => 'method' ),
34
+			'info' => array('type' => 'method'),
35 35
 		);
36 36
 	}
37 37
 }
Please login to merge, or discard this patch.
src/includes/classes/entity/relationship/stored/field.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
 	/**
38 38
 	 * @since 1.0.0
39 39
 	 */
40
-	protected function get_related_entity_ids( WordPoints_Entity $entity ) {
41
-		return $entity->get_the_attr_value( $this->related_ids_field );
40
+	protected function get_related_entity_ids(WordPoints_Entity $entity) {
41
+		return $entity->get_the_attr_value($this->related_ids_field);
42 42
 	}
43 43
 	
44 44
 	/**
Please login to merge, or discard this patch.
src/includes/classes/entity/attr.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @return mixed The attribute value.
41 41
 	 */
42
-	abstract protected function get_attr_value_from_entity( WordPoints_Entity $entity );
42
+	abstract protected function get_attr_value_from_entity(WordPoints_Entity $entity);
43 43
 
44 44
 	/**
45 45
 	 * Get the data type of this attribute's values.
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 	 *
67 67
 	 * @return bool Whether the value was set correctly.
68 68
 	 */
69
-	public function set_the_value_from_entity( WordPoints_Entity $entity ) {
69
+	public function set_the_value_from_entity(WordPoints_Entity $entity) {
70 70
 
71
-		$this->the_value = $this->get_attr_value_from_entity( $entity );
71
+		$this->the_value = $this->get_attr_value_from_entity($entity);
72 72
 
73 73
 		return true;
74 74
 	}
Please login to merge, or discard this patch.
src/includes/classes/entity/user/roles.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
 	/**
35 35
 	 * @since 1.0.0
36 36
 	 */
37
-	protected function get_related_entity_ids( WordPoints_Entity $entity ) {
38
-		return $entity->get_the_attr_value( $this->related_ids_field );
37
+	protected function get_related_entity_ids(WordPoints_Entity $entity) {
38
+		return $entity->get_the_attr_value($this->related_ids_field);
39 39
 	}
40 40
 
41 41
 	/**
42 42
 	 * @since 1.0.0
43 43
 	 */
44 44
 	public function get_title() {
45
-		return __( 'Roles', 'wordpoints' );
45
+		return __('Roles', 'wordpoints');
46 46
 	}
47 47
 
48 48
 	/**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				'conditions'       => array(
63 63
 					array(
64 64
 						'field' => 'meta_key',
65
-						'value' => $GLOBALS['wpdb']->get_blog_prefix() . 'capabilities',
65
+						'value' => $GLOBALS['wpdb']->get_blog_prefix().'capabilities',
66 66
 					),
67 67
 				),
68 68
 			),
Please login to merge, or discard this patch.
src/includes/classes/index.php 1 patch
Spacing   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -10,113 +10,113 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // auto-generated {
13
-require_once( dirname( __FILE__ ) . 'app.php' );
14
-require_once( dirname( __FILE__ ) . 'app/registry.php' );
15
-require_once( dirname( __FILE__ ) . 'class/autoloader.php' );
16
-require_once( dirname( __FILE__ ) . 'class/registry.php' );
17
-require_once( dirname( __FILE__ ) . 'class/registry/children.php' );
18
-require_once( dirname( __FILE__ ) . 'class/registry/childreni.php' );
19
-require_once( dirname( __FILE__ ) . 'class/registry/persistent.php' );
20
-require_once( dirname( __FILE__ ) . 'class/registryi.php' );
21
-require_once( dirname( __FILE__ ) . 'data/type.php' );
22
-require_once( dirname( __FILE__ ) . 'data/type/integer.php' );
23
-require_once( dirname( __FILE__ ) . 'data/type/text.php' );
24
-require_once( dirname( __FILE__ ) . 'data/typei.php' );
25
-require_once( dirname( __FILE__ ) . 'db/query.php' );
26
-require_once( dirname( __FILE__ ) . 'entity.php' );
27
-require_once( dirname( __FILE__ ) . 'entity/array.php' );
28
-require_once( dirname( __FILE__ ) . 'entity/attr.php' );
29
-require_once( dirname( __FILE__ ) . 'entity/attr/field.php' );
30
-require_once( dirname( __FILE__ ) . 'entity/childi.php' );
31
-require_once( dirname( __FILE__ ) . 'entity/comment.php' );
32
-require_once( dirname( __FILE__ ) . 'entity/comment/author.php' );
33
-require_once( dirname( __FILE__ ) . 'entity/comment/post.php' );
34
-require_once( dirname( __FILE__ ) . 'entity/context.php' );
35
-require_once( dirname( __FILE__ ) . 'entity/context/network.php' );
36
-require_once( dirname( __FILE__ ) . 'entity/context/site.php' );
37
-require_once( dirname( __FILE__ ) . 'entity/enumerablei.php' );
38
-require_once( dirname( __FILE__ ) . 'entity/hierarchy.php' );
39
-require_once( dirname( __FILE__ ) . 'entity/hierarchyi.php' );
40
-require_once( dirname( __FILE__ ) . 'entity/parenti.php' );
41
-require_once( dirname( __FILE__ ) . 'entity/post.php' );
42
-require_once( dirname( __FILE__ ) . 'entity/post/author.php' );
43
-require_once( dirname( __FILE__ ) . 'entity/post/content.php' );
44
-require_once( dirname( __FILE__ ) . 'entity/post/terms.php' );
45
-require_once( dirname( __FILE__ ) . 'entity/post/type.php' );
46
-require_once( dirname( __FILE__ ) . 'entity/post/type/name.php' );
47
-require_once( dirname( __FILE__ ) . 'entity/post/type/relationship.php' );
48
-require_once( dirname( __FILE__ ) . 'entity/relationship.php' );
49
-require_once( dirname( __FILE__ ) . 'entity/relationship/dynamic.php' );
50
-require_once( dirname( __FILE__ ) . 'entity/relationship/stored/field.php' );
51
-require_once( dirname( __FILE__ ) . 'entity/restricted/visibilityi.php' );
52
-require_once( dirname( __FILE__ ) . 'entity/site.php' );
53
-require_once( dirname( __FILE__ ) . 'entity/stored/array.php' );
54
-require_once( dirname( __FILE__ ) . 'entity/stored/db/table.php' );
55
-require_once( dirname( __FILE__ ) . 'entity/term.php' );
56
-require_once( dirname( __FILE__ ) . 'entity/term/id.php' );
57
-require_once( dirname( __FILE__ ) . 'entity/user.php' );
58
-require_once( dirname( __FILE__ ) . 'entity/user/role.php' );
59
-require_once( dirname( __FILE__ ) . 'entity/user/role/name.php' );
60
-require_once( dirname( __FILE__ ) . 'entity/user/roles.php' );
61
-require_once( dirname( __FILE__ ) . 'entityish.php' );
62
-require_once( dirname( __FILE__ ) . 'entityish/storedi.php' );
63
-require_once( dirname( __FILE__ ) . 'entityishi.php' );
64
-require_once( dirname( __FILE__ ) . 'hierarchy.php' );
65
-require_once( dirname( __FILE__ ) . 'hook/action.php' );
66
-require_once( dirname( __FILE__ ) . 'hook/action/comment/new.php' );
67
-require_once( dirname( __FILE__ ) . 'hook/action/post/publish.php' );
68
-require_once( dirname( __FILE__ ) . 'hook/actioni.php' );
69
-require_once( dirname( __FILE__ ) . 'hook/actions.php' );
70
-require_once( dirname( __FILE__ ) . 'hook/arg.php' );
71
-require_once( dirname( __FILE__ ) . 'hook/arg/current/post.php' );
72
-require_once( dirname( __FILE__ ) . 'hook/arg/current/site.php' );
73
-require_once( dirname( __FILE__ ) . 'hook/arg/current/user.php' );
74
-require_once( dirname( __FILE__ ) . 'hook/arg/dynamic.php' );
75
-require_once( dirname( __FILE__ ) . 'hook/condition.php' );
76
-require_once( dirname( __FILE__ ) . 'hook/condition/entity/array/contains.php' );
77
-require_once( dirname( __FILE__ ) . 'hook/condition/equals.php' );
78
-require_once( dirname( __FILE__ ) . 'hook/condition/string/contains.php' );
79
-require_once( dirname( __FILE__ ) . 'hook/conditioni.php' );
80
-require_once( dirname( __FILE__ ) . 'hook/event.php' );
81
-require_once( dirname( __FILE__ ) . 'hook/event/args.php' );
82
-require_once( dirname( __FILE__ ) . 'hook/event/comment/leave.php' );
83
-require_once( dirname( __FILE__ ) . 'hook/event/dynamic.php' );
84
-require_once( dirname( __FILE__ ) . 'hook/event/media/upload.php' );
85
-require_once( dirname( __FILE__ ) . 'hook/event/post/publish.php' );
86
-require_once( dirname( __FILE__ ) . 'hook/event/user/register.php' );
87
-require_once( dirname( __FILE__ ) . 'hook/event/user/visit.php' );
88
-require_once( dirname( __FILE__ ) . 'hook/eventi.php' );
89
-require_once( dirname( __FILE__ ) . 'hook/events.php' );
90
-require_once( dirname( __FILE__ ) . 'hook/extension.php' );
91
-require_once( dirname( __FILE__ ) . 'hook/extension/blocker.php' );
92
-require_once( dirname( __FILE__ ) . 'hook/extension/conditions.php' );
93
-require_once( dirname( __FILE__ ) . 'hook/extension/periods.php' );
94
-require_once( dirname( __FILE__ ) . 'hook/fire.php' );
95
-require_once( dirname( __FILE__ ) . 'hook/hit/logger.php' );
96
-require_once( dirname( __FILE__ ) . 'hook/hit/query.php' );
97
-require_once( dirname( __FILE__ ) . 'hook/reaction.php' );
98
-require_once( dirname( __FILE__ ) . 'hook/reaction/options.php' );
99
-require_once( dirname( __FILE__ ) . 'hook/reaction/store.php' );
100
-require_once( dirname( __FILE__ ) . 'hook/reaction/store/options.php' );
101
-require_once( dirname( __FILE__ ) . 'hook/reaction/store/options/network.php' );
102
-require_once( dirname( __FILE__ ) . 'hook/reaction/storei.php' );
103
-require_once( dirname( __FILE__ ) . 'hook/reaction/validator.php' );
104
-require_once( dirname( __FILE__ ) . 'hook/reactioni.php' );
105
-require_once( dirname( __FILE__ ) . 'hook/reactor.php' );
106
-require_once( dirname( __FILE__ ) . 'hook/reactor/points.php' );
107
-require_once( dirname( __FILE__ ) . 'hook/retroactive/conditions.php' );
108
-require_once( dirname( __FILE__ ) . 'hook/retroactive/query.php' );
109
-require_once( dirname( __FILE__ ) . 'hook/retroactive/query/modifieri.php' );
110
-require_once( dirname( __FILE__ ) . 'hook/retroactive/queryable.php' );
111
-require_once( dirname( __FILE__ ) . 'hook/retroactive/queryi.php' );
112
-require_once( dirname( __FILE__ ) . 'hook/router.php' );
113
-require_once( dirname( __FILE__ ) . 'hook/settings.php' );
114
-require_once( dirname( __FILE__ ) . 'hook/settingsi.php' );
115
-require_once( dirname( __FILE__ ) . 'hook/validator/exception.php' );
116
-require_once( dirname( __FILE__ ) . 'hooks.php' );
117
-require_once( dirname( __FILE__ ) . 'query/builder/db/mysql.php' );
118
-require_once( dirname( __FILE__ ) . 'spec.php' );
119
-require_once( dirname( __FILE__ ) . 'specedi.php' );
13
+require_once(dirname(__FILE__).'app.php');
14
+require_once(dirname(__FILE__).'app/registry.php');
15
+require_once(dirname(__FILE__).'class/autoloader.php');
16
+require_once(dirname(__FILE__).'class/registry.php');
17
+require_once(dirname(__FILE__).'class/registry/children.php');
18
+require_once(dirname(__FILE__).'class/registry/childreni.php');
19
+require_once(dirname(__FILE__).'class/registry/persistent.php');
20
+require_once(dirname(__FILE__).'class/registryi.php');
21
+require_once(dirname(__FILE__).'data/type.php');
22
+require_once(dirname(__FILE__).'data/type/integer.php');
23
+require_once(dirname(__FILE__).'data/type/text.php');
24
+require_once(dirname(__FILE__).'data/typei.php');
25
+require_once(dirname(__FILE__).'db/query.php');
26
+require_once(dirname(__FILE__).'entity.php');
27
+require_once(dirname(__FILE__).'entity/array.php');
28
+require_once(dirname(__FILE__).'entity/attr.php');
29
+require_once(dirname(__FILE__).'entity/attr/field.php');
30
+require_once(dirname(__FILE__).'entity/childi.php');
31
+require_once(dirname(__FILE__).'entity/comment.php');
32
+require_once(dirname(__FILE__).'entity/comment/author.php');
33
+require_once(dirname(__FILE__).'entity/comment/post.php');
34
+require_once(dirname(__FILE__).'entity/context.php');
35
+require_once(dirname(__FILE__).'entity/context/network.php');
36
+require_once(dirname(__FILE__).'entity/context/site.php');
37
+require_once(dirname(__FILE__).'entity/enumerablei.php');
38
+require_once(dirname(__FILE__).'entity/hierarchy.php');
39
+require_once(dirname(__FILE__).'entity/hierarchyi.php');
40
+require_once(dirname(__FILE__).'entity/parenti.php');
41
+require_once(dirname(__FILE__).'entity/post.php');
42
+require_once(dirname(__FILE__).'entity/post/author.php');
43
+require_once(dirname(__FILE__).'entity/post/content.php');
44
+require_once(dirname(__FILE__).'entity/post/terms.php');
45
+require_once(dirname(__FILE__).'entity/post/type.php');
46
+require_once(dirname(__FILE__).'entity/post/type/name.php');
47
+require_once(dirname(__FILE__).'entity/post/type/relationship.php');
48
+require_once(dirname(__FILE__).'entity/relationship.php');
49
+require_once(dirname(__FILE__).'entity/relationship/dynamic.php');
50
+require_once(dirname(__FILE__).'entity/relationship/stored/field.php');
51
+require_once(dirname(__FILE__).'entity/restricted/visibilityi.php');
52
+require_once(dirname(__FILE__).'entity/site.php');
53
+require_once(dirname(__FILE__).'entity/stored/array.php');
54
+require_once(dirname(__FILE__).'entity/stored/db/table.php');
55
+require_once(dirname(__FILE__).'entity/term.php');
56
+require_once(dirname(__FILE__).'entity/term/id.php');
57
+require_once(dirname(__FILE__).'entity/user.php');
58
+require_once(dirname(__FILE__).'entity/user/role.php');
59
+require_once(dirname(__FILE__).'entity/user/role/name.php');
60
+require_once(dirname(__FILE__).'entity/user/roles.php');
61
+require_once(dirname(__FILE__).'entityish.php');
62
+require_once(dirname(__FILE__).'entityish/storedi.php');
63
+require_once(dirname(__FILE__).'entityishi.php');
64
+require_once(dirname(__FILE__).'hierarchy.php');
65
+require_once(dirname(__FILE__).'hook/action.php');
66
+require_once(dirname(__FILE__).'hook/action/comment/new.php');
67
+require_once(dirname(__FILE__).'hook/action/post/publish.php');
68
+require_once(dirname(__FILE__).'hook/actioni.php');
69
+require_once(dirname(__FILE__).'hook/actions.php');
70
+require_once(dirname(__FILE__).'hook/arg.php');
71
+require_once(dirname(__FILE__).'hook/arg/current/post.php');
72
+require_once(dirname(__FILE__).'hook/arg/current/site.php');
73
+require_once(dirname(__FILE__).'hook/arg/current/user.php');
74
+require_once(dirname(__FILE__).'hook/arg/dynamic.php');
75
+require_once(dirname(__FILE__).'hook/condition.php');
76
+require_once(dirname(__FILE__).'hook/condition/entity/array/contains.php');
77
+require_once(dirname(__FILE__).'hook/condition/equals.php');
78
+require_once(dirname(__FILE__).'hook/condition/string/contains.php');
79
+require_once(dirname(__FILE__).'hook/conditioni.php');
80
+require_once(dirname(__FILE__).'hook/event.php');
81
+require_once(dirname(__FILE__).'hook/event/args.php');
82
+require_once(dirname(__FILE__).'hook/event/comment/leave.php');
83
+require_once(dirname(__FILE__).'hook/event/dynamic.php');
84
+require_once(dirname(__FILE__).'hook/event/media/upload.php');
85
+require_once(dirname(__FILE__).'hook/event/post/publish.php');
86
+require_once(dirname(__FILE__).'hook/event/user/register.php');
87
+require_once(dirname(__FILE__).'hook/event/user/visit.php');
88
+require_once(dirname(__FILE__).'hook/eventi.php');
89
+require_once(dirname(__FILE__).'hook/events.php');
90
+require_once(dirname(__FILE__).'hook/extension.php');
91
+require_once(dirname(__FILE__).'hook/extension/blocker.php');
92
+require_once(dirname(__FILE__).'hook/extension/conditions.php');
93
+require_once(dirname(__FILE__).'hook/extension/periods.php');
94
+require_once(dirname(__FILE__).'hook/fire.php');
95
+require_once(dirname(__FILE__).'hook/hit/logger.php');
96
+require_once(dirname(__FILE__).'hook/hit/query.php');
97
+require_once(dirname(__FILE__).'hook/reaction.php');
98
+require_once(dirname(__FILE__).'hook/reaction/options.php');
99
+require_once(dirname(__FILE__).'hook/reaction/store.php');
100
+require_once(dirname(__FILE__).'hook/reaction/store/options.php');
101
+require_once(dirname(__FILE__).'hook/reaction/store/options/network.php');
102
+require_once(dirname(__FILE__).'hook/reaction/storei.php');
103
+require_once(dirname(__FILE__).'hook/reaction/validator.php');
104
+require_once(dirname(__FILE__).'hook/reactioni.php');
105
+require_once(dirname(__FILE__).'hook/reactor.php');
106
+require_once(dirname(__FILE__).'hook/reactor/points.php');
107
+require_once(dirname(__FILE__).'hook/retroactive/conditions.php');
108
+require_once(dirname(__FILE__).'hook/retroactive/query.php');
109
+require_once(dirname(__FILE__).'hook/retroactive/query/modifieri.php');
110
+require_once(dirname(__FILE__).'hook/retroactive/queryable.php');
111
+require_once(dirname(__FILE__).'hook/retroactive/queryi.php');
112
+require_once(dirname(__FILE__).'hook/router.php');
113
+require_once(dirname(__FILE__).'hook/settings.php');
114
+require_once(dirname(__FILE__).'hook/settingsi.php');
115
+require_once(dirname(__FILE__).'hook/validator/exception.php');
116
+require_once(dirname(__FILE__).'hooks.php');
117
+require_once(dirname(__FILE__).'query/builder/db/mysql.php');
118
+require_once(dirname(__FILE__).'spec.php');
119
+require_once(dirname(__FILE__).'specedi.php');
120 120
 // }
121 121
 
122 122
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/reaction.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,18 +35,18 @@  discard block
 block discarded – undo
35 35
 	/**
36 36
 	 * @since 1.0.0
37 37
 	 */
38
-	public function __construct( $id, WordPoints_Hook_Reaction_StoreI $store ) {
38
+	public function __construct($id, WordPoints_Hook_Reaction_StoreI $store) {
39 39
 
40
-		$this->ID    = wordpoints_int( $id );
40
+		$this->ID    = wordpoints_int($id);
41 41
 		$this->store = $store;
42 42
 	}
43 43
 
44 44
 	/**
45 45
 	 * @since 1.0.0
46 46
 	 */
47
-	public function __get( $var ) {
47
+	public function __get($var) {
48 48
 
49
-		if ( 'ID' === $var ) {
49
+		if ('ID' === $var) {
50 50
 			return $this->ID;
51 51
 		}
52 52
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @since 1.0.0
70 70
 	 */
71 71
 	public function get_reactor_slug() {
72
-		return $this->get_meta( 'reactor' ); // TODO remove this method?
72
+		return $this->get_meta('reactor'); // TODO remove this method?
73 73
 	}
74 74
 
75 75
 	/**
Please login to merge, or discard this patch.