Completed
Branch BUG-7537 (42ca46)
by
unknown
1233:48 queued 1213:30
created
core/db_models/EEM_Status.model.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -1,28 +1,28 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2 2
 /**
3
- * Event Espresso
4
- *
5
- * Event Registration and Management Plugin for WordPress
6
- *
7
- * @ package			Event Espresso
8
- * @ author				Seth Shoultes
9
- * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
10
- * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
11
- * @ link					http://www.eventespresso.com
12
- * @ version		 	4.0
13
- *
14
- * ------------------------------------------------------------------------
15
- */
3
+	 * Event Espresso
4
+	 *
5
+	 * Event Registration and Management Plugin for WordPress
6
+	 *
7
+	 * @ package			Event Espresso
8
+	 * @ author				Seth Shoultes
9
+	 * @ copyright		(c) 2008-2011 Event Espresso  All Rights Reserved.
10
+	 * @ license			http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
11
+	 * @ link					http://www.eventespresso.com
12
+	 * @ version		 	4.0
13
+	 *
14
+	 * ------------------------------------------------------------------------
15
+	 */
16 16
 require_once ( EE_MODELS . 'EEM_Base.model.php' );
17 17
 /**
18
- *
19
- * Class EEM_Status
20
- *
21
- * @package 			Event Espresso
22
- * @subpackage		includes/models/
23
- * @author 				Michael Nelson
24
- * @since                EE4
25
- */
18
+	 *
19
+	 * Class EEM_Status
20
+	 *
21
+	 * @package 			Event Espresso
22
+	 * @subpackage		includes/models/
23
+	 * @author 				Michael Nelson
24
+	 * @since                EE4
25
+	 */
26 26
 class EEM_Status extends EEM_Base {
27 27
 
28 28
   	// private instance of the Attendee object
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function localized_status(  $statuses, $plural = FALSE, $schema = 'upper' ) {
84 84
 		//note these are all in lower case because ucwords() on upper case will NOT convert.
85 85
 		$translation_array = array(
86
-	     	EEM_Registration::status_id_pending_payment => array(
86
+		 	EEM_Registration::status_id_pending_payment => array(
87 87
 				__('pending payment', 'event_espresso'), //singular
88 88
 				__('pending payments', 'event_espresso') //plural
89 89
 			),
@@ -232,37 +232,37 @@  discard block
 block discarded – undo
232 232
 	  			__('trashed', 'event_espresso'),
233 233
 	  			__('trashed', 'event_espresso')
234 234
   			),
235
-	    );
235
+		);
236 236
 
237 237
 		$translation_array = apply_filters( 'FHEE__EEM_Status__localized_status__translation_array', $translation_array );
238 238
 
239 239
 		if ( !is_array($statuses) )
240 240
 			throw new EE_Error( __('The incoming statuses argument must be an array with keys as the $status_id and values as the $status_code', 'event_espresso') );
241 241
 
242
-	    $translation = array();
242
+		$translation = array();
243 243
 
244
-	    foreach ( $statuses as $id => $code ) {
245
-	    	if ( isset( $translation_array[$id] ) ) {
246
-	    		$translation[$id] = $plural ? $translation_array[$id][1] : $translation_array[$id][0];
247
-	    	} else {
248
-	    		$translation[$id] = $code;
249
-	    	}
244
+		foreach ( $statuses as $id => $code ) {
245
+			if ( isset( $translation_array[$id] ) ) {
246
+				$translation[$id] = $plural ? $translation_array[$id][1] : $translation_array[$id][0];
247
+			} else {
248
+				$translation[$id] = $code;
249
+			}
250 250
 
251
-	    	//schema
252
-	    	switch ( $schema ) {
253
-	    		case 'lower' :
254
-	    			$translation[$id] = strtolower( $translation[$id] ); //even though these start in lower case, this will catch any statuses added via filter.
255
-	    			break;
256
-	    		case 'sentence' :
257
-	    			$translation[$id] = ucwords( $translation[$id] );
258
-	    			break;
259
-	    		case 'upper' :
260
-	    			$translation[$id] = strtoupper( $translation[$id] );
261
-	    			break;
262
-	    	}
263
-	    }
251
+			//schema
252
+			switch ( $schema ) {
253
+				case 'lower' :
254
+					$translation[$id] = strtolower( $translation[$id] ); //even though these start in lower case, this will catch any statuses added via filter.
255
+					break;
256
+				case 'sentence' :
257
+					$translation[$id] = ucwords( $translation[$id] );
258
+					break;
259
+				case 'upper' :
260
+					$translation[$id] = strtoupper( $translation[$id] );
261
+					break;
262
+			}
263
+		}
264 264
 
265
-	    return $translation;
265
+		return $translation;
266 266
 	}
267 267
 
268 268
 
Please login to merge, or discard this patch.