Completed
Branch BUG-10738-inconsistency-in-ses... (4fb977)
by
unknown
104:46 queued 94:10
created
core/db_classes/EE_Price.class.php 3 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 *                             		    date_format and the second value is the time format
36 36
 	 * @return EE_Attendee
37 37
 	 */
38
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
39
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
40
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
38
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
39
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
40
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
41 41
 	}
42 42
 
43 43
 
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	 *                          		the website will be used.
49 49
 	 * @return EE_Attendee
50 50
 	 */
51
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
52
-		return new self( $props_n_values, TRUE, $timezone );
51
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
52
+		return new self($props_n_values, TRUE, $timezone);
53 53
 	}
54 54
 
55 55
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	 * @access        public
61 61
 	 * @param        int $PRT_ID
62 62
 	 */
63
-	public function set_type( $PRT_ID = 0 ) {
64
-		$this->set( 'PRT_ID', $PRT_ID );
63
+	public function set_type($PRT_ID = 0) {
64
+		$this->set('PRT_ID', $PRT_ID);
65 65
 	}
66 66
 
67 67
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	 * @access        public
73 73
 	 * @param        float $PRC_amount
74 74
 	 */
75
-	public function set_amount( $PRC_amount = 0.00 ) {
76
-		$this->set( 'PRC_amount', $PRC_amount );
75
+	public function set_amount($PRC_amount = 0.00) {
76
+		$this->set('PRC_amount', $PRC_amount);
77 77
 	}
78 78
 
79 79
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	 * @access        public
85 85
 	 * @param        string $PRC_name
86 86
 	 */
87
-	public function set_name( $PRC_name = '' ) {
88
-		$this->set( 'PRC_name', $PRC_name );
87
+	public function set_name($PRC_name = '') {
88
+		$this->set('PRC_name', $PRC_name);
89 89
 	}
90 90
 
91 91
 
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 	 * @access        public
97 97
 	 * @param        string $PRC_desc
98 98
 	 */
99
-	public function set_description( $PRC_desc = '' ) {
100
-		$this->Set( 'PRC_desc', $PRC_desc );
99
+	public function set_description($PRC_desc = '') {
100
+		$this->Set('PRC_desc', $PRC_desc);
101 101
 	}
102 102
 
103 103
 
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 	* 		@access		public
109 109
 	*		@param		bool		$PRC_is_default
110 110
 	*/
111
-	public function set_is_default( $PRC_is_default = FALSE ) {
112
-		$this->set( 'PRC_is_default', $PRC_is_default );
111
+	public function set_is_default($PRC_is_default = FALSE) {
112
+		$this->set('PRC_is_default', $PRC_is_default);
113 113
 	}
114 114
 
115 115
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 	* 		@access		public
121 121
 	*		@param		bool		$PRC_deleted
122 122
 	*/
123
-	public function set_deleted( $PRC_deleted = NULL ) {
124
-		$this->set( 'PRC_deleted', $PRC_deleted );
123
+	public function set_deleted($PRC_deleted = NULL) {
124
+		$this->set('PRC_deleted', $PRC_deleted);
125 125
 	}
126 126
 
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * @return        int
133 133
 	 */
134 134
 	public function type() {
135
-		return $this->get( 'PRT_ID' );
135
+		return $this->get('PRT_ID');
136 136
 	}
137 137
 
138 138
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return        float
144 144
 	 */
145 145
 	public function amount() {
146
-		return $this->get( 'PRC_amount' );
146
+		return $this->get('PRC_amount');
147 147
 	}
148 148
 
149 149
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * @return        string
155 155
 	 */
156 156
 	public function name() {
157
-		return $this->get( 'PRC_name' );
157
+		return $this->get('PRC_name');
158 158
 	}
159 159
 
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @return        string
166 166
 	 */
167 167
 	public function desc() {
168
-		return $this->get( 'PRC_desc' );
168
+		return $this->get('PRC_desc');
169 169
 	}
170 170
 
171 171
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @return        int
177 177
 	 */
178 178
 	public function overrides() {
179
-		return $this->get( 'PRC_overrides' );
179
+		return $this->get('PRC_overrides');
180 180
 	}
181 181
 
182 182
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @return        int
188 188
 	 */
189 189
 	public function order() {
190
-		return $this->get( 'PRC_order' );
190
+		return $this->get('PRC_order');
191 191
 	}
192 192
 
193 193
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @return        bool
212 212
 	 */
213 213
 	public function is_default() {
214
-		return $this->get( 'PRC_is_default' );
214
+		return $this->get('PRC_is_default');
215 215
 	}
216 216
 
217 217
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * @return        bool
223 223
 	 */
224 224
 	public function deleted() {
225
-		return $this->get( 'PRC_deleted' );
225
+		return $this->get('PRC_deleted');
226 226
 	}
227 227
 
228 228
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	 * @return bool
232 232
 	 */
233 233
 	public function parent() {
234
-		return $this->get( 'PRC_parent' );
234
+		return $this->get('PRC_parent');
235 235
 	}
236 236
 
237 237
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 * @return EE_Price_Type
254 254
 	 */
255 255
 	public function type_obj() {
256
-		return $this->get_first_related( 'Price_Type' );
256
+		return $this->get_first_related('Price_Type');
257 257
 	}
258 258
 
259 259
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	 */
276 276
 	public function is_percent() {
277 277
 		$price_type = $this->type_obj();
278
-		return $price_type->get( 'PRT_is_percent' );
278
+		return $price_type->get('PRT_is_percent');
279 279
 	}
280 280
 
281 281
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * @return string
288 288
 	 */
289 289
 	public function pretty_price() {
290
-		return ! $this->is_percent() ? $this->get_pretty('PRC_amount') : $this->get('PRC_amount') . '%';
290
+		return ! $this->is_percent() ? $this->get_pretty('PRC_amount') : $this->get('PRC_amount').'%';
291 291
 	}
292 292
 
293 293
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 	 * @return mixed
297 297
 	 */
298 298
 	public function get_price_without_currency_symbol() {
299
-		return str_replace( EE_Registry::instance()->CFG->currency->sign, '', $this->get_pretty( 'PRC_amount' ) );
299
+		return str_replace(EE_Registry::instance()->CFG->currency->sign, '', $this->get_pretty('PRC_amount'));
300 300
 	}
301 301
 }
302 302
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 * @param array $props_n_values  incoming values from the database
47 47
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
48 48
 	 *                          		the website will be used.
49
-	 * @return EE_Attendee
49
+	 * @return EE_Price
50 50
 	 */
51 51
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
52 52
 		return new self( $props_n_values, TRUE, $timezone );
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 
104 104
 
105 105
 	/**
106
-	*		set is_default
107
-	*
108
-	* 		@access		public
109
-	*		@param		bool		$PRC_is_default
110
-	*/
106
+	 *		set is_default
107
+	 *
108
+	 * 		@access		public
109
+	 *		@param		bool		$PRC_is_default
110
+	 */
111 111
 	public function set_is_default( $PRC_is_default = FALSE ) {
112 112
 		$this->set( 'PRC_is_default', $PRC_is_default );
113 113
 	}
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
 
117 117
 	/**
118
-	*		set deleted
119
-	*
120
-	* 		@access		public
121
-	*		@param		bool		$PRC_deleted
122
-	*/
118
+	 *		set deleted
119
+	 *
120
+	 * 		@access		public
121
+	 *		@param		bool		$PRC_deleted
122
+	 */
123 123
 	public function set_deleted( $PRC_deleted = NULL ) {
124 124
 		$this->set( 'PRC_deleted', $PRC_deleted );
125 125
 	}
Please login to merge, or discard this patch.
core/db_classes/EE_Question_Option.class.php 2 patches
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 *                             		    date_format and the second value is the time format
46 46
 	 * @return EE_Attendee
47 47
 	 */
48
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
49
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
50
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
48
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
49
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
50
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
51 51
 	}
52 52
 
53 53
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 *                          		the website will be used.
59 59
 	 * @return EE_Attendee
60 60
 	 */
61
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
62
-		return new self( $props_n_values, TRUE, $timezone );
61
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
62
+		return new self($props_n_values, TRUE, $timezone);
63 63
 	}
64 64
 
65 65
 
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 	 * @param string $value
70 70
 	 * @return bool success
71 71
 	 */
72
-	public function set_value( $value ) {
73
-		$this->set( 'QSO_value', $value );
72
+	public function set_value($value) {
73
+		$this->set('QSO_value', $value);
74 74
 	}
75 75
 
76 76
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @param string $text
81 81
 	 * @return bool success
82 82
 	 */
83
-	public function set_desc( $text ) {
84
-		$this->set( 'QSO_desc', $text );
83
+	public function set_desc($text) {
84
+		$this->set('QSO_desc', $text);
85 85
 	}
86 86
 
87 87
 
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 	 * @param integer $order
94 94
 	 * @return bool      $success
95 95
 	 */
96
-	public function set_order( $order ) {
97
-		$this->set( 'QSO_order', $order );
96
+	public function set_order($order) {
97
+		$this->set('QSO_order', $order);
98 98
 	}
99 99
 
100 100
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 	 * @param int $question_ID
105 105
 	 * @return bool success
106 106
 	 */
107
-	public function set_question_ID( $question_ID ) {
108
-		$this->set( 'QST_ID', $question_ID );
107
+	public function set_question_ID($question_ID) {
108
+		$this->set('QST_ID', $question_ID);
109 109
 	}
110 110
 
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @param string $text
116 116
 	 * @return bool success
117 117
 	 */
118
-	public function set_opt_group( $text ) {
118
+	public function set_opt_group($text) {
119 119
 		return $this->_QSO_opt_group = $text;
120 120
 	}
121 121
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * @return string
127 127
 	 */
128 128
 	public function value() {
129
-		return $this->get( 'QSO_value' );
129
+		return $this->get('QSO_value');
130 130
 	}
131 131
 
132 132
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * @return string
137 137
 	 */
138 138
 	public function desc() {
139
-		return $this->get( 'QSO_desc' );
139
+		return $this->get('QSO_desc');
140 140
 	}
141 141
 
142 142
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return boolean
147 147
 	 */
148 148
 	public function deleted() {
149
-		return $this->get( 'QSO_deleted' );
149
+		return $this->get('QSO_deleted');
150 150
 	}
151 151
 
152 152
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @return integer
159 159
 	 */
160 160
 	public function order() {
161
-		return $this->get( 'QSO_option' );
161
+		return $this->get('QSO_option');
162 162
 	}
163 163
 
164 164
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @return int
169 169
 	 */
170 170
 	public function question_ID() {
171
-		return $this->get( 'QST_ID' );
171
+		return $this->get('QST_ID');
172 172
 	}
173 173
 
174 174
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 * @return EE_Question
179 179
 	 */
180 180
 	public function question() {
181
-		return $this->get_first_related( 'Question' );
181
+		return $this->get_first_related('Question');
182 182
 	}
183 183
 
184 184
 
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
 	 * @param array $options {
198 198
 	 *	@type int $QST_ID the QST_ID attribute of this question option, otherwise it will be for the same question as the original
199 199
 	 */
200
-	public function duplicate( $options = array() ) {
200
+	public function duplicate($options = array()) {
201 201
 		$new_question_option = clone $this;
202
-		$new_question_option->set( 'QSO_ID', null );
203
-		if( array_key_exists( 'QST_ID', $options ) ) {//use array_key_exists instead of isset because NULL might be a valid value
204
-			$new_question_option->set_question_ID( $options[ 'QST_ID' ] );
202
+		$new_question_option->set('QSO_ID', null);
203
+		if (array_key_exists('QST_ID', $options)) {//use array_key_exists instead of isset because NULL might be a valid value
204
+			$new_question_option->set_question_ID($options['QST_ID']);
205 205
 		}
206 206
 		$new_question_option->save();
207 207
 	}
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
 	 * @param string $QSO_system
220 220
 	 * @return bool
221 221
 	 */
222
-	public function set_system( $QSO_system ) {
223
-		return $this->set( 'QSO_system', $QSO_system );
222
+	public function set_system($QSO_system) {
223
+		return $this->set('QSO_system', $QSO_system);
224 224
 	}
225 225
 }
226 226
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @param array $props_n_values  incoming values from the database
57 57
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
58 58
 	 *                          		the website will be used.
59
-	 * @return EE_Attendee
59
+	 * @return EE_Question_Option
60 60
 	 */
61 61
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
62 62
 		return new self( $props_n_values, TRUE, $timezone );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	/**
68 68
 	 * Sets the option's key value
69 69
 	 * @param string $value
70
-	 * @return bool success
70
+	 * @return boolean|null success
71 71
 	 */
72 72
 	public function set_value( $value ) {
73 73
 		$this->set( 'QSO_value', $value );
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * Sets the option's Display Text
80 80
 	 * @param string $text
81
-	 * @return bool success
81
+	 * @return boolean|null success
82 82
 	 */
83 83
 	public function set_desc( $text ) {
84 84
 		$this->set( 'QSO_desc', $text );
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @access public
93 93
 	 * @param integer $order
94
-	 * @return bool      $success
94
+	 * @return boolean|null      $success
95 95
 	 */
96 96
 	public function set_order( $order ) {
97 97
 		$this->set( 'QSO_order', $order );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	/**
103 103
 	 * Sets the ID of the related question
104 104
 	 * @param int $question_ID
105
-	 * @return bool success
105
+	 * @return boolean|null success
106 106
 	 */
107 107
 	public function set_question_ID( $question_ID ) {
108 108
 		$this->set( 'QST_ID', $question_ID );
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	/**
114 114
 	 * Sets the option's opt_group
115 115
 	 * @param string $text
116
-	 * @return bool success
116
+	 * @return string success
117 117
 	 */
118 118
 	public function set_opt_group( $text ) {
119 119
 		return $this->_QSO_opt_group = $text;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	/**
218 218
 	 * Sets QSO_system
219 219
 	 * @param string $QSO_system
220
-	 * @return bool
220
+	 * @return boolean|null
221 221
 	 */
222 222
 	public function set_system( $QSO_system ) {
223 223
 		return $this->set( 'QSO_system', $QSO_system );
Please login to merge, or discard this patch.
core/db_classes/EE_Registration_Payment.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 	 * @param string $timezone
20 20
 	 * @return EE_Registration_Payment
21 21
 	 */
22
-	public static function new_instance( $props_n_values = array(), $timezone = '', $date_formats = array() ) {
23
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
24
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
22
+	public static function new_instance($props_n_values = array(), $timezone = '', $date_formats = array()) {
23
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
24
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
25 25
 	}
26 26
 
27 27
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 * @param string $timezone
32 32
 	 * @return EE_Registration_Payment
33 33
 	 */
34
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) {
35
-		return new self( $props_n_values, true, $timezone );
34
+	public static function new_instance_from_db($props_n_values = array(), $timezone = '') {
35
+		return new self($props_n_values, true, $timezone);
36 36
 	}
37 37
 
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return 	int
44 44
 	 */
45 45
 	public function registration_ID() {
46
-		return $this->get( 'REG_ID' );
46
+		return $this->get('REG_ID');
47 47
 	}
48 48
 
49 49
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @return    int
55 55
 	 */
56 56
 	public function payment_ID() {
57
-		return $this->get( 'PAY_ID' );
57
+		return $this->get('PAY_ID');
58 58
 	}
59 59
 
60 60
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @return 	float
66 66
 	 */
67 67
 	public function amount() {
68
-		return $this->get( 'RPY_amount' );
68
+		return $this->get('RPY_amount');
69 69
 	}
70 70
 
71 71
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 * @access    public
76 76
 	 * @param float $amount
77 77
 	 */
78
-	public function set_amount( $amount = 0.000 ) {
79
-		$this->set( 'RPY_amount', $amount );
78
+	public function set_amount($amount = 0.000) {
79
+		$this->set('RPY_amount', $amount);
80 80
 	}
81 81
 
82 82
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return \EE_Registration
88 88
 	 */
89 89
 	public function registration() {
90
-		return $this->get_first_related( 'Registration' );
90
+		return $this->get_first_related('Registration');
91 91
 	}
92 92
 
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @return \EE_Payment
99 99
 	 */
100 100
 	public function payment() {
101
-		return $this->get_first_related( 'Payment' );
101
+		return $this->get_first_related('Payment');
102 102
 	}
103 103
 
104 104
 
Please login to merge, or discard this patch.
core/db_classes/EE_Ticket_Price.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @param string $timezone
36 36
 	 * @return EE_Ticket_Price|mixed
37 37
 	 */
38
-	public static function new_instance( $props_n_values = array(), $timezone = '', $date_formats = array() ) {
39
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
40
-		return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone, $date_formats );
38
+	public static function new_instance($props_n_values = array(), $timezone = '', $date_formats = array()) {
39
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
40
+		return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone, $date_formats);
41 41
 	}
42 42
 
43 43
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param string $timezone
48 48
 	 * @return EE_Ticket_Price
49 49
 	 */
50
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) {
51
-		return new self( $props_n_values, TRUE, $timezone );
50
+	public static function new_instance_from_db($props_n_values = array(), $timezone = '') {
51
+		return new self($props_n_values, TRUE, $timezone);
52 52
 	}
53 53
 
54 54
 
Please login to merge, or discard this patch.
admin_pages/events/Events_Admin_List_Table.class.php 3 patches
Spacing   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 * @param EE_Admin_Page $admin_page
45 45
 	 */
46
-	public function __construct( $admin_page ) {
46
+	public function __construct($admin_page) {
47 47
 		parent::__construct($admin_page);
48
-		require_once( EE_HELPERS . 'EEH_DTT_Helper.helper.php' );
48
+		require_once(EE_HELPERS.'EEH_DTT_Helper.helper.php');
49 49
 	}
50 50
 
51 51
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	protected function _setup_data() {
56 56
 		$this->_data = $this->_admin_page->get_events($this->_per_page, $this->_current_page);
57
- 		$this->_all_data_count = $this->_admin_page->get_events(0,0, TRUE);
57
+ 		$this->_all_data_count = $this->_admin_page->get_events(0, 0, TRUE);
58 58
 	}
59 59
 
60 60
 
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
 
86 86
 
87 87
 		$this->_sortable_columns = array(
88
-			'id' => array( 'EVT_ID' => true ),
89
-			'name' => array( 'EVT_name' => false ),
90
-			'author' => array( 'EVT_wp_user' => false ),
91
-			'venue' => array( 'Venue.VNU_name' => false ),
88
+			'id' => array('EVT_ID' => true),
89
+			'name' => array('EVT_name' => false),
90
+			'author' => array('EVT_wp_user' => false),
91
+			'venue' => array('Venue.VNU_name' => false),
92 92
 			'start_date_time' => array('Datetime.DTT_EVT_start' => false),
93 93
 			'reg_begins' => array('Datetime.Ticket.TKT_start_date' => false),
94 94
 			);
95 95
 
96 96
 		$this->_primary_column = 'id';
97 97
 
98
-		$this->_hidden_columns = array( 'author' );
98
+		$this->_hidden_columns = array('author');
99 99
 	}
100 100
 
101 101
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	protected function _add_view_counts() {
114 114
 		$this->_views['all']['count'] = $this->_admin_page->total_events();
115 115
 		$this->_views['draft']['count'] = $this->_admin_page->total_events_draft();
116
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_events', 'espresso_events_trash_events' ) ) {
116
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_events', 'espresso_events_trash_events')) {
117 117
 			$this->_views['trash']['count'] = $this->_admin_page->total_trashed_events();
118 118
 		}
119 119
 	}
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
 	 *
125 125
 	 * @return string
126 126
 	 */
127
-	protected function _get_row_class( $item ) {
128
-		$class = parent::_get_row_class( $item );
127
+	protected function _get_row_class($item) {
128
+		$class = parent::_get_row_class($item);
129 129
 		//add status class
130
-		$class .= $item instanceof EE_Event ? ' ee-status-strip event-status-' . $item->get_active_status() : '';
131
-		if ( $this->_has_checkbox_column ) {
130
+		$class .= $item instanceof EE_Event ? ' ee-status-strip event-status-'.$item->get_active_status() : '';
131
+		if ($this->_has_checkbox_column) {
132 132
 			$class .= ' has-checkbox-column';
133 133
 		}
134 134
 		return $class;
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 	 *
141 141
 	 * @return string
142 142
 	 */
143
-	public function column_status( EE_Event $item ) {
144
-		return '<span class="ee-status-strip ee-status-strip-td event-status-' . $item->get_active_status() . '"></span>';
143
+	public function column_status(EE_Event $item) {
144
+		return '<span class="ee-status-strip ee-status-strip-td event-status-'.$item->get_active_status().'"></span>';
145 145
 	}/**/
146 146
 
147 147
 
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
 	 *
151 151
 	 * @return string
152 152
 	 */
153
-	public function column_cb( $item ) {
154
-		if ( ! $item instanceof EE_Event ) {
153
+	public function column_cb($item) {
154
+		if ( ! $item instanceof EE_Event) {
155 155
 			return '';
156 156
 		}
157 157
 		$this->_dtt = $item->primary_datetime(); //set this for use in other columns
158 158
 
159 159
 		//does event have any attached registrations?
160
-		$regs = $item->count_related( 'Registration' );
160
+		$regs = $item->count_related('Registration');
161 161
 		return $regs > 0 && $this->_view == 'trash' ? '<span class="ee-lock-icon"></span>' : sprintf(
162 162
 			'<input type="checkbox" name="EVT_IDs[]" value="%s" />', $item->ID()
163 163
 		);
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
 	 *
170 170
 	 * @return mixed|string
171 171
 	 */
172
-	public function column_id( EE_Event $item ) {
172
+	public function column_id(EE_Event $item) {
173 173
 		$content = $item->ID();
174
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->name() . '</span>';
174
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->name().'</span>';
175 175
 		return $content;
176 176
 	}
177 177
 
@@ -181,16 +181,16 @@  discard block
 block discarded – undo
181 181
 	 *
182 182
 	 * @return string
183 183
 	 */
184
-	public function column_name( EE_Event $item ) {
184
+	public function column_name(EE_Event $item) {
185 185
 		$edit_query_args = array(
186 186
 				'action' => 'edit',
187 187
 				'post' => $item->ID()
188 188
 			);
189
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EVENTS_ADMIN_URL );
190
-		$actions = $this->_column_name_action_setup( $item );
189
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EVENTS_ADMIN_URL);
190
+		$actions = $this->_column_name_action_setup($item);
191 191
 		$status = ''; //$item->status() !== 'publish' ? ' (' . $item->status() . ')' : '';
192
-		$content = '<strong><a class="row-title" href="' . $edit_link . '">' . $item->name() . '</a></strong>' . $status;
193
-		$content .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status( $item->get_active_status(), false, 'sentence' ) . '</span>';
192
+		$content = '<strong><a class="row-title" href="'.$edit_link.'">'.$item->name().'</a></strong>'.$status;
193
+		$content .= '<br><span class="ee-status-text-small">'.EEH_Template::pretty_status($item->get_active_status(), false, 'sentence').'</span>';
194 194
 		$content .= $this->row_actions($actions);
195 195
 		return $content;
196 196
 
@@ -207,72 +207,72 @@  discard block
 block discarded – undo
207 207
 	 *
208 208
 	 * @return array array of actions
209 209
 	 */
210
-	protected function _column_name_action_setup( EE_Event $item ) {
210
+	protected function _column_name_action_setup(EE_Event $item) {
211 211
 		//todo: remove when attendees is active
212
-		if ( !defined('REG_ADMIN_URL') )
212
+		if ( ! defined('REG_ADMIN_URL'))
213 213
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
214 214
 
215 215
 		$actions = array();
216 216
 
217
-		if ( EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $item->ID() ) ) {
217
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $item->ID())) {
218 218
 			$edit_query_args = array(
219 219
 					'action' => 'edit',
220 220
 					'post' => $item->ID()
221 221
 				);
222
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EVENTS_ADMIN_URL );
223
-			$actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Event', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>';
222
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EVENTS_ADMIN_URL);
223
+			$actions['edit'] = '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Event', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
224 224
 
225 225
 		}
226 226
 
227
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ) {
227
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID())) {
228 228
 			$attendees_query_args = array(
229 229
 					'action' => 'default',
230 230
 					'event_id' => $item->ID()
231 231
 				);
232
-			$attendees_link = EE_Admin_Page::add_query_args_and_nonce( $attendees_query_args, REG_ADMIN_URL );
233
-			$actions['attendees'] = '<a href="' . $attendees_link . '" title="' . esc_attr__('View Registrations', 'event_espresso') . '">' . __('Registrations', 'event_espresso') . '</a>';
232
+			$attendees_link = EE_Admin_Page::add_query_args_and_nonce($attendees_query_args, REG_ADMIN_URL);
233
+			$actions['attendees'] = '<a href="'.$attendees_link.'" title="'.esc_attr__('View Registrations', 'event_espresso').'">'.__('Registrations', 'event_espresso').'</a>';
234 234
 		}
235 235
 
236
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_trash_event', $item->ID() ) ) {
236
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_trash_event', $item->ID())) {
237 237
 			$trash_event_query_args = array(
238 238
 					'action' => 'trash_event',
239 239
 					'EVT_ID' => $item->ID()
240 240
 				);
241
-			$trash_event_link = EE_Admin_Page::add_query_args_and_nonce( $trash_event_query_args, EVENTS_ADMIN_URL );
241
+			$trash_event_link = EE_Admin_Page::add_query_args_and_nonce($trash_event_query_args, EVENTS_ADMIN_URL);
242 242
 		}
243 243
 
244
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_restore_event', $item->ID() ) ) {
244
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_restore_event', $item->ID())) {
245 245
 			$restore_event_query_args = array(
246 246
 					'action' => 'restore_event',
247 247
 					'EVT_ID' => $item->ID()
248 248
 				);
249
-			$restore_event_link = EE_Admin_Page::add_query_args_and_nonce( $restore_event_query_args, EVENTS_ADMIN_URL );
249
+			$restore_event_link = EE_Admin_Page::add_query_args_and_nonce($restore_event_query_args, EVENTS_ADMIN_URL);
250 250
 		}
251 251
 
252
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_delete_event', $item->ID() ) ) {
252
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_delete_event', $item->ID())) {
253 253
 			$delete_event_query_args = array(
254 254
 					'action' => 'delete_event',
255 255
 					'EVT_ID' => $item->ID()
256 256
 				);
257
-			$delete_event_link = EE_Admin_Page::add_query_args_and_nonce( $delete_event_query_args, EVENTS_ADMIN_URL );
257
+			$delete_event_link = EE_Admin_Page::add_query_args_and_nonce($delete_event_query_args, EVENTS_ADMIN_URL);
258 258
 		}
259 259
 
260 260
 		$view_link = get_permalink($item->ID());
261 261
 
262
-		$actions['view'] = '<a href="' . $view_link . '" title="' . esc_attr__('View Event', 'event_espresso') . '">' . __('View', 'event_espresso') . '</a>';
262
+		$actions['view'] = '<a href="'.$view_link.'" title="'.esc_attr__('View Event', 'event_espresso').'">'.__('View', 'event_espresso').'</a>';
263 263
 
264
-		switch ( $item->get( 'status' ) ) {
264
+		switch ($item->get('status')) {
265 265
 			case 'trash' :
266
-					if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_restore_event', $item->ID() ) ) {
267
-						$actions['restore_from_trash'] = '<a href="' . $restore_event_link . '" title="' . esc_attr__('Restore from Trash', 'event_espresso') . '">' . __('Restore from Trash', 'event_espresso') . '</a>';
266
+					if (EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_restore_event', $item->ID())) {
267
+						$actions['restore_from_trash'] = '<a href="'.$restore_event_link.'" title="'.esc_attr__('Restore from Trash', 'event_espresso').'">'.__('Restore from Trash', 'event_espresso').'</a>';
268 268
 					}
269
-					if ( $item->count_related('Registration') === 0 && EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_delete_event', $item->ID() ) ) {
270
-						$actions['delete'] = '<a href="' . $delete_event_link . '" title="' . esc_attr__('Delete Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
269
+					if ($item->count_related('Registration') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_delete_event', $item->ID())) {
270
+						$actions['delete'] = '<a href="'.$delete_event_link.'" title="'.esc_attr__('Delete Permanently', 'event_espresso').'">'.__('Delete Permanently', 'event_espresso').'</a>';
271 271
 					}
272 272
 				break;
273 273
 			default :
274
-					if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_event', 'espresso_events_trash_event', $item->ID() ) ) {
275
-						$actions['move to trash'] = '<a href="' . $trash_event_link . '" title="' . esc_attr__('Trash Event', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
274
+					if (EE_Registry::instance()->CAP->current_user_can('ee_delete_event', 'espresso_events_trash_event', $item->ID())) {
275
+						$actions['move to trash'] = '<a href="'.$trash_event_link.'" title="'.esc_attr__('Trash Event', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
276 276
 					}
277 277
 		}
278 278
 		return $actions;
@@ -284,17 +284,17 @@  discard block
 block discarded – undo
284 284
 	 *
285 285
 	 * @return string
286 286
 	 */
287
-	public function column_author( EE_Event $item ) {
287
+	public function column_author(EE_Event $item) {
288 288
 		//user author info
289
-		$event_author = get_userdata( $item->wp_user() );
290
-		$gravatar = get_avatar( $item->wp_user(), '15' );
289
+		$event_author = get_userdata($item->wp_user());
290
+		$gravatar = get_avatar($item->wp_user(), '15');
291 291
 		//filter link
292 292
 		$query_args = array(
293 293
 			'action' => 'default',
294 294
 			'EVT_wp_user' => $item->wp_user()
295 295
 			);
296
-		$filter_url = EE_Admin_Page::add_query_args_and_nonce( $query_args, EVENTS_ADMIN_URL );
297
-		return $gravatar . '  <a href="' . $filter_url . '" title="' . esc_attr__('Click to filter events by this author.', 'event_espresso') . '">' . $event_author->display_name . '</a>';
296
+		$filter_url = EE_Admin_Page::add_query_args_and_nonce($query_args, EVENTS_ADMIN_URL);
297
+		return $gravatar.'  <a href="'.$filter_url.'" title="'.esc_attr__('Click to filter events by this author.', 'event_espresso').'">'.$event_author->display_name.'</a>';
298 298
 	}
299 299
 
300 300
 
@@ -303,9 +303,9 @@  discard block
 block discarded – undo
303 303
 	 *
304 304
 	 * @return string
305 305
 	 */
306
-	public function column_venue( EE_Event $item ) {
307
-		$venue = $item->get_first_related( 'Venue' );
308
-		return !empty( $venue ) ? $venue->name() : '';
306
+	public function column_venue(EE_Event $item) {
307
+		$venue = $item->get_first_related('Venue');
308
+		return ! empty($venue) ? $venue->name() : '';
309 309
 	}
310 310
 
311 311
 
@@ -314,10 +314,10 @@  discard block
 block discarded – undo
314 314
 	 *
315 315
 	 * @throws EE_Error
316 316
 	 */
317
-	public function column_start_date_time( EE_Event $item ) {
318
-		echo !empty( $this->_dtt ) ?  $this->_dtt->get_i18n_datetime('DTT_EVT_start') : __('No Date was saved for this Event', 'event_espresso');
317
+	public function column_start_date_time(EE_Event $item) {
318
+		echo ! empty($this->_dtt) ? $this->_dtt->get_i18n_datetime('DTT_EVT_start') : __('No Date was saved for this Event', 'event_espresso');
319 319
 		//display in user's timezone?
320
-		echo !empty( $this->_dtt ) ? $this->_dtt->display_in_my_timezone('DTT_EVT_start', 'get_i18n_datetime', '', 'My Timezone: ' ) : '';
320
+		echo ! empty($this->_dtt) ? $this->_dtt->display_in_my_timezone('DTT_EVT_start', 'get_i18n_datetime', '', 'My Timezone: ') : '';
321 321
 
322 322
 	}
323 323
 
@@ -327,11 +327,11 @@  discard block
 block discarded – undo
327 327
 	 *
328 328
 	 * @throws EE_Error
329 329
 	 */
330
-	public function column_reg_begins( EE_Event $item ) {
330
+	public function column_reg_begins(EE_Event $item) {
331 331
 		$reg_start = $item->get_ticket_with_earliest_start_time();
332
-		echo !empty( $reg_start ) ? $reg_start->get_i18n_datetime('TKT_start_date') : __('No Tickets have been setup for this Event', 'event_espresso');
332
+		echo ! empty($reg_start) ? $reg_start->get_i18n_datetime('TKT_start_date') : __('No Tickets have been setup for this Event', 'event_espresso');
333 333
 		//display in user's timezone?
334
-		echo !empty( $reg_start ) ? $reg_start->display_in_my_timezone('TKT_start_date', 'get_i18n_datetime', '', 'My Timezone: ' ) : '';/**/
334
+		echo ! empty($reg_start) ? $reg_start->display_in_my_timezone('TKT_start_date', 'get_i18n_datetime', '', 'My Timezone: ') : ''; /**/
335 335
 	}
336 336
 
337 337
 
@@ -340,14 +340,14 @@  discard block
 block discarded – undo
340 340
 	 *
341 341
 	 * @return int|string
342 342
 	 */
343
-	public function column_attendees( EE_Event $item ) {
343
+	public function column_attendees(EE_Event $item) {
344 344
 		$attendees_query_args = array(
345 345
 				'action' => 'default',
346 346
 				'event_id' => $item->ID()
347 347
 			);
348
-		$attendees_link = EE_Admin_Page::add_query_args_and_nonce( $attendees_query_args, REG_ADMIN_URL );
349
-		$registered_attendees = EEM_Registration::instance()->get_event_registration_count( $item->ID() );
350
-		return  EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ? '<a href="' . $attendees_link . '">' . $registered_attendees . '</a>' : $registered_attendees;
348
+		$attendees_link = EE_Admin_Page::add_query_args_and_nonce($attendees_query_args, REG_ADMIN_URL);
349
+		$registered_attendees = EEM_Registration::instance()->get_event_registration_count($item->ID());
350
+		return  EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID()) ? '<a href="'.$attendees_link.'">'.$registered_attendees.'</a>' : $registered_attendees;
351 351
 	}
352 352
 
353 353
 
@@ -356,8 +356,8 @@  discard block
 block discarded – undo
356 356
 	 *
357 357
 	 * @return float
358 358
 	 */
359
-	public function column_tkts_sold( EE_Event $item ) {
360
-		return EEM_Ticket::instance()->sum(array( array('Datetime.EVT_ID' => $item->ID() )), 'TKT_sold' );
359
+	public function column_tkts_sold(EE_Event $item) {
360
+		return EEM_Ticket::instance()->sum(array(array('Datetime.EVT_ID' => $item->ID())), 'TKT_sold');
361 361
 	}
362 362
 
363 363
 
@@ -366,38 +366,38 @@  discard block
 block discarded – undo
366 366
 	 *
367 367
 	 * @return string
368 368
 	 */
369
-	public function column_actions( EE_Event $item ) {
369
+	public function column_actions(EE_Event $item) {
370 370
 		//todo: remove when attendees is active
371
-		if ( !defined('REG_ADMIN_URL') )
371
+		if ( ! defined('REG_ADMIN_URL'))
372 372
 			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
373 373
 		$actionlinks = array();
374 374
 
375 375
 		$view_link = get_permalink($item->ID());
376 376
 
377
-		$actionlinks[] = '<a href="' .  $view_link . '" title="' . esc_attr__('View Event', 'event_espresso') . '" target="_blank">';
377
+		$actionlinks[] = '<a href="'.$view_link.'" title="'.esc_attr__('View Event', 'event_espresso').'" target="_blank">';
378 378
 		$actionlinks[] = '<div class="dashicons dashicons-search"></div></a>';
379 379
 
380
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'espresso_events_edit', $item->ID() ) ) {
380
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $item->ID())) {
381 381
 			$edit_query_args = array(
382 382
 					'action' => 'edit',
383 383
 					'post' => $item->ID()
384 384
 				);
385
-			$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EVENTS_ADMIN_URL );
386
-			$actionlinks[] = '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Event', 'event_espresso') . '"><div class="ee-icon ee-icon-calendar-edit"></div></a>';
385
+			$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EVENTS_ADMIN_URL);
386
+			$actionlinks[] = '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Event', 'event_espresso').'"><div class="ee-icon ee-icon-calendar-edit"></div></a>';
387 387
 		}
388 388
 
389
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $item->ID() ) ) {
389
+		if (EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $item->ID())) {
390 390
 			$attendees_query_args = array(
391 391
 				'action' => 'default',
392 392
 				'event_id' => $item->ID()
393 393
 			);
394
-			$attendees_link = EE_Admin_Page::add_query_args_and_nonce( $attendees_query_args, REG_ADMIN_URL );
395
-			$actionlinks[] = '<a href="' . $attendees_link . '" title="' . esc_attr__('View Registrants', 'event_espresso') . '"><div class="dashicons dashicons-groups"></div></a>';
394
+			$attendees_link = EE_Admin_Page::add_query_args_and_nonce($attendees_query_args, REG_ADMIN_URL);
395
+			$actionlinks[] = '<a href="'.$attendees_link.'" title="'.esc_attr__('View Registrants', 'event_espresso').'"><div class="dashicons dashicons-groups"></div></a>';
396 396
 		}
397 397
 
398
-		$actionlinks = apply_filters( 'FHEE__Events_Admin_List_Table__column_actions__action_links', $actionlinks, $item );
398
+		$actionlinks = apply_filters('FHEE__Events_Admin_List_Table__column_actions__action_links', $actionlinks, $item);
399 399
 
400
-		return $this->_action_string( implode( "\n\t", $actionlinks ), $item, 'div' );
400
+		return $this->_action_string(implode("\n\t", $actionlinks), $item, 'div');
401 401
 	}
402 402
 
403 403
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
 	/**
168 168
 	 * @param EE_Event $item
169 169
 	 *
170
-	 * @return mixed|string
170
+	 * @return string
171 171
 	 */
172 172
 	public function column_id( EE_Event $item ) {
173 173
 		$content = $item->ID();
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -209,8 +210,9 @@  discard block
 block discarded – undo
209 210
 	 */
210 211
 	protected function _column_name_action_setup( EE_Event $item ) {
211 212
 		//todo: remove when attendees is active
212
-		if ( !defined('REG_ADMIN_URL') )
213
-			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
213
+		if ( !defined('REG_ADMIN_URL') ) {
214
+					define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
215
+		}
214 216
 
215 217
 		$actions = array();
216 218
 
@@ -368,8 +370,9 @@  discard block
 block discarded – undo
368 370
 	 */
369 371
 	public function column_actions( EE_Event $item ) {
370 372
 		//todo: remove when attendees is active
371
-		if ( !defined('REG_ADMIN_URL') )
372
-			define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
373
+		if ( !defined('REG_ADMIN_URL') ) {
374
+					define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
375
+		}
373 376
 		$actionlinks = array();
374 377
 
375 378
 		$view_link = get_permalink($item->ID());
Please login to merge, or discard this patch.
core/db_models/strategies/EE_Default_Where_Conditions.strategy.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  *
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @since		 	    4.6.0
16 16
  *
17 17
  */
18
-class EE_Default_Where_Conditions{
18
+class EE_Default_Where_Conditions {
19 19
 
20 20
 	/**
21 21
 	 * This const can be used in EE_Default_Where_Conditions values, and at the time of querying it will be
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * onto any field names
49 49
 	 * @param array $custom_where_conditions
50 50
 	 */
51
-	public function __construct( $custom_where_conditions = array() ) {
51
+	public function __construct($custom_where_conditions = array()) {
52 52
 		$this->_where_conditions_provided = $custom_where_conditions;
53 53
 	}
54 54
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * for querying of the model.
60 60
 	 * @param EEM_Base $model
61 61
 	 */
62
-	function _finalize_construct(EEM_Base $model){
62
+	function _finalize_construct(EEM_Base $model) {
63 63
 		$this->_model = $model;
64 64
 	}
65 65
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @param string $model_relation_chain
81 81
 	 * @return array like what's expected in EEM_Base::get_all()'s $query_params[0]
82 82
 	 */
83
-	function get_default_where_conditions( $model_relation_chain = '' ){
84
-		return $this->prepare_where_conditions_for_querying( array_merge( $this->_get_default_where_conditions(), $this->get_where_conditions_provided() ), $model_relation_chain );
83
+	function get_default_where_conditions($model_relation_chain = '') {
84
+		return $this->prepare_where_conditions_for_querying(array_merge($this->_get_default_where_conditions(), $this->get_where_conditions_provided()), $model_relation_chain);
85 85
 	}
86 86
 
87 87
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * Adding model relation chains is handled by the public method get_default_where_conditions
92 92
 	 * @return array
93 93
 	 */
94
-	protected function _get_default_where_conditions(){
94
+	protected function _get_default_where_conditions() {
95 95
 		return array();
96 96
 	}
97 97
 
@@ -105,36 +105,36 @@  discard block
 block discarded – undo
105 105
 	 * @return array
106 106
 	 * @throws \EE_Error
107 107
 	 */
108
-	public function prepare_where_conditions_for_querying( $where_conditions, $model_relation_chain ) {
108
+	public function prepare_where_conditions_for_querying($where_conditions, $model_relation_chain) {
109 109
 		$where_conditions_with_model_relation_chain_prefixes = array();
110
-		if ( ! is_array( $where_conditions ) ) {
110
+		if ( ! is_array($where_conditions)) {
111 111
 			$where_conditions = array();
112 112
 		}
113
-		foreach ( $where_conditions as $key => $value ) {
113
+		foreach ($where_conditions as $key => $value) {
114 114
 			if (
115
-				in_array( $key, array( 'OR', 'AND', 'NOT' ) )
116
-				|| strpos( $key, 'OR*' ) !== false
117
-				|| strpos( $key, 'AND*' ) !== false
118
-				|| strpos( $key, 'NOT*' ) !== false
115
+				in_array($key, array('OR', 'AND', 'NOT'))
116
+				|| strpos($key, 'OR*') !== false
117
+				|| strpos($key, 'AND*') !== false
118
+				|| strpos($key, 'NOT*') !== false
119 119
 			) {
120
-				$where_conditions_with_model_relation_chain_prefixes[ $key ] = $this->prepare_where_conditions_for_querying(
120
+				$where_conditions_with_model_relation_chain_prefixes[$key] = $this->prepare_where_conditions_for_querying(
121 121
 					$value,
122 122
 					$model_relation_chain
123 123
 				);
124 124
 			} else {
125 125
 				if (
126 126
 					$model_relation_chain != ''
127
-					&& $model_relation_chain[ strlen( $model_relation_chain ) - 1 ] != '.'
127
+					&& $model_relation_chain[strlen($model_relation_chain) - 1] != '.'
128 128
 				) {
129
-					$model_relation_chain = $model_relation_chain . ".";
129
+					$model_relation_chain = $model_relation_chain.".";
130 130
 				}
131 131
 				//check for the current user id place holder, and if present change it
132
-				if ( $value === self::current_user_placeholder ) {
132
+				if ($value === self::current_user_placeholder) {
133 133
 					$value = get_current_user_id();
134 134
 				}
135 135
 				//check for user field placeholder
136
-				if ( $key == self::user_field_name_placeholder ) {
137
-					if ( ! $this->_model->wp_user_field_name() ) {
136
+				if ($key == self::user_field_name_placeholder) {
137
+					if ( ! $this->_model->wp_user_field_name()) {
138 138
 						throw new EE_Error(
139 139
 							sprintf(
140 140
 								__(
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 					}
148 148
 					$key = $this->_model->wp_user_field_name();
149 149
 				}
150
-				$where_conditions_with_model_relation_chain_prefixes[ $model_relation_chain . $key ] = $value;
150
+				$where_conditions_with_model_relation_chain_prefixes[$model_relation_chain.$key] = $value;
151 151
 			}
152 152
 		}
153 153
 		return $where_conditions_with_model_relation_chain_prefixes;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 /**
6 6
  *
7 7
  * Class EE_Default_Where_Conditions
8
-  *
8
+ *
9 9
  * Strategy to be used for getting default where conditions for EEM_Base children.
10 10
  * Should be initialized and set on construction of model
11 11
  *
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Factory.lib.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
4
-	exit( 'No direct script access allowed' );
3
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
4
+	exit('No direct script access allowed');
5 5
 }
6 6
 
7 7
 
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 	 * @param \EE_Message_Resource_Manager $Message_Resource_Manager
54 54
 	 * @return \EE_Message_Factory instance
55 55
 	 */
56
-	public static function instance( EE_Message_Resource_Manager $Message_Resource_Manager ) {
56
+	public static function instance(EE_Message_Resource_Manager $Message_Resource_Manager) {
57 57
 		// check if class object is instantiated, and instantiated properly
58
-		if ( ! self::$_instance instanceof EE_Message_Factory ) {
59
-			self::$_instance = new EE_Message_Factory( $Message_Resource_Manager );
58
+		if ( ! self::$_instance instanceof EE_Message_Factory) {
59
+			self::$_instance = new EE_Message_Factory($Message_Resource_Manager);
60 60
 		}
61 61
 		return self::$_instance;
62 62
 	}
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 	 * @param  array $props_n_values
69 69
 	 * @return mixed
70 70
 	 */
71
-	public static function create( $props_n_values = array() ) {
71
+	public static function create($props_n_values = array()) {
72 72
 		/** @type EE_Message_Factory $Message_Factory */
73
-		$Message_Factory = EE_Registry::instance()->load_lib( 'Message_Factory' );
74
-		return $Message_Factory->_create( $props_n_values );
73
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
74
+		return $Message_Factory->_create($props_n_values);
75 75
 	}
76 76
 
77 77
 
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 	 * @return \EE_Message
83 83
 	 * @throws \EE_Error
84 84
 	 */
85
-	public static function set_messenger_and_message_type( EE_Message $message ) {
85
+	public static function set_messenger_and_message_type(EE_Message $message) {
86 86
 		/** @type EE_Message_Factory $Message_Factory */
87
-		$Message_Factory = EE_Registry::instance()->load_lib( 'Message_Factory' );
88
-		return $Message_Factory->_set_messenger_and_message_type( $message );
87
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
88
+		return $Message_Factory->_set_messenger_and_message_type($message);
89 89
 	}
90 90
 
91 91
 
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
 	 * @return \EE_Message
97 97
 	 * @throws \EE_Error
98 98
 	 */
99
-	public static function set_messenger( EE_Message $message ) {
99
+	public static function set_messenger(EE_Message $message) {
100 100
 		/** @type EE_Message_Factory $Message_Factory */
101
-		$Message_Factory = EE_Registry::instance()->load_lib( 'Message_Factory' );
102
-		return $Message_Factory->_set_messenger( $message );
101
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
102
+		return $Message_Factory->_set_messenger($message);
103 103
 	}
104 104
 
105 105
 
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 	 * @return \EE_Message
111 111
 	 * @throws \EE_Error
112 112
 	 */
113
-	public static function set_message_type( EE_Message $message ) {
113
+	public static function set_message_type(EE_Message $message) {
114 114
 		/** @type EE_Message_Factory $Message_Factory */
115
-		$Message_Factory = EE_Registry::instance()->load_lib( 'Message_Factory' );
116
-		return $Message_Factory->_set_message_type( $message );
115
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
116
+		return $Message_Factory->_set_message_type($message);
117 117
 	}
118 118
 
119 119
 
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
 	 * @return \EE_Message
125 125
 	 * @throws \EE_Error
126 126
 	 */
127
-	protected function _create( $props_n_values = array() ) {
127
+	protected function _create($props_n_values = array()) {
128 128
 		$new_instance = false;
129
-		if ( ! empty( $props_n_values['MSG_ID'] ) ) {
130
-			$message = EE_Message::new_instance_from_db( $props_n_values );
129
+		if ( ! empty($props_n_values['MSG_ID'])) {
130
+			$message = EE_Message::new_instance_from_db($props_n_values);
131 131
 		} else {
132
-			$message = EE_Message::new_instance( $props_n_values );
132
+			$message = EE_Message::new_instance($props_n_values);
133 133
 			$new_instance = true;
134 134
 		}
135
-		return $this->_set_messenger_and_message_type( $message, $new_instance );
135
+		return $this->_set_messenger_and_message_type($message, $new_instance);
136 136
 	}
137 137
 
138 138
 
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 	 * @return \EE_Message
145 145
 	 * @throws \EE_Error
146 146
 	 */
147
-	protected function _set_messenger_and_message_type( EE_Message $message, $new_instance = false ) {
148
-		$message = $this->_set_messenger( $message );
149
-		$message = $this->_set_message_type( $message, $new_instance );
147
+	protected function _set_messenger_and_message_type(EE_Message $message, $new_instance = false) {
148
+		$message = $this->_set_messenger($message);
149
+		$message = $this->_set_message_type($message, $new_instance);
150 150
 		return $message;
151 151
 	}
152 152
 
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 	 * @return \EE_Message
159 159
 	 * @throws \EE_Error
160 160
 	 */
161
-	protected function _set_messenger( EE_Message $message ) {
162
-		$messenger = $this->_message_resource_manager->get_messenger( $message->messenger() );
163
-		if ( $messenger instanceof EE_messenger ) {
164
-			$message->set_messenger_object( $messenger );
161
+	protected function _set_messenger(EE_Message $message) {
162
+		$messenger = $this->_message_resource_manager->get_messenger($message->messenger());
163
+		if ($messenger instanceof EE_messenger) {
164
+			$message->set_messenger_object($messenger);
165 165
 		}
166 166
 		return $message;
167 167
 	}
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
 	 * @return \EE_Message
176 176
 	 * @throws \EE_Error
177 177
 	 */
178
-	protected function _set_message_type( EE_Message $message, $new_instance = false ) {
179
-		$message_type = $this->_message_resource_manager->get_message_type( $message->message_type() );
180
-		if ( $message_type instanceof EE_message_type ) {
181
-			$message->set_message_type_object( $message_type, $new_instance );
178
+	protected function _set_message_type(EE_Message $message, $new_instance = false) {
179
+		$message_type = $this->_message_resource_manager->get_message_type($message->message_type());
180
+		if ($message_type instanceof EE_message_type) {
181
+			$message->set_message_type_object($message_type, $new_instance);
182 182
 		}
183 183
 		return $message;
184 184
 	}
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Generated_From_Token.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 	 *                                                This is then used to populate the properties in here.
37 37
 	 * @param   EE_Message_Resource_Manager $message_resource_manager
38 38
 	 */
39
-	public function __construct( $token, $sending_messenger_slug = 'html', EE_Message_Resource_Manager $message_resource_manager ) {
39
+	public function __construct($token, $sending_messenger_slug = 'html', EE_Message_Resource_Manager $message_resource_manager) {
40 40
 		$this->token = $token;
41
-		$this->_sending_messenger = $this->_set_sending_messenger( $sending_messenger_slug, $message_resource_manager );
41
+		$this->_sending_messenger = $this->_set_sending_messenger($sending_messenger_slug, $message_resource_manager);
42 42
 		$this->_message = $this->_generate_message();
43 43
 		//set params for parent from the message object
44 44
 		parent::__construct(
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$sending_messenger_slug,
62 62
 		EE_Message_Resource_Manager $message_resource_manager
63 63
 	) {
64
-		$sending_messenger = $message_resource_manager->get_active_messenger( $sending_messenger_slug );
64
+		$sending_messenger = $message_resource_manager->get_active_messenger($sending_messenger_slug);
65 65
 		return $sending_messenger instanceof EE_messenger ? $sending_messenger : $sending_messenger_slug;
66 66
 	}
67 67
 
@@ -83,27 +83,27 @@  discard block
 block discarded – undo
83 83
 	 * @return EE_Message
84 84
 	 * @throws \EE_Error
85 85
 	 */
86
-	protected function _generate_message( $properties = array() ) {
86
+	protected function _generate_message($properties = array()) {
87 87
 		// a message was generated immediately but the parent class will call this again
88
-		if ( $this->_message instanceof EE_Message ) {
88
+		if ($this->_message instanceof EE_Message) {
89 89
 			return $this->_message;
90 90
 		}
91
-		$message = EEM_Message::instance()->get_one_by_token( $this->token );
92
-		if ( ! $message instanceof EE_Message ) {
91
+		$message = EEM_Message::instance()->get_one_by_token($this->token);
92
+		if ( ! $message instanceof EE_Message) {
93 93
 			throw new EE_Error(
94 94
 				sprintf(
95
-					__( 'Unable to retrieve generated message from DB using given token: "%1$s"', 'event_espresso' ),
95
+					__('Unable to retrieve generated message from DB using given token: "%1$s"', 'event_espresso'),
96 96
 					$this->token
97 97
 				)
98 98
 			);
99 99
 		}
100
-		$message->set_STS_ID( EEM_Message::status_idle );
100
+		$message->set_STS_ID(EEM_Message::status_idle);
101 101
 
102
-		if ( ! $this->_sending_messenger instanceof EE_messenger ) {
103
-			$message->set_STS_ID( EEM_Message::status_failed );
102
+		if ( ! $this->_sending_messenger instanceof EE_messenger) {
103
+			$message->set_STS_ID(EEM_Message::status_failed);
104 104
 			$message->set_error_message(
105 105
 				sprintf(
106
-					__( 'Unable to send message because the "%1$s" messenger is not active or not installed', 'event_espresso' ),
106
+					__('Unable to send message because the "%1$s" messenger is not active or not installed', 'event_espresso'),
107 107
 					$this->_sending_messenger
108 108
 				)
109 109
 			);
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Type_Collection_Loader.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 *
32 32
 	 * @param EE_Message_Type_Collection $message_types
33 33
 	 */
34
-	public function __construct( EE_Message_Type_Collection $message_types ) {
35
-		$this->set_message_type_collection( $message_types );
34
+	public function __construct(EE_Message_Type_Collection $message_types) {
35
+		$this->set_message_type_collection($message_types);
36 36
 	}
37 37
 
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	/**
50 50
 	 * @param mixed $message_types
51 51
 	 */
52
-	public function set_message_type_collection( EE_Message_Type_Collection $message_types ) {
52
+	public function set_message_type_collection(EE_Message_Type_Collection $message_types) {
53 53
 		$this->_message_type_collection = $message_types;
54 54
 	}
55 55
 
@@ -62,41 +62,41 @@  discard block
 block discarded – undo
62 62
 	 * @param  string $folder
63 63
 	 * @throws \EE_Error
64 64
 	 */
65
-	public function load_message_types_from_folder( $folder = '' ) {
65
+	public function load_message_types_from_folder($folder = '') {
66 66
 		//make sure autoloaders are set (fail-safe)
67 67
 		EED_Messages::set_autoloaders();
68
-		$folder = ! empty( $folder ) ? $folder : EE_LIBRARIES . 'messages' . DS . 'message_type';
69
-		$folder .= $folder[ strlen( $folder ) - 1 ] != DS ? DS : '';
68
+		$folder = ! empty($folder) ? $folder : EE_LIBRARIES.'messages'.DS.'message_type';
69
+		$folder .= $folder[strlen($folder) - 1] != DS ? DS : '';
70 70
 		// get all the files in that folder that end in ".class.php
71 71
 		$filepaths = apply_filters(
72 72
 			'FHEE__EE_messages__get_installed__messagetype_files',
73
-			glob( $folder . '*.class.php' )
73
+			glob($folder.'*.class.php')
74 74
 		);
75
-		if ( empty( $filepaths ) ) {
75
+		if (empty($filepaths)) {
76 76
 			return;
77 77
 		}
78
-		foreach ( (array) $filepaths as $file_path ) {
78
+		foreach ((array) $filepaths as $file_path) {
79 79
 			// extract filename from path
80
-			$file_path = basename( $file_path );
80
+			$file_path = basename($file_path);
81 81
 			// now remove any file extensions
82
-			$message_type_class_name = substr( $file_path, 0, strpos( $file_path, '.' ) );
82
+			$message_type_class_name = substr($file_path, 0, strpos($file_path, '.'));
83 83
 
84 84
 			//if this class name doesn't represent a message type class, then we just skip.
85
-			if ( strpos( strtolower( $message_type_class_name ), 'message_type' ) === false ) {
85
+			if (strpos(strtolower($message_type_class_name), 'message_type') === false) {
86 86
 				continue;
87 87
 			}
88 88
 
89
-			if ( ! class_exists( $message_type_class_name ) ) {
89
+			if ( ! class_exists($message_type_class_name)) {
90 90
 				throw new EE_Error(
91 91
 					sprintf(
92
-						__( 'The "%1$s" message type class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso' ),
92
+						__('The "%1$s" message type class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso'),
93 93
 						$message_type_class_name,
94 94
 						$file_path
95 95
 					)
96 96
 				);
97 97
 			}
98 98
 
99
-			$this->_load_message_type( new $message_type_class_name );
99
+			$this->_load_message_type(new $message_type_class_name);
100 100
 		}
101 101
 	}
102 102
 
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 * @param EE_message_type $message_type
107 107
 	 * @return bool
108 108
 	 */
109
-	protected function _load_message_type( EE_message_type $message_type ) {
110
-		if ( $this->message_type_collection()->has_by_name( $message_type->name ) ) {
109
+	protected function _load_message_type(EE_message_type $message_type) {
110
+		if ($this->message_type_collection()->has_by_name($message_type->name)) {
111 111
 			return true;
112 112
 		}
113 113
 		return $this->message_type_collection()->add(
Please login to merge, or discard this patch.