Completed
Push — master ( 775e03...ea7c62 )
by J.D.
03:03
created
src/includes/classes/hook/reaction/store/options/network.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,29 +22,29 @@
 block discarded – undo
22 22
 	/**
23 23
 	 * @since 1.0.0
24 24
 	 */
25
-	public function get_option( $name ) {
26
-		return get_site_option( $name );
25
+	public function get_option($name) {
26
+		return get_site_option($name);
27 27
 	}
28 28
 
29 29
 	/**
30 30
 	 * @since 1.0.0
31 31
 	 */
32
-	protected function add_option( $name, $value ) {
33
-		return add_site_option( $name, $value );
32
+	protected function add_option($name, $value) {
33
+		return add_site_option($name, $value);
34 34
 	}
35 35
 
36 36
 	/**
37 37
 	 * @since 1.0.0
38 38
 	 */
39
-	public function update_option( $name, $value ) {
40
-		return update_site_option( $name, $value );
39
+	public function update_option($name, $value) {
40
+		return update_site_option($name, $value);
41 41
 	}
42 42
 
43 43
 	/**
44 44
 	 * @since 1.0.0
45 45
 	 */
46
-	protected function delete_option( $name ) {
47
-		return delete_site_option( $name );
46
+	protected function delete_option($name) {
47
+		return delete_site_option($name);
48 48
 	}
49 49
 }
50 50
 
Please login to merge, or discard this patch.
src/includes/classes/hook/reaction/storei.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param string                  $slug    The slug of this storage group.
26 26
 	 * @param WordPoints_Hook_Reactor $reactor The reactor the reactions belong to.
27 27
 	 */
28
-	public function __construct( $slug, WordPoints_Hook_Reactor $reactor );
28
+	public function __construct($slug, WordPoints_Hook_Reactor $reactor);
29 29
 
30 30
 	/**
31 31
 	 * Get the slug of this reaction storage group.
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 *
70 70
 	 * @return bool Whether the reaction exists.
71 71
 	 */
72
-	public function reaction_exists( $id );
72
+	public function reaction_exists($id);
73 73
 
74 74
 	/**
75 75
 	 * Get an reaction object.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 *
81 81
 	 * @return WordPoints_Hook_ReactionI|false The reaction, or false if nonexistent.
82 82
 	 */
83
-	public function get_reaction( $id );
83
+	public function get_reaction($id);
84 84
 
85 85
 	/**
86 86
 	 * Create an reaction.
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 *         The reaction object if created successfully. False or a validator
94 94
 	 *         instance if not.
95 95
 	 */
96
-	public function create_reaction( array $settings );
96
+	public function create_reaction(array $settings);
97 97
 
98 98
 	/**
99 99
 	 * Update an reaction.
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 *         The reaction object if updated successfully. False or a validator
108 108
 	 *         instance if not.
109 109
 	 */
110
-	public function update_reaction( $id, array $settings );
110
+	public function update_reaction($id, array $settings);
111 111
 
112 112
 	/**
113 113
 	 * Delete an reaction.
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 *
119 119
 	 * @return bool Whether the reaction was deleted successfully.
120 120
 	 */
121
-	public function delete_reaction( $id );
121
+	public function delete_reaction($id);
122 122
 
123 123
 	/**
124 124
 	 * Get all hook reactions for the reactor.
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 *
142 142
 	 * @return WordPoints_Hook_ReactionI[]
143 143
 	 */
144
-	public function get_reactions_to_event( $event_slug );
144
+	public function get_reactions_to_event($event_slug);
145 145
 }
146 146
 
147 147
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/reactioni.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param int                             $id    The ID of a hook reaction.
26 26
 	 * @param WordPoints_Hook_Reaction_StoreI $store The storage object.
27 27
 	 */
28
-	public function __construct( $id, WordPoints_Hook_Reaction_StoreI $store );
28
+	public function __construct($id, WordPoints_Hook_Reaction_StoreI $store);
29 29
 
30 30
 	/**
31 31
 	 * Get a Globally Unique ID for this reaction.
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	 *
68 68
 	 * @return bool Whether the event was updated successfully.
69 69
 	 */
70
-	public function update_event_slug( $event_slug );
70
+	public function update_event_slug($event_slug);
71 71
 
72 72
 	/**
73 73
 	 * Get the slug of the reactor this reaction is for.
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 *
101 101
 	 * @return mixed|false The meta value, or false if not found.
102 102
 	 */
103
-	public function get_meta( $key );
103
+	public function get_meta($key);
104 104
 
105 105
 	/**
106 106
 	 * Add a piece of metadata for this reaction.
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 	 *
115 115
 	 * @return bool Whether the metadata was added successfully.
116 116
 	 */
117
-	public function add_meta( $key, $value );
117
+	public function add_meta($key, $value);
118 118
 
119 119
 	/**
120 120
 	 * Update a piece of metadata for this reaction.
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 *
127 127
 	 * @return bool Whether the metadata was updated successfully.
128 128
 	 */
129
-	public function update_meta( $key, $value );
129
+	public function update_meta($key, $value);
130 130
 
131 131
 	/**
132 132
 	 * Delete a piece of metadata for this reaction.
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 * @return bool Whether the metadata was deleted successfully.
139 139
 	 */
140
-	public function delete_meta( $key );
140
+	public function delete_meta($key);
141 141
 
142 142
 	/**
143 143
 	 * Get all of the metadata for this reaction.
Please login to merge, or discard this patch.
src/includes/classes/hooks.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
 	protected function init() {
48 48
 
49 49
 		$sub_apps = $this->sub_apps;
50
-		$sub_apps->register( 'router', 'WordPoints_Hook_Router' );
51
-		$sub_apps->register( 'actions', 'WordPoints_Hook_Actions' );
52
-		$sub_apps->register( 'events', 'WordPoints_Hook_Events' );
53
-		$sub_apps->register( 'firers', 'WordPoints_Class_Registry_Persistent' );
54
-		$sub_apps->register( 'reactors', 'WordPoints_Class_Registry_Persistent' );
55
-		$sub_apps->register( 'reaction_stores', 'WordPoints_Class_Registry_Children' );
56
-		$sub_apps->register( 'extensions', 'WordPoints_Class_Registry_Persistent' );
57
-		$sub_apps->register( 'conditions', 'WordPoints_Class_Registry_Children' );
50
+		$sub_apps->register('router', 'WordPoints_Hook_Router');
51
+		$sub_apps->register('actions', 'WordPoints_Hook_Actions');
52
+		$sub_apps->register('events', 'WordPoints_Hook_Events');
53
+		$sub_apps->register('firers', 'WordPoints_Class_Registry_Persistent');
54
+		$sub_apps->register('reactors', 'WordPoints_Class_Registry_Persistent');
55
+		$sub_apps->register('reaction_stores', 'WordPoints_Class_Registry_Children');
56
+		$sub_apps->register('extensions', 'WordPoints_Class_Registry_Persistent');
57
+		$sub_apps->register('conditions', 'WordPoints_Class_Registry_Children');
58 58
 
59 59
 		parent::init();
60 60
 	}
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public function get_current_mode() {
79 79
 
80
-		if ( ! isset( $this->current_mode ) ) {
81
-			$this->current_mode = ( wordpoints_is_network_context() ? 'network' : 'standard' );
80
+		if ( ! isset($this->current_mode)) {
81
+			$this->current_mode = (wordpoints_is_network_context() ? 'network' : 'standard');
82 82
 		}
83 83
 
84 84
 		return $this->current_mode;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 *
97 97
 	 * @param string $mode The slug of the mode to set as the current mode.
98 98
 	 */
99
-	public function set_current_mode( $mode ) {
99
+	public function set_current_mode($mode) {
100 100
 		$this->current_mode = $mode;
101 101
 	}
102 102
 }
Please login to merge, or discard this patch.
src/includes/classes/hook/reactor/reversei.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 reverse fire object.
23 23
 	 */
24
-	public function reverse_hit( WordPoints_Hook_Fire $fire );
24
+	public function reverse_hit(WordPoints_Hook_Fire $fire);
25 25
 }
26 26
 
27 27
 // EOF
Please login to merge, or discard this patch.
src/includes/classes/hook/fire.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		$this->firer      = $firer;
74 74
 		$this->event_args = $event_args;
75 75
 		$this->reaction   = $reaction;
76
-		$this->hit_logger = new WordPoints_Hook_Hit_Logger( $this );
76
+		$this->hit_logger = new WordPoints_Hook_Hit_Logger($this);
77 77
 	}
