Completed
Push — master ( 5b2818...3f335f )
by J.D.
03:35
created
src/includes/classes/hook/action.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
 	/**
67 67
 	 * @since 1.0.0
68 68
 	 */
69
-	public function __construct( $slug, array $action_args, array $args = array() ) {
69
+	public function __construct($slug, array $action_args, array $args = array()) {
70 70
 
71 71
 		$this->slug = $slug;
72 72
 		$this->args = $action_args;
73 73
 
74
-		if ( isset( $args['requirements'] ) ) {
74
+		if (isset($args['requirements'])) {
75 75
 			$this->requirements = $args['requirements'];
76 76
 		}
77 77
 
78
-		if ( isset( $args['arg_index'] ) ) {
78
+		if (isset($args['arg_index'])) {
79 79
 			$this->arg_index = $args['arg_index'];
80 80
 		}
81 81
 	}
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 	 */
93 93
 	public function should_fire() {
94 94
 
95
-		foreach ( $this->requirements as $arg => $value ) {
96
-			if ( ! isset( $this->args[ $arg ] ) || $this->args[ $arg ] !== $value ) {
95
+		foreach ($this->requirements as $arg => $value) {
96
+			if ( ! isset($this->args[$arg]) || $this->args[$arg] !== $value) {
97 97
 				return false;
98 98
 			}
99 99
 		}
@@ -104,19 +104,19 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * @since 1.0.0
106 106
 	 */
107
-	public function get_arg_value( $arg_slug ) {
107
+	public function get_arg_value($arg_slug) {
108 108
 
109
-		if ( ! isset( $this->arg_index[ $arg_slug ] ) ) {
109
+		if ( ! isset($this->arg_index[$arg_slug])) {
110 110
 			return null;
111 111
 		}
112 112
 
113
-		$index = $this->arg_index[ $arg_slug ];
113
+		$index = $this->arg_index[$arg_slug];
114 114
 
115
-		if ( ! isset( $this->args[ $index ] ) ) {
115
+		if ( ! isset($this->args[$index])) {
116 116
 			return null;
117 117
 		}
118 118
 
119
-		return $this->args[ $index ];
119
+		return $this->args[$index];
120 120
 	}
121 121
 }
122 122
 
Please login to merge, or discard this patch.
src/includes/classes/hook/arg/current/post.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 * @since 1.0.0
19 19
 	 */
20 20
 	public function get_title() {
21
-		return __( 'Current Post', 'wordpoints' ); // TODO better title?
21
+		return __('Current Post', 'wordpoints'); // TODO better title?
22 22
 	}
23 23
 
24 24
 	/**
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function get_value() {
28 28
 
29
-		if ( ! is_main_query() ) {
29
+		if ( ! is_main_query()) {
30 30
 			return false;
31 31
 		}
32 32
 
33 33
 		$object = get_queried_object();
34 34
 
35
-		if ( $object instanceof WP_Post ) {
35
+		if ($object instanceof WP_Post) {
36 36
 			return $object;
37 37
 		} else {
38 38
 			return false;
Please login to merge, or discard this patch.
src/includes/classes/hook/arg/current/user.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	 * @since 1.0.0
26 26
 	 */
27 27
 	public function get_title() {
28
-		return __( 'Visitor', 'wordpoints' );
28
+		return __('Visitor', 'wordpoints');
29 29
 	}
30 30
 }
31 31
 
Please login to merge, or discard this patch.
src/includes/classes/hook/condition/equals.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 * @since 1.0.0
19 19
 	 */
20 20
 	public function get_title() {
21
-		return __( 'Equals', 'wordpoints' );
21
+		return __('Equals', 'wordpoints');
22 22
 	}
23 23
 
24 24
 	/**
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		return array(
30 30
 			'value' => array(
31 31
 				'type' => 'text',
32
-				'label' => __( 'Equals', 'wordpoints' ), // TODO
32
+				'label' => __('Equals', 'wordpoints'), // TODO
33 33
 			),
34 34
 		);
35 35
 	}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	/**
38 38
 	 * @since 1.0.0
39 39
 	 */
40
-	public function is_met( array $settings, WordPoints_Hook_Event_Args $args ) {
40
+	public function is_met(array $settings, WordPoints_Hook_Event_Args $args) {
41 41
 
42 42
 		return $settings['value'] === $args->get_current()->get_the_value();
43 43
 	}
Please login to merge, or discard this patch.
src/includes/classes/hook/conditioni.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 	 *
65 65
 	 * @return bool Whether this condition is met.
66 66
 	 */
67
-	public function is_met( array $settings, WordPoints_Hook_Event_Args $args );
67
+	public function is_met(array $settings, WordPoints_Hook_Event_Args $args);
68 68
 }
69 69
 
70 70
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/event.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	/**
27 27
 	 * @since 1.0.0
28 28
 	 */
29
-	public function __construct( $slug ) {
29
+	public function __construct($slug) {
30 30
 
31 31
 		$this->slug = $slug;
32 32
 	}
Please login to merge, or discard this patch.
src/includes/classes/hook/event/user/visit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
 	 * @since 1.0.0
19 19
 	 */
20 20
 	public function get_title() {
21
-		return __( 'Visit', 'wordpoints' );
21
+		return __('Visit', 'wordpoints');
22 22
 	}
23 23
 
24 24
 	/**
25 25
 	 * @since 1.0.0
26 26
 	 */
27 27
 	public function get_description() {
28
-		return __( 'When a logged-in user or guest visits the site.', 'wordpoints' );
28
+		return __('When a logged-in user or guest visits the site.', 'wordpoints');
29 29
 	}
30 30
 }
31 31
 
Please login to merge, or discard this patch.
src/includes/classes/hook/retroactive/query/modifieri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 interface WordPoints_Hook_Retroactive_Query_ModifierI {
11
-	public function modify_retroactive_query( WordPoints_Hook_Retroactive_QueryI $query );
11
+	public function modify_retroactive_query(WordPoints_Hook_Retroactive_QueryI $query);
12 12
 }
13 13
 
14 14
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/retroactive/queryi.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 interface WordPoints_Hook_Retroactive_QueryI {
52 52
 
53
-	public function __construct( WordPoints_Hook_ReactionI $reaction );
53
+	public function __construct(WordPoints_Hook_ReactionI $reaction);
54 54
 
55 55
 	/**
56 56
 	 *
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 	public function get_reaction();
62 62
 	public function get_validator();
63 63
 
64
-	public function arg_hierarchy_push( $slug );
64
+	public function arg_hierarchy_push($slug);
65 65
 	public function arg_hierarchy_pop();
66 66
 	public function get_arg();
67 67
 
68
-	public function set_target( $target_arg );
68
+	public function set_target($target_arg);
69 69
 	public function select_value();
70
-	public function add_condition( array $condition );
70
+	public function add_condition(array $condition);
71 71
 
72 72
 	public function get_results();
73 73
 }
Please login to merge, or discard this patch.