Completed
Push — master ( 18e7f9...711d1c )
by J.D.
03:02
created
src/includes/classes/hook/reactor/reversei.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 * @param string                     $event_slug The event slug.
23 23
 	 * @param WordPoints_Hook_Event_Args $event_args The event args.
24 24
 	 */
25
-	public function reverse_hits( $event_slug, WordPoints_Hook_Event_Args $event_args );
25
+	public function reverse_hits($event_slug, WordPoints_Hook_Event_Args $event_args);
26 26
 }
27 27
 
28 28
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/reactor/spami.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	 * @param string                     $event_slug The event slug.
23 23
 	 * @param WordPoints_Hook_Event_Args $event_args The event args.
24 24
 	 */
25
-	public function spam_hits( $event_slug, WordPoints_Hook_Event_Args $event_args );
25
+	public function spam_hits($event_slug, WordPoints_Hook_Event_Args $event_args);
26 26
 }
27 27
 
28 28
 // EOF
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.
src/includes/classes/hook/router.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 	/**
81 81
 	 * @since 1.0.0
82 82
 	 */
83
-	public function __call( $name, $args ) {
83
+	public function __call($name, $args) {
84 84
 
85
-		$this->route_action( $name, $args );
85
+		$this->route_action($name, $args);
86 86
 
87 87
 		// Return the first value, in case it is hooked to a filter.
88 88
 		$return = null;
89
-		if ( isset( $args[0] ) ) {
89
+		if (isset($args[0])) {
90 90
 			$return = $args[0];
91 91
 		}
92 92
 
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
 	 *                     action name and the priority.
104 104
 	 * @param array  $args The args the action was fired with.
105 105
 	 */
106
-	protected function route_action( $name, $args ) {
106
+	protected function route_action($name, $args) {
107 107
 
108
-		if ( ! isset( $this->action_index[ $name ] ) ) {
108
+		if ( ! isset($this->action_index[$name])) {
109 109
 			return;
110 110
 		}
111 111
 
112
-		if ( ! isset( $this->actions ) ) {
112
+		if ( ! isset($this->actions)) {
113 113
 
114 114
 			$hooks = wordpoints_hooks();
115 115
 
@@ -118,41 +118,41 @@  discard block
 block discarded – undo
118 118
 			$this->firers  = $hooks->firers;
119 119
 		}
120 120
 
121
-		foreach ( $this->action_index[ $name ]['actions'] as $slug => $data ) {
121
+		foreach ($this->action_index[$name]['actions'] as $slug => $data) {
122 122
 
123
-			if ( ! isset( $this->event_index[ $slug ] ) ) {
123
+			if ( ! isset($this->event_index[$slug])) {
124 124
 				continue;
125 125
 			}
126 126
 
127
-			$action_object = $this->actions->get( $slug, $args, $data );
127
+			$action_object = $this->actions->get($slug, $args, $data);
128 128
 
129
-			if ( ! ( $action_object instanceof WordPoints_Hook_ActionI ) ) {
129
+			if ( ! ($action_object instanceof WordPoints_Hook_ActionI)) {
130 130
 				continue;
131 131
 			}
132 132
 
133
-			if ( ! $action_object->should_fire() ) {
133
+			if ( ! $action_object->should_fire()) {
134 134
 				continue;
135 135
 			}
136 136
 
137
-			foreach ( $this->event_index[ $slug ] as $type => $events ) {
138
-				foreach ( $events as $event_slug => $unused ) {
137
+			foreach ($this->event_index[$slug] as $type => $events) {
138
+				foreach ($events as $event_slug => $unused) {
139 139
 
140
-					if ( ! $this->events->is_registered( $event_slug ) ) {
140
+					if ( ! $this->events->is_registered($event_slug)) {
141 141
 						continue;
142 142
 					}
143 143
 
144
-					$event_args = $this->events->args->get_children( $event_slug, array( $action_object ) );
144
+					$event_args = $this->events->args->get_children($event_slug, array($action_object));
145 145
 
146
-					if ( empty( $event_args ) ) {
146
+					if (empty($event_args)) {
147 147
 						continue;
148 148
 					}
149 149
 
150
-					$event_args = new WordPoints_Hook_Event_Args( $event_args );
150
+					$event_args = new WordPoints_Hook_Event_Args($event_args);
151 151
 
152
-					$firer = $this->firers->get( $type );
152
+					$firer = $this->firers->get($type);
153 153
 
154
-					if ( $firer instanceof WordPoints_Hook_FirerI ) {
155
-						$firer->do_event( $event_slug, $event_args );
154
+					if ($firer instanceof WordPoints_Hook_FirerI) {
155
+						$firer->do_event($event_slug, $event_args);
156 156
 					}
157 157
 				}
158 158
 			}
@@ -182,56 +182,56 @@  discard block
 block discarded – undo
182 182
 	 *        }
183 183
 	 * }
184 184
 	 */
185
-	public function add_action( $slug, array $args ) {
185
+	public function add_action($slug, array $args) {
186 186
 
187 187
 		$priority = 10;
188
-		if ( isset( $args['priority'] ) ) {
188
+		if (isset($args['priority'])) {
189 189
 			$priority = $args['priority'];
190 190
 		}
191 191
 
192
-		if ( ! isset( $args['action'] ) ) {
192
+		if ( ! isset($args['action'])) {
193 193
 			return;
194 194
 		}
195 195
 
196 196
 		$method = "{$args['action']},{$priority}";
197 197
 
198
-		$this->action_index[ $method ]['actions'][ $slug ] = array();
198
+		$this->action_index[$method]['actions'][$slug] = array();
199 199
 
200 200
 		$arg_number = 1;
201 201
 
202
-		if ( isset( $args['data'] ) ) {
202
+		if (isset($args['data'])) {
203 203
 
204
-			if ( isset( $args['data']['arg_index'] ) ) {
205
-				$arg_number = 1 + max( $args['data']['arg_index'] );
204
+			if (isset($args['data']['arg_index'])) {
205
+				$arg_number = 1 + max($args['data']['arg_index']);
206 206
 			}
207 207
 
208
-			if ( isset( $args['data']['requirements'] ) ) {
209
-				$requirements = 1 + max( array_keys( $args['data']['requirements'] ) );
208
+			if (isset($args['data']['requirements'])) {
209
+				$requirements = 1 + max(array_keys($args['data']['requirements']));
210 210
 
211
-				if ( $requirements > $arg_number ) {
211
+				if ($requirements > $arg_number) {
212 212
 					$arg_number = $requirements;
213 213
 				}
214 214
 			}
215 215
 
216
-			$this->action_index[ $method ]['actions'][ $slug ] = $args['data'];
216
+			$this->action_index[$method]['actions'][$slug] = $args['data'];
217 217
 		}
218 218
 
219
-		if ( isset( $args['arg_number'] ) ) {
219
+		if (isset($args['arg_number'])) {
220 220
 			$arg_number = $args['arg_number'];
221 221
 		}
222 222
 
223 223
 		// If this action is already being routed, and will have enough args, we
224 224
 		// don't need to hook to it again.
225 225
 		if (
226
-			isset( $this->action_index[ $method ]['arg_number'] )
227
-			&& $this->action_index[ $method ]['arg_number'] >= $arg_number
226
+			isset($this->action_index[$method]['arg_number'])
227
+			&& $this->action_index[$method]['arg_number'] >= $arg_number
228 228
 		) {
229 229
 			return;
230 230
 		}
231 231
 
232
-		$this->action_index[ $method ]['arg_number'] = $arg_number;
232
+		$this->action_index[$method]['arg_number'] = $arg_number;
233 233
 
234
-		add_action( $args['action'], array( $this, $method ), $priority, $arg_number );
234
+		add_action($args['action'], array($this, $method), $priority, $arg_number);
235 235
 	}
236 236
 
237 237
 	/**
@@ -241,20 +241,20 @@  discard block
 block discarded – undo
241 241
 	 *
242 242
 	 * @param string $slug The action slug.
243 243
 	 */
244
-	public function remove_action( $slug ) {
244
+	public function remove_action($slug) {
245 245
 
246
-		foreach ( $this->action_index as $method => $data ) {
247
-			if ( isset( $data['actions'][ $slug ] ) ) {
246
+		foreach ($this->action_index as $method => $data) {
247
+			if (isset($data['actions'][$slug])) {
248 248
 
249
-				unset( $this->action_index[ $method ]['actions'][ $slug ] );
249
+				unset($this->action_index[$method]['actions'][$slug]);
250 250
 
251
-				if ( empty( $this->action_index[ $method ]['actions'] ) ) {
251
+				if (empty($this->action_index[$method]['actions'])) {
252 252
 
253
-					unset( $this->action_index[ $method ] );
253
+					unset($this->action_index[$method]);
254 254
 
255
-					list( $action, $priority ) = explode( ',', $method );
255
+					list($action, $priority) = explode(',', $method);
256 256
 
257
-					remove_action( $action, array( $this, $method ), $priority );
257
+					remove_action($action, array($this, $method), $priority);
258 258
 				}
259 259
 			}
260 260
 		}
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
 	 * @param string $action_slug The slug of the action.
270 270
 	 * @param string $action_type The type of action. Default is 'fire'.
271 271
 	 */
272
-	public function add_event_to_action( $event_slug, $action_slug, $action_type = 'fire' ) {
273
-		$this->event_index[ $action_slug ][ $action_type ][ $event_slug ] = true;
272
+	public function add_event_to_action($event_slug, $action_slug, $action_type = 'fire') {
273
+		$this->event_index[$action_slug][$action_type][$event_slug] = true;
274 274
 	}
275 275
 
276 276
 	/**
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
 	 * @param string $action_slug The slug of the action.
283 283
 	 * @param string $action_type The type of action. Default is 'fire'.
284 284
 	 */
285
-	public function remove_event_from_action( $event_slug, $action_slug, $action_type = 'fire' ) {
286
-		unset( $this->event_index[ $action_slug ][ $action_type ][ $event_slug ] );
285
+	public function remove_event_from_action($event_slug, $action_slug, $action_type = 'fire') {
286
+		unset($this->event_index[$action_slug][$action_type][$event_slug]);
287 287
 	}
288 288
 }
289 289
 
Please login to merge, or discard this patch.
src/includes/classes/hooks.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 	protected function init() {
47 47
 
48 48
 		$sub_apps = $this->sub_apps;
49
-		$sub_apps->register( 'router', 'WordPoints_Hook_Router' );
50
-		$sub_apps->register( 'actions', 'WordPoints_Hook_Actions' );
51
-		$sub_apps->register( 'events', 'WordPoints_Hook_Events' );
52
-		$sub_apps->register( 'firers', 'WordPoints_Class_Registry_Persistent' );
53
-		$sub_apps->register( 'reactors', 'WordPoints_Class_Registry_Persistent' );
54
-		$sub_apps->register( 'extensions', 'WordPoints_Class_Registry_Persistent' );
55
-		$sub_apps->register( 'conditions', 'WordPoints_Class_Registry_Children' );
49
+		$sub_apps->register('router', 'WordPoints_Hook_Router');
50
+		$sub_apps->register('actions', 'WordPoints_Hook_Actions');
51
+		$sub_apps->register('events', 'WordPoints_Hook_Events');
52
+		$sub_apps->register('firers', 'WordPoints_Class_Registry_Persistent');
53
+		$sub_apps->register('reactors', 'WordPoints_Class_Registry_Persistent');
54
+		$sub_apps->register('extensions', 'WordPoints_Class_Registry_Persistent');
55
+		$sub_apps->register('conditions', 'WordPoints_Class_Registry_Children');
56 56
 
57 57
 		parent::init();
58 58
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @param bool $on Whether network-wide mode should be on (or off).
77 77
 	 */
78
-	public function set_network_mode( $on = true ) {
78
+	public function set_network_mode($on = true) {
79 79
 		$this->network_mode = (bool) $on;
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
src/includes/classes/index.php 1 patch
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -10,103 +10,103 @@
 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__ ) . 'entity.php' );
26
-require_once( dirname( __FILE__ ) . 'entity/array.php' );
27
-require_once( dirname( __FILE__ ) . 'entity/attr.php' );
28
-require_once( dirname( __FILE__ ) . 'entity/childi.php' );
29
-require_once( dirname( __FILE__ ) . 'entity/comment.php' );
30
-require_once( dirname( __FILE__ ) . 'entity/comment/author.php' );
31
-require_once( dirname( __FILE__ ) . 'entity/comment/post.php' );
32
-require_once( dirname( __FILE__ ) . 'entity/enumerablei.php' );
33
-require_once( dirname( __FILE__ ) . 'entity/hierarchy.php' );
34
-require_once( dirname( __FILE__ ) . 'entity/hierarchyi.php' );
35
-require_once( dirname( __FILE__ ) . 'entity/parenti.php' );
36
-require_once( dirname( __FILE__ ) . 'entity/post.php' );
37
-require_once( dirname( __FILE__ ) . 'entity/post/author.php' );
38
-require_once( dirname( __FILE__ ) . 'entity/post/content.php' );
39
-require_once( dirname( __FILE__ ) . 'entity/post/terms.php' );
40
-require_once( dirname( __FILE__ ) . 'entity/post/type.php' );
41
-require_once( dirname( __FILE__ ) . 'entity/post/type/name.php' );
42
-require_once( dirname( __FILE__ ) . 'entity/post/type/relationship.php' );
43
-require_once( dirname( __FILE__ ) . 'entity/relationship.php' );
44
-require_once( dirname( __FILE__ ) . 'entity/restricted/visibilityi.php' );
45
-require_once( dirname( __FILE__ ) . 'entity/site.php' );
46
-require_once( dirname( __FILE__ ) . 'entity/term.php' );
47
-require_once( dirname( __FILE__ ) . 'entity/term/id.php' );
48
-require_once( dirname( __FILE__ ) . 'entity/user.php' );
49
-require_once( dirname( __FILE__ ) . 'entity/user/role.php' );
50
-require_once( dirname( __FILE__ ) . 'entity/user/role/name.php' );
51
-require_once( dirname( __FILE__ ) . 'entity/user/roles.php' );
52
-require_once( dirname( __FILE__ ) . 'entityish.php' );
53
-require_once( dirname( __FILE__ ) . 'entityishi.php' );
54
-require_once( dirname( __FILE__ ) . 'hierarchy.php' );
55
-require_once( dirname( __FILE__ ) . 'hook/action.php' );
56
-require_once( dirname( __FILE__ ) . 'hook/action/comment/new.php' );
57
-require_once( dirname( __FILE__ ) . 'hook/action/post/publish.php' );
58
-require_once( dirname( __FILE__ ) . 'hook/actioni.php' );
59
-require_once( dirname( __FILE__ ) . 'hook/actions.php' );
60
-require_once( dirname( __FILE__ ) . 'hook/arg.php' );
61
-require_once( dirname( __FILE__ ) . 'hook/arg/current/post.php' );
62
-require_once( dirname( __FILE__ ) . 'hook/arg/current/user.php' );
63
-require_once( dirname( __FILE__ ) . 'hook/condition.php' );
64
-require_once( dirname( __FILE__ ) . 'hook/condition/entity/array/contains.php' );
65
-require_once( dirname( __FILE__ ) . 'hook/condition/equals.php' );
66
-require_once( dirname( __FILE__ ) . 'hook/condition/string/contains.php' );
67
-require_once( dirname( __FILE__ ) . 'hook/conditioni.php' );
68
-require_once( dirname( __FILE__ ) . 'hook/event.php' );
69
-require_once( dirname( __FILE__ ) . 'hook/event/args.php' );
70
-require_once( dirname( __FILE__ ) . 'hook/event/comment/leave.php' );
71
-require_once( dirname( __FILE__ ) . 'hook/event/post/publish.php' );
72
-require_once( dirname( __FILE__ ) . 'hook/event/user/register.php' );
73
-require_once( dirname( __FILE__ ) . 'hook/event/user/visit.php' );
74
-require_once( dirname( __FILE__ ) . 'hook/eventi.php' );
75
-require_once( dirname( __FILE__ ) . 'hook/events.php' );
76
-require_once( dirname( __FILE__ ) . 'hook/extension.php' );
77
-require_once( dirname( __FILE__ ) . 'hook/extension/conditions.php' );
78
-require_once( dirname( __FILE__ ) . 'hook/extension/periods.php' );
79
-require_once( dirname( __FILE__ ) . 'hook/extension/reversei.php' );
80
-require_once( dirname( __FILE__ ) . 'hook/extension/spami.php' );
81
-require_once( dirname( __FILE__ ) . 'hook/firer.php' );
82
-require_once( dirname( __FILE__ ) . 'hook/firer/reverse.php' );
83
-require_once( dirname( __FILE__ ) . 'hook/firer/spam.php' );
84
-require_once( dirname( __FILE__ ) . 'hook/fireri.php' );
85
-require_once( dirname( __FILE__ ) . 'hook/reaction.php' );
86
-require_once( dirname( __FILE__ ) . 'hook/reaction/options.php' );
87
-require_once( dirname( __FILE__ ) . 'hook/reaction/storage.php' );
88
-require_once( dirname( __FILE__ ) . 'hook/reaction/storage/options.php' );
89
-require_once( dirname( __FILE__ ) . 'hook/reaction/storage/options/network.php' );
90
-require_once( dirname( __FILE__ ) . 'hook/reaction/storagei.php' );
91
-require_once( dirname( __FILE__ ) . 'hook/reaction/validator.php' );
92
-require_once( dirname( __FILE__ ) . 'hook/reactioni.php' );
93
-require_once( dirname( __FILE__ ) . 'hook/reactor.php' );
94
-require_once( dirname( __FILE__ ) . 'hook/reactor/points.php' );
95
-require_once( dirname( __FILE__ ) . 'hook/reactor/reversei.php' );
96
-require_once( dirname( __FILE__ ) . 'hook/reactor/spami.php' );
97
-require_once( dirname( __FILE__ ) . 'hook/retroactive/conditions.php' );
98
-require_once( dirname( __FILE__ ) . 'hook/retroactive/query.php' );
99
-require_once( dirname( __FILE__ ) . 'hook/retroactive/query/modifieri.php' );
100
-require_once( dirname( __FILE__ ) . 'hook/retroactive/queryable.php' );
101
-require_once( dirname( __FILE__ ) . 'hook/retroactive/queryi.php' );
102
-require_once( dirname( __FILE__ ) . 'hook/router.php' );
103
-require_once( dirname( __FILE__ ) . 'hook/settings.php' );
104
-require_once( dirname( __FILE__ ) . 'hook/settingsi.php' );
105
-require_once( dirname( __FILE__ ) . 'hook/validator/exception.php' );
106
-require_once( dirname( __FILE__ ) . 'hooks.php' );
107
-require_once( dirname( __FILE__ ) . 'query/builder/db/mysql.php' );
108
-require_once( dirname( __FILE__ ) . 'spec.php' );
109
-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__).'entity.php');
26
+require_once(dirname(__FILE__).'entity/array.php');
27
+require_once(dirname(__FILE__).'entity/attr.php');
28
+require_once(dirname(__FILE__).'entity/childi.php');
29
+require_once(dirname(__FILE__).'entity/comment.php');
30
+require_once(dirname(__FILE__).'entity/comment/author.php');
31
+require_once(dirname(__FILE__).'entity/comment/post.php');
32
+require_once(dirname(__FILE__).'entity/enumerablei.php');
33
+require_once(dirname(__FILE__).'entity/hierarchy.php');
34
+require_once(dirname(__FILE__).'entity/hierarchyi.php');
35
+require_once(dirname(__FILE__).'entity/parenti.php');
36
+require_once(dirname(__FILE__).'entity/post.php');
37
+require_once(dirname(__FILE__).'entity/post/author.php');
38
+require_once(dirname(__FILE__).'entity/post/content.php');
39
+require_once(dirname(__FILE__).'entity/post/terms.php');
40
+require_once(dirname(__FILE__).'entity/post/type.php');
41
+require_once(dirname(__FILE__).'entity/post/type/name.php');
42
+require_once(dirname(__FILE__).'entity/post/type/relationship.php');
43
+require_once(dirname(__FILE__).'entity/relationship.php');
44
+require_once(dirname(__FILE__).'entity/restricted/visibilityi.php');
45
+require_once(dirname(__FILE__).'entity/site.php');
46
+require_once(dirname(__FILE__).'entity/term.php');
47
+require_once(dirname(__FILE__).'entity/term/id.php');
48
+require_once(dirname(__FILE__).'entity/user.php');
49
+require_once(dirname(__FILE__).'entity/user/role.php');
50
+require_once(dirname(__FILE__).'entity/user/role/name.php');
51
+require_once(dirname(__FILE__).'entity/user/roles.php');
52
+require_once(dirname(__FILE__).'entityish.php');
53
+require_once(dirname(__FILE__).'entityishi.php');
54
+require_once(dirname(__FILE__).'hierarchy.php');
55
+require_once(dirname(__FILE__).'hook/action.php');
56
+require_once(dirname(__FILE__).'hook/action/comment/new.php');
57
+require_once(dirname(__FILE__).'hook/action/post/publish.php');
58
+require_once(dirname(__FILE__).'hook/actioni.php');
59
+require_once(dirname(__FILE__).'hook/actions.php');
60
+require_once(dirname(__FILE__).'hook/arg.php');
61
+require_once(dirname(__FILE__).'hook/arg/current/post.php');
62
+require_once(dirname(__FILE__).'hook/arg/current/user.php');
63
+require_once(dirname(__FILE__).'hook/condition.php');
64
+require_once(dirname(__FILE__).'hook/condition/entity/array/contains.php');
65
+require_once(dirname(__FILE__).'hook/condition/equals.php');
66
+require_once(dirname(__FILE__).'hook/condition/string/contains.php');
67
+require_once(dirname(__FILE__).'hook/conditioni.php');
68
+require_once(dirname(__FILE__).'hook/event.php');
69
+require_once(dirname(__FILE__).'hook/event/args.php');
70
+require_once(dirname(__FILE__).'hook/event/comment/leave.php');
71
+require_once(dirname(__FILE__).'hook/event/post/publish.php');
72
+require_once(dirname(__FILE__).'hook/event/user/register.php');
73
+require_once(dirname(__FILE__).'hook/event/user/visit.php');
74
+require_once(dirname(__FILE__).'hook/eventi.php');
75
+require_once(dirname(__FILE__).'hook/events.php');
76
+require_once(dirname(__FILE__).'hook/extension.php');
77
+require_once(dirname(__FILE__).'hook/extension/conditions.php');
78
+require_once(dirname(__FILE__).'hook/extension/periods.php');
79
+require_once(dirname(__FILE__).'hook/extension/reversei.php');
80
+require_once(dirname(__FILE__).'hook/extension/spami.php');
81
+require_once(dirname(__FILE__).'hook/firer.php');
82
+require_once(dirname(__FILE__).'hook/firer/reverse.php');
83
+require_once(dirname(__FILE__).'hook/firer/spam.php');
84
+require_once(dirname(__FILE__).'hook/fireri.php');
85
+require_once(dirname(__FILE__).'hook/reaction.php');
86
+require_once(dirname(__FILE__).'hook/reaction/options.php');
87
+require_once(dirname(__FILE__).'hook/reaction/storage.php');
88
+require_once(dirname(__FILE__).'hook/reaction/storage/options.php');
89
+require_once(dirname(__FILE__).'hook/reaction/storage/options/network.php');
90
+require_once(dirname(__FILE__).'hook/reaction/storagei.php');
91
+require_once(dirname(__FILE__).'hook/reaction/validator.php');
92
+require_once(dirname(__FILE__).'hook/reactioni.php');
93
+require_once(dirname(__FILE__).'hook/reactor.php');
94
+require_once(dirname(__FILE__).'hook/reactor/points.php');
95
+require_once(dirname(__FILE__).'hook/reactor/reversei.php');
96
+require_once(dirname(__FILE__).'hook/reactor/spami.php');
97
+require_once(dirname(__FILE__).'hook/retroactive/conditions.php');
98
+require_once(dirname(__FILE__).'hook/retroactive/query.php');
99
+require_once(dirname(__FILE__).'hook/retroactive/query/modifieri.php');
100
+require_once(dirname(__FILE__).'hook/retroactive/queryable.php');
101
+require_once(dirname(__FILE__).'hook/retroactive/queryi.php');
102
+require_once(dirname(__FILE__).'hook/router.php');
103
+require_once(dirname(__FILE__).'hook/settings.php');
104
+require_once(dirname(__FILE__).'hook/settingsi.php');
105
+require_once(dirname(__FILE__).'hook/validator/exception.php');
106
+require_once(dirname(__FILE__).'hooks.php');
107
+require_once(dirname(__FILE__).'query/builder/db/mysql.php');
108
+require_once(dirname(__FILE__).'spec.php');
109
+require_once(dirname(__FILE__).'specedi.php');
110 110
 // }
111 111
 
112 112
 // EOF
Please login to merge, or discard this patch.
src/includes/constants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,6 +9,6 @@
 block discarded – undo
9 9
 
10 10
 global $wpdb;
11 11
 
12
-$wpdb->wordpoints_hook_periods = $wpdb->base_prefix . 'wordpoints_hook_periods';
12
+$wpdb->wordpoints_hook_periods = $wpdb->base_prefix.'wordpoints_hook_periods';
13 13
 
14 14
 // EOF
Please login to merge, or discard this patch.
src/includes/functions.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 
159 159
 	$actions->register(
160 160
 		'user_register'
161
-	    , 'WordPoints_Hook_Action'
161
+		, 'WordPoints_Hook_Action'
162 162
 		, array(
163 163
 			'action' => 'user_register',
164 164
 			'data'   => array(
Please login to merge, or discard this patch.
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
  *
34 34
  * @param WordPoints_Class_Registry_Persistent $reactors The reactors registry.
35 35
  */
36
-function wordpoints_hook_reactors_init( $reactors ) {
36
+function wordpoints_hook_reactors_init($reactors) {
37 37
 
38
-	$reactors->register( 'points', 'WordPoints_Hook_Reactor_Points' );
38
+	$reactors->register('points', 'WordPoints_Hook_Reactor_Points');
39 39
 }
40 40
 
41 41
 /**
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
  *
48 48
  * @param WordPoints_Class_Registry_Persistent $extensions The extension registry.
49 49
  */
50
-function wordpoints_hook_extension_init( $extensions ) {
50
+function wordpoints_hook_extension_init($extensions) {
51 51
 
52
-	$extensions->register( 'conditions', 'WordPoints_Hook_Extension_Conditions' );
53
-	$extensions->register( 'periods', 'WordPoints_Hook_Extension_Periods' );
52
+	$extensions->register('conditions', 'WordPoints_Hook_Extension_Conditions');
53
+	$extensions->register('periods', 'WordPoints_Hook_Extension_Periods');
54 54
 }
55 55
 
56 56
 /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
  *
63 63
  * @param WordPoints_Class_Registry_Children $conditions The conditions registry.
64 64
  */
65
-function wordpoints_hook_conditions_init( $conditions ) {
65
+function wordpoints_hook_conditions_init($conditions) {
66 66
 
67 67
 	$conditions->register(
68 68
 		'text'
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
  *
99 99
  * @param WordPoints_Hook_Actions $actions The action registry.
100 100
  */
101
-function wordpoints_hook_actions_init( $actions ) {
101
+function wordpoints_hook_actions_init($actions) {
102 102
 
103 103
 	$actions->register(
104 104
 		'comment_approve'
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 		, array(
107 107
 			'action' => 'transition_comment_status',
108 108
 			'data'   => array(
109
-				'arg_index'    => array( 'comment' => 2 ),
110
-				'requirements' => array( 0 => 'approved' ),
109
+				'arg_index'    => array('comment' => 2),
110
+				'requirements' => array(0 => 'approved'),
111 111
 			),
112 112
 		)
113 113
 	);
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 		, array(
128 128
 			'action' => 'transition_comment_status',
129 129
 			'data'   => array(
130
-				'arg_index' => array( 'comment' => 2 ),
131
-				'requirements' => array( 1 => 'approved' ),
130
+				'arg_index' => array('comment' => 2),
131
+				'requirements' => array(1 => 'approved'),
132 132
 			),
133 133
 		)
134 134
 	);
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
 		, array(
140 140
 			'action' => 'transition_post_status',
141 141
 			'data'   => array(
142
-				'arg_index' => array( 'post' => 2 ),
143
-				'requirements' => array( 0 => 'publish' ),
142
+				'arg_index' => array('post' => 2),
143
+				'requirements' => array(0 => 'publish'),
144 144
 			),
145 145
 		)
146 146
 	);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 		, array(
152 152
 			'action' => 'post_delete',
153 153
 			'data'   => array(
154
-				'arg_index' => array( 'post' => 0 ),
154
+				'arg_index' => array('post' => 0),
155 155
 			),
156 156
 		)
157 157
 	);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		, array(
163 163
 			'action' => 'user_register',
164 164
 			'data'   => array(
165
-				'arg_index' => array( 'user' => 0 ),
165
+				'arg_index' => array('user' => 0),
166 166
 			),
167 167
 		)
168 168
 	);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 		, array(
174 174
 			'action' => is_multisite() ? 'wpmu_delete_user' : 'delete_user',
175 175
 			'data'   => array(
176
-				'arg_index' => array( 'user' => 0 ),
176
+				'arg_index' => array('user' => 0),
177 177
 			),
178 178
 		)
179 179
 	);
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
  *
197 197
  * @param WordPoints_Hook_Events $events The event registry.
198 198
  */
199
-function wordpoints_hook_events_init( $events ) {
199
+function wordpoints_hook_events_init($events) {
200 200
 
201 201
 	$events->register(
202 202
 		'comment_leave'
203 203
 		, 'WordPoints_Hook_Event_Comment_Leave'
204 204
 		, array(
205 205
 			'actions' => array(
206
-				'fire' => array( 'comment_approve', 'comment_new' ),
206
+				'fire' => array('comment_approve', 'comment_new'),
207 207
 				'reverse' => 'comment_deapprove',
208 208
 				'spam' => 'comment_spam',
209 209
 			),
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		)
255 255
 	);
256 256
 
257
-	if ( is_multisite() ) {
257
+	if (is_multisite()) {
258 258
 
259 259
 		// TODO network hooks
260 260
 		$events->args->register(
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
  *
275 275
  * @param WordPoints_Class_Registry_Persistent $firers The firer registry.
276 276
  */
277
-function wordpoints_hook_firers_init( $firers ) {
277
+function wordpoints_hook_firers_init($firers) {
278 278
 
279
-	$firers->register( 'fire', 'WordPoints_Hook_Firer' );
280
-	$firers->register( 'reverse', 'WordPoints_Hook_Firer_Reverse' );
281
-	$firers->register( 'spam', 'WordPoints_Hook_Firer_Spam' );
279
+	$firers->register('fire', 'WordPoints_Hook_Firer');
280
+	$firers->register('reverse', 'WordPoints_Hook_Firer_Reverse');
281
+	$firers->register('spam', 'WordPoints_Hook_Firer_Spam');
282 282
 }
283 283
 
284 284
 /**
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
  *
291 291
  * @param WordPoints_App_Registry $entities The entities app.
292 292
  */
293
-function wordpoints_entities_app_init( $entities ) {
293
+function wordpoints_entities_app_init($entities) {
294 294
 
295
-	$entities->sub_apps->register( 'children', 'WordPoints_Class_Registry_Children' );
295
+	$entities->sub_apps->register('children', 'WordPoints_Class_Registry_Children');
296 296
 }
297 297
 
298 298
 /**
@@ -304,18 +304,18 @@  discard block
 block discarded – undo
304 304
  *
305 305
  * @param WordPoints_App_Registry $entities The entities app.
306 306
  */
307
-function wordpoints_entities_init( $entities ) {
307
+function wordpoints_entities_init($entities) {
308 308
 
309 309
 	//
310 310
 	// Entities.
311 311
 	//
312 312
 
313
-	$entities->register( 'post', 'WordPoints_Entity_Post' );
314
-	$entities->register( 'post_type', 'WordPoints_Entity_Post_Type' );
315
-	$entities->register( 'comment', 'WordPoints_Entity_Comment' );
316
-	$entities->register( 'user', 'WordPoints_Entity_User' );
317
-	$entities->register( 'user_role', 'WordPoints_Entity_User_Role' );
318
-	$entities->register( 'term', 'WordPoints_Entity_Term' );
313
+	$entities->register('post', 'WordPoints_Entity_Post');
314
+	$entities->register('post_type', 'WordPoints_Entity_Post_Type');
315
+	$entities->register('comment', 'WordPoints_Entity_Comment');
316
+	$entities->register('user', 'WordPoints_Entity_User');
317
+	$entities->register('user_role', 'WordPoints_Entity_User_Role');
318
+	$entities->register('term', 'WordPoints_Entity_Term');
319 319
 
320 320
 	//
321 321
 	// Attributes.
@@ -323,10 +323,10 @@  discard block
 block discarded – undo
323 323
 
324 324
 	$atts = $entities->children;
325 325
 
326
-	$atts->register( 'post', 'content', 'WordPoints_Entity_Post_Content' );
327
-	$atts->register( 'post_type', 'name', 'WordPoints_Entity_Post_Type_Name' );
328
-	$atts->register( 'term', 'id', 'WordPoints_Entity_Term_Id' );
329
-	$atts->register( 'user_role', 'name', 'WordPoints_Entity_User_Role_Name' );
326
+	$atts->register('post', 'content', 'WordPoints_Entity_Post_Content');
327
+	$atts->register('post_type', 'name', 'WordPoints_Entity_Post_Type_Name');
328
+	$atts->register('term', 'id', 'WordPoints_Entity_Term_Id');
329
+	$atts->register('user_role', 'name', 'WordPoints_Entity_User_Role_Name');
330 330
 
331 331
 	//
332 332
 	// Relationships.
@@ -334,15 +334,15 @@  discard block
 block discarded – undo
334 334
 
335 335
 	$children = $entities->children;
336 336
 
337
-	$children->register( 'post', 'author', 'WordPoints_Entity_Post_Author' );
338
-	$children->register( 'post', 'type', 'WordPoints_Entity_Post_Type_Relationship' );
339
-	$children->register( 'post', 'terms', 'WordPoints_Entity_Post_Terms' );
340
-	$children->register( 'user', 'roles', 'WordPoints_Entity_User_Roles' );
341
-	$children->register( 'comment', 'post', 'WordPoints_Entity_Comment_Post' );
342
-	$children->register( 'comment', 'author', 'WordPoints_Entity_Comment_Author' );
337
+	$children->register('post', 'author', 'WordPoints_Entity_Post_Author');
338
+	$children->register('post', 'type', 'WordPoints_Entity_Post_Type_Relationship');
339
+	$children->register('post', 'terms', 'WordPoints_Entity_Post_Terms');
340
+	$children->register('user', 'roles', 'WordPoints_Entity_User_Roles');
341
+	$children->register('comment', 'post', 'WordPoints_Entity_Comment_Post');
342
+	$children->register('comment', 'author', 'WordPoints_Entity_Comment_Author');
343 343
 
344
-	foreach ( get_post_types( array( 'public' => true ), false ) as $slug => $post_type ) {
345
-		unset( $post_type ); // TODO
344
+	foreach (get_post_types(array('public' => true), false) as $slug => $post_type) {
345
+		unset($post_type); // TODO
346 346
 	}
347 347
 }
348 348
 
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
  *
356 356
  * @param WordPoints_Class_RegistryI $data_types The data types registry.
357 357
  */
358
-function wordpoints_data_types_init( $data_types ) {
358
+function wordpoints_data_types_init($data_types) {
359 359
 
360
-	$data_types->register( 'integer', 'WordPoints_Data_Type_Integer' );
361
-	$data_types->register( 'text', 'WordPoints_Data_Type_Text' );
360
+	$data_types->register('integer', 'WordPoints_Data_Type_Integer');
361
+	$data_types->register('text', 'WordPoints_Data_Type_Text');
362 362
 }
363 363
 
364 364
 /**
@@ -373,9 +373,9 @@  discard block
 block discarded – undo
373 373
  *
374 374
  * @return bool Whether the user can view the points log.
375 375
  */
376
-function wordpoints_hooks_user_can_view_points_log( $can_view, $log ) {
376
+function wordpoints_hooks_user_can_view_points_log($can_view, $log) {
377 377
 
378
-	if ( ! $can_view ) {
378
+	if ( ! $can_view) {
379 379
 		return $can_view;
380 380
 	}
381 381
 
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 	$event_slug = $log->log_type;
385 385
 
386 386
 	/** @var WordPoints_Hook_Arg $arg */
387
-	foreach ( wordpoints_hooks()->events->args->get_children( $event_slug ) as $slug => $arg ) {
387
+	foreach (wordpoints_hooks()->events->args->get_children($event_slug) as $slug => $arg) {
388 388
 
389
-		$value = wordpoints_get_points_log_meta( $log->id, $slug, true );
389
+		$value = wordpoints_get_points_log_meta($log->id, $slug, true);
390 390
 
391
-		if ( ! $value ) {
391
+		if ( ! $value) {
392 392
 			continue;
393 393
 		}
394 394
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 			, $value
399 399
 		);
400 400
 
401
-		if ( ! $can_view ) {
401
+		if ( ! $can_view) {
402 402
 			break;
403 403
 		}
404 404
 	}
@@ -417,20 +417,20 @@  discard block
 block discarded – undo
417 417
  *
418 418
  * @return bool Whether the user can view this entity.
419 419
  */
420
-function wordpoints_entity_user_can_view( $user_id, $entity_slug, $entity_id ) {
420
+function wordpoints_entity_user_can_view($user_id, $entity_slug, $entity_id) {
421 421
 
422
-	$entity = wordpoints_entities()->get( $entity_slug );
422
+	$entity = wordpoints_entities()->get($entity_slug);
423 423
 
424 424
 	// If this entity type is not found, we have no way of determining whether it is
425 425
 	// safe for the user to view it.
426
-	if ( ! ( $entity instanceof WordPoints_Entity ) ) {
426
+	if ( ! ($entity instanceof WordPoints_Entity)) {
427 427
 		return false;
428 428
 	}
429 429
 
430 430
 	$can_view = true;
431 431
 
432
-	if ( $entity instanceof WordPoints_Entity_Restricted_VisibilityI ) {
433
-		$can_view = $entity->user_can_view( $user_id, $entity_id );
432
+	if ($entity instanceof WordPoints_Entity_Restricted_VisibilityI) {
433
+		$can_view = $entity->user_can_view($user_id, $entity_id);
434 434
 	}
435 435
 
436 436
 	/**
@@ -461,8 +461,8 @@  discard block
 block discarded – undo
461 461
  */
462 462
 function wordpoints_apps() {
463 463
 
464
-	if ( ! isset( WordPoints_App::$main ) ) {
465
-		WordPoints_App::$main = new WordPoints_App( 'apps' );
464
+	if ( ! isset(WordPoints_App::$main)) {
465
+		WordPoints_App::$main = new WordPoints_App('apps');
466 466
 	}
467 467
 
468 468
 	return WordPoints_App::$main;
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
  */
478 478
 function wordpoints_hooks() {
479 479
 
480
-	if ( ! isset( WordPoints_App::$main ) ) {
480
+	if ( ! isset(WordPoints_App::$main)) {
481 481
 		wordpoints_apps();
482 482
 	}
483 483
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
  */
494 494
 function wordpoints_entities() {
495 495
 
496
-	if ( ! isset( WordPoints_App::$main ) ) {
496
+	if ( ! isset(WordPoints_App::$main)) {
497 497
 		wordpoints_apps();
498 498
 	}
499 499
 
@@ -509,13 +509,13 @@  discard block
 block discarded – undo
509 509
  *
510 510
  * @param WordPoints_App $app The main apps app.
511 511
  */
512
-function wordpoints_apps_init( $app ) {
512
+function wordpoints_apps_init($app) {
513 513
 
514 514
 	$apps = $app->sub_apps;
515 515
 
516
-	$apps->register( 'hooks', 'WordPoints_Hooks' );
517
-	$apps->register( 'entities', 'WordPoints_App_Registry' );
518
-	$apps->register( 'data_types', 'WordPoints_Class_Registry' );
516
+	$apps->register('hooks', 'WordPoints_Hooks');
517
+	$apps->register('entities', 'WordPoints_App_Registry');
518
+	$apps->register('data_types', 'WordPoints_Class_Registry');
519 519
 }
520 520
 
521 521
 /**
@@ -528,19 +528,19 @@  discard block
 block discarded – undo
528 528
  *
529 529
  * @return object|false The constructed object, or false if to many args were passed.
530 530
  */
531
-function wordpoints_construct_class_with_args( $class_name, array $args ) {
531
+function wordpoints_construct_class_with_args($class_name, array $args) {
532 532
 
533
-	switch ( count( $args ) ) {
533
+	switch (count($args)) {
534 534
 		case 0:
535 535
 			return new $class_name();
536 536
 		case 1:
537
-			return new $class_name( $args[0] );
537
+			return new $class_name($args[0]);
538 538
 		case 2:
539
-			return new $class_name( $args[0], $args[1] );
539
+			return new $class_name($args[0], $args[1]);
540 540
 		case 3:
541
-			return new $class_name( $args[0], $args[1], $args[2] );
541
+			return new $class_name($args[0], $args[1], $args[2]);
542 542
 		case 4:
543
-			return new $class_name( $args[0], $args[1], $args[2], $args[3] );
543
+			return new $class_name($args[0], $args[1], $args[2], $args[3]);
544 544
 		default:
545 545
 			return false;
546 546
 	}
Please login to merge, or discard this patch.