78 78
 
79 79
 	/**
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function hit() {
87 87
 
88
-		if ( ! $this->hit_id ) {
88
+		if ( ! $this->hit_id) {
89 89
 
90 90
 			$this->hit_id = $this->hit_logger->log_hit();
91 91
 
92
-			if ( ! $this->hit_id ) {
92
+			if ( ! $this->hit_id) {
93 93
 				return false;
94 94
 			}
95 95
 		}
Please login to merge, or discard this patch.
src/includes/classes/hook/hit/logger.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param WordPoints_Hook_Fire $fire The fire that might be logged as a hit.
30 30
 	 */
31
-	public function __construct( WordPoints_Hook_Fire $fire ) {
31
+	public function __construct(WordPoints_Hook_Fire $fire) {
32 32
 
33 33
 		$this->fire = $fire;
34 34
 	}
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 		global $wpdb;
46 46
 
47
-		$signature = wordpoints_hooks_get_event_primary_arg_guid_json( $this->fire->event_args );
47
+		$signature = wordpoints_hooks_get_event_primary_arg_guid_json($this->fire->event_args);
48 48
 
49 49
 		$inserted = $wpdb->insert(
50 50
 			$wpdb->wordpoints_hook_hits
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 				'event' => $this->fire->reaction->get_event_slug(),
55 55
 				'reactor' => $this->fire->reaction->get_reactor_slug(),
56 56
 				'reaction_store' => $this->fire->reaction->get_store_slug(),
57
-				'reaction_context_id' => wp_json_encode( $this->fire->reaction->get_context_id() ),
57
+				'reaction_context_id' => wp_json_encode($this->fire->reaction->get_context_id()),
58 58
 				'reaction_id' => $this->fire->reaction->ID,
59
-				'date' => current_time( 'mysql' ),
59
+				'date' => current_time('mysql'),
60 60
 			)
61 61
 		);
