Completed
Push — master ( 18e7f9...711d1c )
by J.D.
03:02
created
src/includes/classes/entity/user/roles.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
 	 * @since 1.0.0
34 34
 	 */
35 35
 	public function get_title() {
36
-		return __( 'Roles', 'wordpoints' );
36
+		return __('Roles', 'wordpoints');
37 37
 	}
38 38
 }
39 39
 
Please login to merge, or discard this patch.
src/includes/classes/entityish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param string $slug The slug of the entity/entity-child.
41 41
 	 */
42
-	public function __construct( $slug ) {
42
+	public function __construct($slug) {
43 43
 		$this->slug = $slug;
44 44
 	}
45 45
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	/**
61 61
 	 * @since 1.0.0
62 62
 	 */
63
-	public function set_the_value( $value ) {
63
+	public function set_the_value($value) {
64 64
 
65 65
 		$this->the_value = $value;
66 66
 
Please login to merge, or discard this patch.
src/includes/classes/entityishi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 	 *
61 61
 	 * @return bool Whether the value was set successfully.
62 62
 	 */
63
-	public function set_the_value( $value );
63
+	public function set_the_value($value);
64 64
 }
65 65
 
66 66
 // EOF
Please login to merge, or discard this patch.
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/action/comment/new.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,18 +17,18 @@
 block discarded – undo
17 17
 	/**
18 18
 	 * @since 1.0.0
19 19
 	 */
20
-	protected $arg_index = array( 1 => 'comment' );
20
+	protected $arg_index = array(1 => 'comment');
21 21
 
22 22
 	/**
23 23
 	 * @since 1.0.0
24 24
 	 */
25 25
 	public function should_fire() {
26 26
 
27
-		if ( ! isset( $this->args[1]->comment_approved ) ) {
27
+		if ( ! isset($this->args[1]->comment_approved)) {
28 28
 			return false;
29 29
 		}
30 30
 
31
-		if ( 1 !== (int) $this->args[1]->comment_approved ) {
31
+		if (1 !== (int) $this->args[1]->comment_approved) {
32 32
 			return false;
33 33
 		}
34 34
 
Please login to merge, or discard this patch.
src/includes/classes/hook/action/post/publish.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
 	 */
20 20
 	public function should_fire() {
21 21
 
22
-		$post = $this->get_arg_value( 'post' );
22
+		$post = $this->get_arg_value('post');
23 23
 
24
-		if ( ! isset( $post->post_type ) ) {
24
+		if ( ! isset($post->post_type)) {
25 25
 			return false;
26 26
 		}
27 27
 
28
-		$post_type = get_post_type_object( $post->post_type );
28
+		$post_type = get_post_type_object($post->post_type);
29 29
 
30 30
 		// Don't fire for non-public post types (revisions, etc.).
31
-		if ( empty( $post_type->public ) ) {
31
+		if (empty($post_type->public)) {
32 32
 			return false;
33 33
 		}
34 34
 
Please login to merge, or discard this patch.
src/includes/classes/hook/actioni.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @param array  $action_args The args the action was fired with.
27 27
 	 * @param array  $args        Other args.
28 28
 	 */
29
-	public function __construct( $slug, array $action_args, array $args = array() );
29
+	public function __construct($slug, array $action_args, array $args = array());
30 30
 
31 31
 	/**
32 32
 	 * Get the slug of this action.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 *
58 58
 	 * @return mixed The arg value.
59 59
 	 */
60
-	public function get_arg_value( $arg_slug );
60
+	public function get_arg_value($arg_slug);
61 61
 }
62 62
 
63 63
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/actions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,23 +40,23 @@  discard block
 block discarded – undo
40 40
 	 *
41 41
 	 * @return object|false The action object, or false if not found.
42 42
 	 */
43
-	public function get( $slug, array $action_args = array(), array $args = array() ) {
43
+	public function get($slug, array $action_args = array(), array $args = array()) {
44 44
 
45
-		if ( ! isset( $this->classes[ $slug ] ) ) {
45
+		if ( ! isset($this->classes[$slug])) {
46 46
 			return false;
47 47
 		}
48 48
 
49
-		return new $this->classes[ $slug ]( $slug, $action_args, $args );
49
+		return new $this->classes[$slug]($slug, $action_args, $args);
50 50
 	}
51 51
 
52 52
 	/**
53 53
 	 * @since 1.0.0
54 54
 	 */
55
-	public function register( $slug, $class, array $args = array() ) {
55
+	public function register($slug, $class, array $args = array()) {
56 56
 
57
-		parent::register( $slug, $class, $args );
57
+		parent::register($slug, $class, $args);
58 58
 
59
-		$this->router->add_action( $slug, $args );
59
+		$this->router->add_action($slug, $args);
60 60
 
61 61
 		return true;
62 62
 	}
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 	/**
65 65
 	 * @since 1.0.0
66 66
 	 */
67
-	public function deregister( $slug ) {
67
+	public function deregister($slug) {
68 68
 
69
-		parent::deregister( $slug );
69
+		parent::deregister($slug);
70 70
 
71
-		$this->router->remove_action( $slug );
71
+		$this->router->remove_action($slug);
72 72
 	}
73 73
 }
74 74
 
Please login to merge, or discard this patch.
src/includes/classes/hook/arg.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
 	 * @param string                  $slug   The arg slug.
62 62
 	 * @param WordPoints_Hook_ActionI $action The calling action's object.
63 63
 	 */
64
-	public function __construct( $slug, WordPoints_Hook_ActionI $action = null ) {
64
+	public function __construct($slug, WordPoints_Hook_ActionI $action = null) {
65 65
 
66 66
 		$this->slug = $slug;
67 67
 		$this->action = $action;
68 68
 
69
-		$parts = explode( ':', $slug, 2 );
69
+		$parts = explode(':', $slug, 2);
70 70
 
71
-		if ( isset( $parts[1] ) ) {
71
+		if (isset($parts[1])) {
72 72
 			$this->entity_slug = $parts[1];
73 73
 		} else {
74 74
 			$this->entity_slug = $slug;
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 			$this->get_entity_slug()
111 111
 		);
112 112
 
113
-		if ( $entity instanceof WordPoints_Entity ) {
114
-			$entity->set_the_value( $this->get_value() );
113
+		if ($entity instanceof WordPoints_Entity) {
114
+			$entity->set_the_value($this->get_value());
115 115
 		}
116 116
 
117 117
 		return $entity;
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 */
127 127
 	public function get_value() {
128 128
 
129
-		if ( $this->action instanceof WordPoints_Hook_ActionI ) {
130
-			return $this->action->get_arg_value( $this->slug );
129
+		if ($this->action instanceof WordPoints_Hook_ActionI) {
130
+			return $this->action->get_arg_value($this->slug);
131 131
 		} else {
132 132
 			return null;
133 133
 		}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 		$entity = $this->get_entity();
146 146
 
147
-		if ( ! $entity ) {
147
+		if ( ! $entity) {
148 148
 			return $this->slug;
149 149
 		}
150 150
 
Please login to merge, or discard this patch.