Completed
Push — master ( 975fd1...3e68e7 )
by J.D.
03:16
created
src/includes/classes/wpdb/wrapper.php 2 patches
Doc Comments   +20 added lines patch added patch discarded remove patch
@@ -73,12 +73,28 @@  discard block
 block discarded – undo
73 73
 
74 74
 
75 75
 interface WordPoints_WPDB_Query_Data {
76
+
77
+	/**
78
+	 * @return string
79
+	 */
76 80
 	public function get_table_name();
81
+
82
+	/**
83
+	 * @return void
84
+	 */
77 85
 	public function get_where_clause();
78 86
 }
79 87
 
80 88
 interface WordPoints_MySQL_Query_Parser_SimpleI {
89
+
90
+	/**
91
+	 * @return void
92
+	 */
81 93
 	public function get_table_name();
94
+
95
+	/**
96
+	 * @return string
97
+	 */
82 98
 	public function get_where_clause();
83 99
 }
84 100
 
@@ -164,6 +180,10 @@  discard block
 block discarded – undo
164 180
 }
165 181
 
166 182
 interface WordPoints_WPDB_Query_WrapperI {
183
+
184
+	/**
185
+	 * @return void
186
+	 */
167 187
 	public function __construct( $slug, $args, $wpdb );
168 188
 	public function execute();
169 189
 
Please login to merge, or discard this patch.
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -11,60 +11,60 @@  discard block
 block discarded – undo
11 11
 
12 12
 	protected $wpdb;
13 13
 
14
-	public function __construct( $wpdb ) {
14
+	public function __construct($wpdb) {
15 15
 		$this->wpdb = $wpdb;
16 16
 	}
17 17
 
18
-	public function __get( $name ) {
18
+	public function __get($name) {
19 19
 		return $this->wpdb->$name;
20 20
 	}
21 21
 
22
-	public function __set( $name, $value ) {
22
+	public function __set($name, $value) {
23 23
 		$this->wpdb->$name = $value;
24 24
 	}
25 25
 
26
-	public function __isset( $name ) {
27
-		return isset( $this->wpdb->$name );
26
+	public function __isset($name) {
27
+		return isset($this->wpdb->$name);
28 28
 	}
29 29
 
30
-	public function __unset( $name ) {
31
-		unset( $this->wpdb->$name );
30
+	public function __unset($name) {
31
+		unset($this->wpdb->$name);
32 32
 	}
33 33
 
34
-	public function __call( $name, $arguments ) {
34
+	public function __call($name, $arguments) {
35 35
 
36
-		$wrappers = wordpoints_apps()->get_sub_app( 'wpdb_wrappers' );
37
-		$slugs = $wrappers->get_child_slugs( $name );
36
+		$wrappers = wordpoints_apps()->get_sub_app('wpdb_wrappers');
37
+		$slugs = $wrappers->get_child_slugs($name);
38 38
 		$should_listen = $query = false;
39 39
 
40 40
 
41
-		switch ( $name ) {
41
+		switch ($name) {
42 42
 
43 43
 			case 'insert':
44 44
 //			case 'replace':
45
-				$query = new WordPoints_WPDB_Query_Data_Array( $this->args[0] );
45
+				$query = new WordPoints_WPDB_Query_Data_Array($this->args[0]);
46 46
 			break;
47 47
 
48 48
 			case 'update':
49
-				$query =  new WordPoints_WPDB_Query_Data_Array( $this->args[0], $this->args[2] );
49
+				$query = new WordPoints_WPDB_Query_Data_Array($this->args[0], $this->args[2]);
50 50
 			break;
51 51
 
52 52
 			case 'delete':
53
-				$query =  new WordPoints_WPDB_Query_Data_Array( $this->args[0], $this->args[1] );
53
+				$query = new WordPoints_WPDB_Query_Data_Array($this->args[0], $this->args[1]);
54 54
 			break;
55 55
 
56 56
 			case 'query':
57
-				$query =  new WordPoints_WPDB_Query_Data_SQL( $this->args[0] );
57
+				$query = new WordPoints_WPDB_Query_Data_SQL($this->args[0]);
58 58
 			break;
59 59
 		}
60 60
 
61
-		if ( $query ) {
61
+		if ($query) {
62 62
 			/** @var WordPoints_WPDB_Query_WrapperI $wrapper */
63
-			$wrapper = $wrappers->get( $name, $query );
63
+			$wrapper = $wrappers->get($name, $query);
64 64
 
65 65
 			$result = $wrapper->execute();
66 66
 		} else {
67
-			$result = call_user_func_array( array( $this->wpdb, $name ), $arguments );
67
+			$result = call_user_func_array(array($this->wpdb, $name), $arguments);
68 68
 		}
69 69
 
70 70
 		return $result;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 class WordPoints_MySQL_Query_Parser_Simple_Insert implements WordPoints_MySQL_Query_Parser_SimpleI {
86 86
 
87
-	public function __construct( $sql ) {
87
+	public function __construct($sql) {
88 88
 		$this->sql = $sql;
89 89
 	}
90 90
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		// columns will not be needed. then the other code can decide what to do.
100 100
 		// although I guess sense we have the tablel name we could reun the query
101 101
 		// ourselves if we need/want to.
102
-		if ( stripos( $this->sql, 'ON DUPLICATE KEY UPDATE' ) ) {
102
+		if (stripos($this->sql, 'ON DUPLICATE KEY UPDATE')) {
103 103
 
104 104
 		}
105 105
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	protected $parser;
121 121
 
122
-	public function __construct( $sql ) {
122
+	public function __construct($sql) {
123 123
 		$this->sql = $sql;
124 124
 		$this->parser = $this->get_parser();
125 125
 	}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		// of query it is.
131 131
 		// maybe the parser will actually be passed in, and the query type deterimed
132 132
 		// by teh method wrapper.
133
-		$parser = new WordPoints_MySQL_Query_Parser_Simple_Insert( $this->sql );
133
+		$parser = new WordPoints_MySQL_Query_Parser_Simple_Insert($this->sql);
134 134
 		// maybe we don't even need to parse.
135 135
 		return $parser;
136 136
 	}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	protected $table_name;
150 150
 	protected $where_data;
151 151
 
152
-	public function __construct( $table_name, $where_data = array() ) {
152
+	public function __construct($table_name, $where_data = array()) {
153 153
 		$this->table_name = $table_name;
154 154
 		$this->where_data = $where_data;
155 155
 	}
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 }
165 165
 
166 166
 interface WordPoints_WPDB_Query_WrapperI {
167
-	public function __construct( $slug, $args, $wpdb );
167
+	public function __construct($slug, $args, $wpdb);
168 168
 	public function execute();
169 169
 
170 170
 }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	protected $result;
186 186
 	protected $backed_up_wpdb_vars;
187 187
 
188
-	public function __construct( $slug, $args, $wpdb ) {
188
+	public function __construct($slug, $args, $wpdb) {
189 189
 		$this->slug = $slug;
190 190
 		$this->args = $args;
191 191
 		$this->wpdb = $wpdb;
@@ -194,20 +194,20 @@  discard block
 block discarded – undo
194 194
 
195 195
 	protected function get_query_data() {
196 196
 
197
-		switch ( $this->slug ) {
197
+		switch ($this->slug) {
198 198
 
199 199
 			case 'insert':
200 200
 				//			case 'replace':
201
-				return new WordPoints_WPDB_Query_Data_Array( $this->args[0] );
201
+				return new WordPoints_WPDB_Query_Data_Array($this->args[0]);
202 202
 
203 203
 			case 'update':
204
-				return new WordPoints_WPDB_Query_Data_Array( $this->args[0], $this->args[2] );
204
+				return new WordPoints_WPDB_Query_Data_Array($this->args[0], $this->args[2]);
205 205
 
206 206
 			case 'delete':
207
-				return new WordPoints_WPDB_Query_Data_Array( $this->args[0], $this->args[1] );
207
+				return new WordPoints_WPDB_Query_Data_Array($this->args[0], $this->args[1]);
208 208
 
209 209
 			case 'query':
210
-				return new WordPoints_WPDB_Query_Data_SQL( $this->args[0] );
210
+				return new WordPoints_WPDB_Query_Data_SQL($this->args[0]);
211 211
 		}
212 212
 
213 213
 		return false;
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
 
218 218
 		$should_listen = $this->should_listen();
219 219
 
220
-		if ( $should_listen ) {
220
+		if ($should_listen) {
221 221
 			$this->before_query();
222 222
 		}
223 223
 
224
-		$this->result = call_user_func_array( array( $this->wpdb, $this->slug ), $this->args );
224
+		$this->result = call_user_func_array(array($this->wpdb, $this->slug), $this->args);
225 225
 
226
-		if ( $should_listen && $this->was_successful_query() ) {
226
+		if ($should_listen && $this->was_successful_query()) {
227 227
 			$this->backup_wpdb_vars();
228 228
 			$this->after_query();
229 229
 			$this->restore_wpdb_vars();
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 
253 253
 		// we could check for the availableility of eahc valu here in case of dropins
254 254
 		// or they become not available in the future.
255
-		foreach ( $to_backup as $property ) {
256
-			$this->backed_up_wpdb_vars[ $property ] = $this->wpdb->$property;
255
+		foreach ($to_backup as $property) {
256
+			$this->backed_up_wpdb_vars[$property] = $this->wpdb->$property;
257 257
 		}
258 258
 	}
259 259
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 		// with the backed up result.
264 264
 		$this->wpdb->flush();
265 265
 
266
-		foreach ( $this->backed_up_wpdb_vars as $property => $value ) {
266
+		foreach ($this->backed_up_wpdb_vars as $property => $value) {
267 267
 			$this->wpdb->$property = $value;
268 268
 		}
269 269
 	}
@@ -301,18 +301,18 @@  discard block
 block discarded – undo
301 301
 	 */
302 302
 	protected function is_entity_table() {
303 303
 
304
-		$this->entity = 'new entity object' . $this->data->get_table_name();
304
+		$this->entity = 'new entity object'.$this->data->get_table_name();
305 305
 
306 306
 		return true;
307 307
 	}
308 308
 
309 309
 	public function should_listen() {
310 310
 
311
-		if ( ! $this->data ) {
311
+		if ( ! $this->data) {
312 312
 			return false;
313 313
 		}
314 314
 
315
-		if ( $this->is_entity_table() ) {
315
+		if ($this->is_entity_table()) {
316 316
 			return false;
317 317
 		}
318 318
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	}
321 321
 
322 322
 	protected function was_successful_query() {
323
-		return (bool) wordpoints_posint( $not_by_ref = $this->wpdb->num_rows );
323
+		return (bool) wordpoints_posint($not_by_ref = $this->wpdb->num_rows);
324 324
 	}
325 325
 }
326 326
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	protected $args;
331 331
 	protected $wpdb;
332 332
 
333
-	public function __construct( $slug, $args, $wpdb ) {
333
+	public function __construct($slug, $args, $wpdb) {
334 334
 		$this->slug = $slug;
335 335
 		$this->args = $args;
336 336
 		$this->wpdb = $wpdb;
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
 		// check if this is a query that we want to listen to.
342 342
 		// if so, call execute on a particular child.
343 343
 		// otherwise, just call execute.
344
-		if ( $this->get_query_type() ) {
344
+		if ($this->get_query_type()) {
345 345
 
346 346
 		} else {
347
-			$result = call_user_func_array( array( $this->wpdb, $this->slug ), $this->args );
347
+			$result = call_user_func_array(array($this->wpdb, $this->slug), $this->args);
348 348
 		}
349 349
 
350 350
 		return $result;
@@ -369,15 +369,15 @@  discard block
 block discarded – undo
369 369
 
370 370
 		$ids = $this->get_entity_ids();
371 371
 
372
-		$this->entities = new WordPoints_Entity_Array( $this->entity->get_slug() );
373
-		$this->entities->set_the_value( $ids );
372
+		$this->entities = new WordPoints_Entity_Array($this->entity->get_slug());
373
+		$this->entities->set_the_value($ids);
374 374
 	}
375 375
 
376 376
 	protected function get_entity_ids() {
377 377
 		$where = $this->data->get_where_clause();
378
-		$id_field = wordpoints_escape_mysql_identifier( $this->entity->get_id_field() );
379
-		$table_name = wordpoints_escape_mysql_identifier( $this->data->get_table_name() );
380
-		return $this->wpdb->get_col( "SELECT {$id_field} FROM {$table_name} {$where}" );
378
+		$id_field = wordpoints_escape_mysql_identifier($this->entity->get_id_field());
379
+		$table_name = wordpoints_escape_mysql_identifier($this->data->get_table_name());
380
+		return $this->wpdb->get_col("SELECT {$id_field} FROM {$table_name} {$where}");
381 381
 	}
382 382
 
383 383
 	protected function after_query() {
@@ -396,13 +396,13 @@  discard block
 block discarded – undo
396 396
 		$where_clause = $this->data->get_where_clause();
397 397
 
398 398
 		// get a before snapshot, if any matching are found.
399
-		if ( $where_clause ) {
399
+		if ($where_clause) {
400 400
 
401 401
 		}
402 402
 	}
403 403
 
404 404
 	protected function after_query() {
405
-		$this->entity->set_the_value( $this->wpdb->insert_id );
405
+		$this->entity->set_the_value($this->wpdb->insert_id);
406 406
 		// I guess we invoke the api to run the action now?
407 407
 		$this->trigger_entity_create_actions();
408 408
 	}
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 
414 414
 	protected function after_query() {
415 415
 		// I guess we invoke the api to run the action now?
416
-		$this->trigger_entity_delete_actions( $this->entities );
416
+		$this->trigger_entity_delete_actions($this->entities);
417 417
 	}
418 418
 }
419 419
 
Please login to merge, or discard this patch.
src/includes/classes/hook/extension/repeat/blocker.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,22 +22,22 @@
 block discarded – undo
22 22
 	/**
23 23
 	 * @since 1.0.0
24 24
 	 */
25
-	protected function validate_action_type_settings( $settings ) {
25
+	protected function validate_action_type_settings($settings) {
26 26
 		return (bool) $settings;
27 27
 	}
28 28
 
29 29
 	/**
30 30
 	 * @since 1.0.0
31 31
 	 */
32
-	public function should_hit( WordPoints_Hook_Fire $fire ) {
32
+	public function should_hit(WordPoints_Hook_Fire $fire) {
33 33
 
34
-		$block_repeats = (bool) $this->get_settings_from_fire( $fire );
34
+		$block_repeats = (bool) $this->get_settings_from_fire($fire);
35 35
 
36
-		if ( ! $block_repeats ) {
36
+		if ( ! $block_repeats) {
37 37
 			return true;
38 38
 		}
39 39
 
40
-		if ( $fire->get_matching_hits_query()->count() > 0 ) {
40
+		if ($fire->get_matching_hits_query()->count() > 0) {
41 41
 			return false;
42 42
 		}
43 43
 
Please login to merge, or discard this patch.
src/includes/classes/hook/extension/reversals.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -32,36 +32,36 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @since 1.0.0
34 34
 	 */
35
-	public function should_hit( WordPoints_Hook_Fire $fire ) {
35
+	public function should_hit(WordPoints_Hook_Fire $fire) {
36 36
 
37
-		if ( ! $this->get_settings_from_fire( $fire ) ) {
37
+		if ( ! $this->get_settings_from_fire($fire)) {
38 38
 			return true;
39 39
 		}
40 40
 
41
-		$ids = $this->get_hits_to_be_reversed( $fire );
41
+		$ids = $this->get_hits_to_be_reversed($fire);
42 42
 
43
-		return count( $ids ) > 0;
43
+		return count($ids) > 0;
44 44
 	}
45 45
 
46 46
 	/**
47 47
 	 * @since 1.0.0
48 48
 	 */
49
-	public function after_hit( WordPoints_Hook_Fire $fire ) {
49
+	public function after_hit(WordPoints_Hook_Fire $fire) {
50 50
 
51
-		if ( ! $this->get_settings_from_fire( $fire ) ) {
51
+		if ( ! $this->get_settings_from_fire($fire)) {
52 52
 			return;
53 53
 		}
54 54
 
55
-		foreach ( $this->get_hits_to_be_reversed( $fire ) as $id ) {
56
-			add_metadata( 'wordpoints_hook_hit', $id, 'reverse_fired', true );
55
+		foreach ($this->get_hits_to_be_reversed($fire) as $id) {
56
+			add_metadata('wordpoints_hook_hit', $id, 'reverse_fired', true);
57 57
 		}
58 58
 	}
59 59
 
60 60
 	/**
61 61
 	 * @since 1.0.0
62 62
 	 */
63
-	public function after_miss( WordPoints_Hook_Fire $fire ) {
64
-		$this->after_hit( $fire );
63
+	public function after_miss(WordPoints_Hook_Fire $fire) {
64
+		$this->after_hit($fire);
65 65
 	}
66 66
 
67 67
 	/**
@@ -73,12 +73,12 @@  discard block
 block discarded – undo
73 73
 	 *
74 74
 	 * @return array The ids the hits to be reversed.
75 75
 	 */
76
-	protected function get_hits_to_be_reversed( WordPoints_Hook_Fire $fire ) {
76
+	protected function get_hits_to_be_reversed(WordPoints_Hook_Fire $fire) {
77 77
 
78 78
 		// We cache these so that we don't run the query both before and after the
79 79
 		// fire.
80
-		if ( isset( $fire->data[ $this->slug ]['hit_ids'] ) ) {
81
-			return $fire->data[ $this->slug ]['hit_ids'];
80
+		if (isset($fire->data[$this->slug]['hit_ids'])) {
81
+			return $fire->data[$this->slug]['hit_ids'];
82 82
 		}
83 83
 
84 84
 		$query = $fire->get_matching_hits_query();
@@ -86,19 +86,19 @@  discard block
 block discarded – undo
86 86
 		$query->set_args(
87 87
 			array(
88 88
 				'fields'       => 'id',
89
-				'action_type'  => $this->get_settings_from_fire( $fire ),
89
+				'action_type'  => $this->get_settings_from_fire($fire),
90 90
 				'meta_key'     => 'reverse_fired',
91 91
 				'meta_compare' => 'NOT EXISTS',
92 92
 			)
93 93
 		);
94 94
 
95
-		$ids = $query->get( 'col' );
95
+		$ids = $query->get('col');
96 96
 
97
-		if ( ! $ids ) {
97
+		if ( ! $ids) {
98 98
 			$ids = array();
99 99
 		}
100 100
 
101
-		$fire->data[ $this->slug ]['hit_ids'] = $ids;
101
+		$fire->data[$this->slug]['hit_ids'] = $ids;
102 102
 
103 103
 		return $ids;
104 104
 	}
Please login to merge, or discard this patch.
src/includes/classes/hook/extension/hit/listeneri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	 *
22 22
 	 * @param WordPoints_Hook_Fire $fire The hook fire object.
23 23
 	 */
24
-	public function after_hit( WordPoints_Hook_Fire $fire );
24
+	public function after_hit(WordPoints_Hook_Fire $fire);
25 25
 }
26 26
 
27 27
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/reactor/points/legacy.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 		array $settings
28 28
 	) {
29 29
 
30
-		if ( isset( $settings['legacy_log_type'] ) ) {
30
+		if (isset($settings['legacy_log_type'])) {
31 31
 			$reaction->update_meta(
32 32
 				'legacy_log_type',
33 33
 				$settings['legacy_log_type']
34 34
 			);
35 35
 		}
36 36
 
37
-		parent::update_settings( $reaction, $settings );
37
+		parent::update_settings($reaction, $settings);
38 38
 	}
39 39
 
40 40
 	/**
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	/**
53 53
 	 * @since 1.0.0
54 54
 	 */
55
-	public function reverse_hit( WordPoints_Hook_Fire $fire ) {
55
+	public function reverse_hit(WordPoints_Hook_Fire $fire) {
56 56
 
57
-		if ( isset( $fire->data['reversals_legacy_points']['points_logs'] ) ) {
57
+		if (isset($fire->data['reversals_legacy_points']['points_logs'])) {
58 58
 
59 59
 			$this->reverse_logs(
60 60
 				$fire->data['reversals_legacy_points']['points_logs']
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
 			);
63 63
 
64 64
 		} else {
65
-			parent::reverse_hit( $fire );
65
+			parent::reverse_hit($fire);
66 66
 		}
67 67
 	}
68 68
 
69 69
 	/**
70 70
 	 * @since 1.0.0
71 71
 	 */
72
-	protected function get_hit_ids_to_be_reversed( WordPoints_Hook_Fire $fire ) {
72
+	protected function get_hit_ids_to_be_reversed(WordPoints_Hook_Fire $fire) {
73 73
 
74 74
 		// We closely integrate with the legacy reversals extension to get the IDs.
75
-		if ( ! isset( $fire->data['reversals_legacy_points']['hit_ids'] ) ) {
75
+		if ( ! isset($fire->data['reversals_legacy_points']['hit_ids'])) {
76 76
 			return array();
77 77
 		}
78 78
 
Please login to merge, or discard this patch.
src/includes/classes/hook/event/media/upload.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 */
22 22
 	public function get_title() {
23 23
 
24
-		return __( 'Upload Media', 'wordpoints' );
24
+		return __('Upload Media', 'wordpoints');
25 25
 	}
26 26
 
27 27
 	/**
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function get_description() {
31 31
 
32
-		return __( 'When a file is uploaded to the Media Library.', 'wordpoints' );
32
+		return __('When a file is uploaded to the Media Library.', 'wordpoints');
33 33
 	}
34 34
 
35 35
 	/**
36 36
 	 * @since 1.0.0
37 37
 	 */
38 38
 	public function get_reversal_text() {
39
-		return __( 'Media file deleted.', 'wordpoints' );
39
+		return __('Media file deleted.', 'wordpoints');
40 40
 	}
41 41
 }
42 42
 
Please login to merge, or discard this patch.
src/includes/classes/hook/event/user/register.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,21 +20,21 @@
 block discarded – undo
20 20
 	 * @since 1.0.0
21 21
 	 */
22 22
 	public function get_title() {
23
-		return __( 'Register', 'wordpoints' );
23
+		return __('Register', 'wordpoints');
24 24
 	}
25 25
 
26 26
 	/**
27 27
 	 * @since 1.0.0
28 28
 	 */
29 29
 	public function get_description() {
30
-		return __( 'Registering.', 'wordpoints' );
30
+		return __('Registering.', 'wordpoints');
31 31
 	}
32 32
 
33 33
 	/**
34 34
 	 * @since 1.0.0
35 35
 	 */
36 36
 	public function get_reversal_text() {
37
-		return __( 'User removed.', 'wordpoints' );
37
+		return __('User removed.', 'wordpoints');
38 38
 	}
39 39
 }
40 40
 
Please login to merge, or discard this patch.
src/includes/classes/hook/event/post/publish.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,20 +26,20 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function get_title() {
28 28
 
29
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
29
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
30 30
 
31
-		switch ( $parsed['dynamic'] ) {
31
+		switch ($parsed['dynamic']) {
32 32
 
33 33
 			case 'post':
34
-				return __( 'Publish Post', 'wordpoints' );
34
+				return __('Publish Post', 'wordpoints');
35 35
 
36 36
 			case 'page':
37
-				return __( 'Publish Page', 'wordpoints' );
37
+				return __('Publish Page', 'wordpoints');
38 38
 
39 39
 			default:
40 40
 				return sprintf(
41 41
 					// translators: singular name of the post type
42
-					__( 'Publish %s', 'wordpoints' )
42
+					__('Publish %s', 'wordpoints')
43 43
 					, $this->get_entity_title()
44 44
 				);
45 45
 		}
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function get_description() {
52 52
 
53
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
53
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
54 54
 
55
-		switch ( $parsed['dynamic'] ) {
55
+		switch ($parsed['dynamic']) {
56 56
 
57 57
 			case 'post':
58
-				return __( 'When a Post is published.', 'wordpoints' );
58
+				return __('When a Post is published.', 'wordpoints');
59 59
 
60 60
 			case 'page':
61
-				return __( 'When a Page is published.', 'wordpoints' );
61
+				return __('When a Page is published.', 'wordpoints');
62 62
 
63 63
 			default:
64 64
 				return sprintf(
65 65
 					// translators: singular name of the post type
66
-					__( 'When a %s is published.', 'wordpoints' )
66
+					__('When a %s is published.', 'wordpoints')
67 67
 					, $this->get_entity_title()
68 68
 				);
69 69
 		}
@@ -74,20 +74,20 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function get_reversal_text() {
76 76
 		
77
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
77
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
78 78
 
79
-		switch ( $parsed['dynamic'] ) {
79
+		switch ($parsed['dynamic']) {
80 80
 
81 81
 			case 'post':
82
-				return __( 'Post removed.', 'wordpoints' );
82
+				return __('Post removed.', 'wordpoints');
83 83
 
84 84
 			case 'page':
85
-				return __( 'Page removed.', 'wordpoints' );
85
+				return __('Page removed.', 'wordpoints');
86 86
 
87 87
 			default:
88 88
 				return sprintf(
89 89
 					// translators: singular name of the post type
90
-					_x( '%s removed.', 'post type', 'wordpoints' )
90
+					_x('%s removed.', 'post type', 'wordpoints')
91 91
 					, $this->get_entity_title()
92 92
 				);
93 93
 		}
Please login to merge, or discard this patch.
src/includes/classes/hook/event/comment/leave.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function get_title() {
28 28
 
29
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
29
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
30 30
 
31
-		switch ( $parsed['dynamic'] ) {
31
+		switch ($parsed['dynamic']) {
32 32
 
33 33
 			case 'post':
34
-				return __( 'Comment on a Post', 'wordpoints' );
34
+				return __('Comment on a Post', 'wordpoints');
35 35
 
36 36
 			case 'page':
37
-				return __( 'Comment on a Page', 'wordpoints' );
37
+				return __('Comment on a Page', 'wordpoints');
38 38
 
39 39
 			case 'attachment':
40
-				return __( 'Comment on a Media Upload', 'wordpoints' );
40
+				return __('Comment on a Media Upload', 'wordpoints');
41 41
 
42 42
 			default:
43 43
 				return sprintf(
44 44
 					// translators: singular name of the post type
45
-					__( 'Comment on a %s', 'wordpoints' )
45
+					__('Comment on a %s', 'wordpoints')
46 46
 					, $this->get_entity_title()
47 47
 				);
48 48
 		}
@@ -53,23 +53,23 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function get_description() {
55 55
 
56
-		$parsed = wordpoints_parse_dynamic_slug( $this->slug );
56
+		$parsed = wordpoints_parse_dynamic_slug($this->slug);
57 57
 
58
-		switch ( $parsed['dynamic'] ) {
58
+		switch ($parsed['dynamic']) {
59 59
 
60 60
 			case 'post':
61
-				return __( 'When a user leaves a comment on a Post.', 'wordpoints' );
61
+				return __('When a user leaves a comment on a Post.', 'wordpoints');
62 62
 
63 63
 			case 'page':
64
-				return __( 'When a user leaves a comment on a Page.', 'wordpoints' );
64
+				return __('When a user leaves a comment on a Page.', 'wordpoints');
65 65
 
66 66
 			case 'attachment':
67
-				return __( 'When a user leaves a comment on a file uploaded to the Media Library.', 'wordpoints' );
67
+				return __('When a user leaves a comment on a file uploaded to the Media Library.', 'wordpoints');
68 68
 
69 69
 			default:
70 70
 				return sprintf(
71 71
 					// translators: singular name of the post type
72
-					__( 'When a user leaves a comment on a %s.', 'wordpoints' )
72
+					__('When a user leaves a comment on a %s.', 'wordpoints')
73 73
 					, $this->get_entity_title()
74 74
 				);
75 75
 		}
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @since 1.0.0
80 80
 	 */
81 81
 	public function get_reversal_text() {
82
-		return __( 'Comment removed.', 'wordpoints' );
82
+		return __('Comment removed.', 'wordpoints');
83 83
 	}
84 84
 }
85 85
 
Please login to merge, or discard this patch.