62 62
 
63
-		if ( ! $inserted ) {
63
+		if ( ! $inserted) {
64 64
 			return false;
65 65
 		}
66 66
 
Please login to merge, or discard this patch.
src/includes/classes/hook/hit/query.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
 	 * @since 1.0.0
19 19
 	 */
20 20
 	protected $columns = array(
21
-		'id' => array( 'format' => '%d', 'unsigned' => true ),
22
-		'firer' => array( 'format' => '%s' ),
23
-		'primary_arg_guid' => array( 'format' => '%s' ),
24
-		'event' => array( 'format' => '%s' ),
25
-		'reactor' => array( 'format' => '%s' ),
26
-		'reaction_store' => array( 'format' => '%s' ),
27
-		'reaction_context_id' => array( 'format' => '%s' ),
28
-		'reaction_id' => array( 'format' => '%d', 'unsigned' => true ),
29
-		'date' => array( 'format' => '%s', 'is_date' => true ),
21
+		'id' => array('format' => '%d', 'unsigned' => true),
22
+		'firer' => array('format' => '%s'),
23
+		'primary_arg_guid' => array('format' => '%s'),
24
+		'event' => array('format' => '%s'),
25
+		'reactor' => array('format' => '%s'),
26
+		'reaction_store' => array('format' => '%s'),
27
+		'reaction_context_id' => array('format' => '%s'),
28
+		'reaction_id' => array('format' => '%d', 'unsigned' => true),
29
+		'date' => array('format' => '%s', 'is_date' => true),
30 30
 	);
31 31
 
32 32
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 *        @type array        $meta_query                   See WP_Meta_Query.
103 103
 	 * }
104 104
 	 */
105
-	public function __construct( $args = array() ) {
105
+	public function __construct($args = array()) {
106 106
 
107 107
 		global $wpdb;
108 108
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 		$this->defaults['order_by'] = 'date';
112 112
 
113
-		parent::__construct( $args );
113
+		parent::__construct($args);
114 114
 	}
115 115
 }
116 116
 
Please login to merge, or discard this patch.
src/includes/constants.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 
10 10
 global $wpdb;
11 11
 
12
-$wpdb->wordpoints_hook_hits = $wpdb->base_prefix . 'wordpoints_hook_hits';
13
-$wpdb->wordpoints_hook_hitmeta = $wpdb->base_prefix . 'wordpoints_hook_hitmeta';
14
-$wpdb->wordpoints_hook_periods = $wpdb->base_prefix . 'wordpoints_hook_periods';
12
+$wpdb->wordpoints_hook_hits = $wpdb->base_prefix.'wordpoints_hook_hits';
13
+$wpdb->wordpoints_hook_hitmeta = $wpdb->base_prefix.'wordpoints_hook_hitmeta';
14
+$wpdb->wordpoints_hook_periods = $wpdb->base_prefix.'wordpoints_hook_periods';
15 15
 
16 16
 // EOF
Please login to merge, or discard this patch.