Completed
Branch BUG-10019-unit-test-errors (8de246)
by
unknown
17:30
created
core/db_models/EEM_Venue.model.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * ------------------------------------------------------------------------
23 23
  */
24
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
24
+require_once (EE_MODELS.'EEM_Base.model.php');
25 25
 
26 26
 class EEM_Venue extends EEM_CPT_Base {
27 27
 
28 28
   	// private instance of the Attendee object
29 29
 	protected static $_instance = NULL;
30 30
 
31
-	protected function __construct( $timezone = NULL ) {
32
-		$this->singular_item = __('Venue','event_espresso');
33
-		$this->plural_item = __('Venues','event_espresso');
31
+	protected function __construct($timezone = NULL) {
32
+		$this->singular_item = __('Venue', 'event_espresso');
33
+		$this->plural_item = __('Venues', 'event_espresso');
34 34
 		$this->_tables = array(
35 35
 			'Venue_CPT'=> new EE_Primary_Table('posts', 'ID'),
36 36
 			'Venue_Meta'=>new EE_Secondary_Table('esp_venue_meta', 'VNUM_ID', 'VNU_ID')
@@ -39,32 +39,32 @@  discard block
 block discarded – undo
39 39
 			'Venue_CPT'=>array(
40 40
 				'VNU_ID'=>new EE_Primary_Key_Int_Field('ID', __("Venue ID", "event_espresso")),
41 41
 				'VNU_name'=>new EE_Plain_Text_Field('post_title', __("Venue Name", "event_espresso"), false, ''),
42
-				'VNU_desc'=>new EE_Post_Content_Field('post_content', __("Venue Description", "event_espresso"), false,''),
43
-				'VNU_identifier'=>new EE_Slug_Field('post_name', __("Venue Identifier", "event_espresso"), false,''),
44
-				'VNU_created'=>new EE_Datetime_Field('post_date', __("Date Venue Created", "event_espresso"), FALSE, EE_Datetime_Field::now ),
45
-				'VNU_short_desc'=>new EE_Plain_Text_Field('post_excerpt', __("Short Description of Venue", "event_espresso"), true,''),
46
-				'VNU_modified'=>new EE_Datetime_Field('post_modified', __("Venue Modified Date", "event_espresso"), FALSE, EE_Datetime_Field::now ),
47
-				'VNU_wp_user'=>new EE_WP_User_Field('post_author', __("Venue Creator ID", "event_espresso"), false ),
48
-				'parent'=>new EE_Integer_Field('post_parent', __("Venue Parent ID", "event_espresso"), false,0),
42
+				'VNU_desc'=>new EE_Post_Content_Field('post_content', __("Venue Description", "event_espresso"), false, ''),
43
+				'VNU_identifier'=>new EE_Slug_Field('post_name', __("Venue Identifier", "event_espresso"), false, ''),
44
+				'VNU_created'=>new EE_Datetime_Field('post_date', __("Date Venue Created", "event_espresso"), FALSE, EE_Datetime_Field::now),
45
+				'VNU_short_desc'=>new EE_Plain_Text_Field('post_excerpt', __("Short Description of Venue", "event_espresso"), true, ''),
46
+				'VNU_modified'=>new EE_Datetime_Field('post_modified', __("Venue Modified Date", "event_espresso"), FALSE, EE_Datetime_Field::now),
47
+				'VNU_wp_user'=>new EE_WP_User_Field('post_author', __("Venue Creator ID", "event_espresso"), false),
48
+				'parent'=>new EE_Integer_Field('post_parent', __("Venue Parent ID", "event_espresso"), false, 0),
49 49
 				'VNU_order'=>new EE_Integer_Field('menu_order', __("Venue order", "event_espresso"), false, 1),
50
-				'post_type'=>new EE_WP_Post_Type_Field('espresso_venues'),// EE_Plain_Text_Field('post_type', __("Venue post type", "event_espresso"), false, 'espresso_venues'),
50
+				'post_type'=>new EE_WP_Post_Type_Field('espresso_venues'), // EE_Plain_Text_Field('post_type', __("Venue post type", "event_espresso"), false, 'espresso_venues'),
51 51
 				),
52 52
 			'Venue_Meta'=>array(
53 53
 				'VNUM_ID'=>new EE_DB_Only_Int_Field('VNUM_ID', __("ID of Venue Meta Row", "event_espresso"), false),
54 54
 				'VNU_ID_fk'=>new EE_DB_Only_Int_Field('VNU_ID', __("Foreign Key to Venue Post ", "event_espresso"), false),
55 55
 				'VNU_address'=>new EE_Plain_Text_Field('VNU_address', __("Venue Address line 1", "event_espresso"), true, ''),
56
-				'VNU_address2'=>new EE_Plain_Text_Field('VNU_address2', __("Venue Address line 2", "event_espresso"), true,''),
56
+				'VNU_address2'=>new EE_Plain_Text_Field('VNU_address2', __("Venue Address line 2", "event_espresso"), true, ''),
57 57
 				'VNU_city'=>new EE_Plain_Text_Field('VNU_city', __("Venue City", "event_espresso"), true, ''),
58 58
 				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __("State ID", "event_espresso"), true, null, 'State'),
59 59
 				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __("Country Code", "event_espresso"), true, null, 'Country'),
60 60
 				'VNU_zip'=>new EE_Plain_Text_Field('VNU_zip', __("Venue Zip/Postal Code", "event_espresso"), true),
61 61
 				'VNU_phone'=>new EE_Plain_Text_Field('VNU_phone', __("Venue Phone", "event_espresso"), true),
62
-				'VNU_capacity'=>new EE_Infinite_Integer_Field('VNU_capacity', __("Venue Capacity", "event_espresso"), true,EE_INF),
62
+				'VNU_capacity'=>new EE_Infinite_Integer_Field('VNU_capacity', __("Venue Capacity", "event_espresso"), true, EE_INF),
63 63
 				'VNU_url'=>new EE_Plain_Text_Field('VNU_url', __('Venue Website', 'event_espresso'), true),
64 64
 				'VNU_virtual_phone'=>new EE_Plain_Text_Field('VNU_virtual_phone', __('Call in Number', 'event_espresso'), true),
65
-				'VNU_virtual_url'=>new EE_Plain_Text_Field('VNU_virtual_url', __('Virtual URL', 'event_espresso'), true ),
66
-				'VNU_google_map_link'=>new EE_Plain_Text_Field('VNU_google_map_link', __('Google Map Link', 'event_espresso'), true ),
67
-				'VNU_enable_for_gmap'=>new EE_Boolean_Field('VNU_enable_for_gmap', __('Show Google Map?', 'event_espresso'), false, false )
65
+				'VNU_virtual_url'=>new EE_Plain_Text_Field('VNU_virtual_url', __('Virtual URL', 'event_espresso'), true),
66
+				'VNU_google_map_link'=>new EE_Plain_Text_Field('VNU_google_map_link', __('Google Map Link', 'event_espresso'), true),
67
+				'VNU_enable_for_gmap'=>new EE_Boolean_Field('VNU_enable_for_gmap', __('Show Google Map?', 'event_espresso'), false, false)
68 68
 
69 69
 			));
70 70
 		$this->_model_relations = array(
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 			'WP_User' => new EE_Belongs_To_Relation()
76 76
 		);
77 77
 		//this model is generally available for reading
78
-		$this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
79
-		parent::__construct( $timezone );
78
+		$this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
79
+		parent::__construct($timezone);
80 80
 	}
81 81
 
82 82
 }
Please login to merge, or discard this patch.
core/db_models/EEM_Checkin.model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * ------------------------------------------------------------------------
25 25
  */
26
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
27
-require_once ( EE_CLASSES . 'EE_Checkin.class.php' );
26
+require_once (EE_MODELS.'EEM_Base.model.php');
27
+require_once (EE_CLASSES.'EE_Checkin.class.php');
28 28
 
29 29
 class EEM_Checkin extends EEM_Base {
30 30
 
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 	 * 		@param string $timezone string representing the timezone we want to set for returned Date Time Strings (and any incoming timezone data that gets saved).  Note this just sends the timezone info to the date time model field objects.  Default is NULL (and will be assumed using the set timezone in the 'timezone_string' wp option)
41 41
 	 * 		@return void
42 42
 	 */
43
-	protected function __construct( $timezone = NULL ) {
44
-		$this->singular_item = __('Check-In','event_espresso');
45
-		$this->plural_item = __('Check-Ins','event_espresso');
43
+	protected function __construct($timezone = NULL) {
44
+		$this->singular_item = __('Check-In', 'event_espresso');
45
+		$this->plural_item = __('Check-Ins', 'event_espresso');
46 46
 
47 47
 		$this->_tables = array(
48
-			'Checkin'=>new EE_Primary_Table('esp_checkin','CHK_ID')
48
+			'Checkin'=>new EE_Primary_Table('esp_checkin', 'CHK_ID')
49 49
 		);
50 50
 		$this->_fields = array(
51 51
 			'Checkin'=> array(
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 				'REG_ID'=>new EE_Foreign_Key_Int_Field('REG_ID', 'Registration Id', false, 0, 'Registration'),
54 54
 				'DTT_ID'=>new EE_Foreign_Key_Int_Field('DTT_ID', 'Datetime Id', false, 0, 'Datetime'),
55 55
 				'CHK_in'=>new EE_Boolean_Field('CHK_in', 'Whether a person has checked in or checked out', false, true),
56
-				'CHK_timestamp'=>new EE_Datetime_Field('CHK_timestamp', __('When the row was modified','event_espresso'), false, EE_Datetime_Field::now, $timezone )
56
+				'CHK_timestamp'=>new EE_Datetime_Field('CHK_timestamp', __('When the row was modified', 'event_espresso'), false, EE_Datetime_Field::now, $timezone)
57 57
 			)
58 58
 		);
59 59
 		$this->_model_relations = array(
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			'Datetime'=>new EE_Belongs_To_Relation()
62 62
 		);
63 63
 		$this->_model_chain_to_wp_user = 'Registration.Event';
64
-		parent::__construct( $timezone );
64
+		parent::__construct($timezone);
65 65
 
66 66
 	}
67 67
 
Please login to merge, or discard this patch.
core/db_models/EEM_Change_Log.model.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EEM_Change_Log extends EEM_Base{
28
+class EEM_Change_Log extends EEM_Base {
29 29
 
30 30
 	/**
31 31
 	 * the related object was created log type
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
 	 *	@access protected
69 69
 	 *	@return EEM_Change_Log
70 70
 	 */
71
-	protected function __construct( $timezone = null ){
71
+	protected function __construct($timezone = null) {
72 72
 		global $current_user;
73
-		$this->singular_item = __('Log','event_espresso');
74
-		$this->plural_item = __('Logs','event_espresso');
73
+		$this->singular_item = __('Log', 'event_espresso');
74
+		$this->plural_item = __('Logs', 'event_espresso');
75 75
 		$this->_tables = array(
76 76
 			'Log'=> new EE_Primary_Table('esp_log', 'LOG_ID')
77 77
 		);
78 78
 		$models_this_can_attach_to = array_keys(EE_Registry::instance()->non_abstract_db_models);
79 79
 		$this->_fields = array(
80 80
 			'Log'=>array(
81
-				'LOG_ID'=> new EE_Primary_Key_Int_Field('LOG_ID', __('Log ID','event_espresso')),
82
-				'LOG_time'=>new EE_Datetime_Field('LOG_time', __("Log Time", 'event_espresso'), false, EE_Datetime_Field::now ),
83
-				'OBJ_ID'=>new EE_Foreign_Key_String_Field('OBJ_ID', __("Object ID (int or string)", 'event_espresso'), true, NULL,$models_this_can_attach_to),
81
+				'LOG_ID'=> new EE_Primary_Key_Int_Field('LOG_ID', __('Log ID', 'event_espresso')),
82
+				'LOG_time'=>new EE_Datetime_Field('LOG_time', __("Log Time", 'event_espresso'), false, EE_Datetime_Field::now),
83
+				'OBJ_ID'=>new EE_Foreign_Key_String_Field('OBJ_ID', __("Object ID (int or string)", 'event_espresso'), true, NULL, $models_this_can_attach_to),
84 84
 				'OBJ_type'=>new EE_Any_Foreign_Model_Name_Field('OBJ_type', __("Object Type", 'event_espresso'), true, NULL, $models_this_can_attach_to),
85 85
 				'LOG_type'=>new EE_Enum_Text_Field('LOG_type', __("Type of log entry", "event_espresso"), false, self::type_debug,
86 86
 						array(
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 							self::type_gateway=> __("Gateway Interaction (IPN or Direct Payment)", 'event_espresso'),
93 93
 							)),
94 94
 				'LOG_message'=>new EE_Maybe_Serialized_Text_Field('LOG_message', __("Log Message (body)", 'event_espresso'), true),
95
-				'LOG_wp_user' => new EE_WP_User_Field('LOG_wp_user', __("User who was logged in while this occurred", 'event_espresso'), true ),
95
+				'LOG_wp_user' => new EE_WP_User_Field('LOG_wp_user', __("User who was logged in while this occurred", 'event_espresso'), true),
96 96
 
97 97
 			));
98 98
 		$this->_model_relations = array();
99
-		foreach($models_this_can_attach_to as $model){
100
-			if( $model == 'WP_User' ){
101
-				$this->_model_relations[ $model ] = new EE_Belongs_To_Relation();
102
-			}elseif( $model != 'Change_Log' ) {
99
+		foreach ($models_this_can_attach_to as $model) {
100
+			if ($model == 'WP_User') {
101
+				$this->_model_relations[$model] = new EE_Belongs_To_Relation();
102
+			}elseif ($model != 'Change_Log') {
103 103
 				$this->_model_relations[$model] = new EE_Belongs_To_Any_Relation();
104 104
 			}
105 105
 		}
106 106
 		//use completely custom caps for this
107 107
 		$this->_cap_restriction_generators = false;
108 108
 		//caps-wise this is all-or-nothing: if you have the default role you can access anything, otherwise nothing
109
-		foreach( $this->_cap_contexts_to_cap_action_map as $cap_context => $action ) {
110
-			$this->_cap_restrictions[ $cap_context ][ EE_Restriction_Generator_Base::get_default_restrictions_cap() ] = new EE_Return_None_Where_Conditions();
109
+		foreach ($this->_cap_contexts_to_cap_action_map as $cap_context => $action) {
110
+			$this->_cap_restrictions[$cap_context][EE_Restriction_Generator_Base::get_default_restrictions_cap()] = new EE_Return_None_Where_Conditions();
111 111
 		}
112
-		parent::__construct( $timezone );
112
+		parent::__construct($timezone);
113 113
 	}
114 114
 
115 115
 	/**
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 	 * @param EE_Base_Class $related_model_obj
120 120
 	 * @return EE_Change_Log
121 121
 	 */
122
-	public function log($log_type,$message,$related_model_obj){
123
-		if($related_model_obj instanceof EE_Base_Class){
122
+	public function log($log_type, $message, $related_model_obj) {
123
+		if ($related_model_obj instanceof EE_Base_Class) {
124 124
 			$obj_id = $related_model_obj->ID();
125 125
 			$obj_type = $related_model_obj->get_model()->get_this_model_name();
126
-		}else{
126
+		} else {
127 127
 			$obj_id = NULL;
128 128
 			$obj_type = NULL;
129 129
 		}
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 	 * @throws EE_Error
148 148
 	 * @return EE_Change_Log
149 149
 	 */
150
-	public function gateway_log( $message, $related_obj_id, $related_obj_type ){
151
-		if( ! EE_Registry::instance()->is_model_name($related_obj_type)){
152
-			throw new EE_Error(sprintf(__("'%s' is not a model name. A model name must be provided when making a gateway log. Eg, 'Payment', 'Payment_Method', etc", "event_espresso"),$related_obj_type));
150
+	public function gateway_log($message, $related_obj_id, $related_obj_type) {
151
+		if ( ! EE_Registry::instance()->is_model_name($related_obj_type)) {
152
+			throw new EE_Error(sprintf(__("'%s' is not a model name. A model name must be provided when making a gateway log. Eg, 'Payment', 'Payment_Method', etc", "event_espresso"), $related_obj_type));
153 153
 		}
154 154
 		$log = EE_Change_Log::new_instance(array(
155 155
 				'LOG_type'=>EEM_Change_Log::type_gateway,
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @param array $query_params @see EEM_Base::get_all
169 169
 	 * @return array of arrays
170 170
 	 */
171
-	public function get_all_efficiently($query_params){
171
+	public function get_all_efficiently($query_params) {
172 172
 		return $this->_get_all_wpdb_results($query_params);
173 173
 	}
174 174
 
Please login to merge, or discard this patch.
core/db_models/EEM_Attendee.model.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
2
+require_once (EE_MODELS.'EEM_Base.model.php');
3 3
 
4 4
 /**
5 5
  *
@@ -21,60 +21,60 @@  discard block
 block discarded – undo
21 21
 	 * Please instead use the EEM_Attendee::system_question_* constants
22 22
 	 * @deprecated
23 23
 	 */
24
-	const fname_question_id=1;
24
+	const fname_question_id = 1;
25 25
 
26 26
 	/**
27 27
 	 * @deprecated
28 28
 	 */
29
-	const lname_question_id=2;
29
+	const lname_question_id = 2;
30 30
 
31 31
 
32 32
 	/**
33 33
 	 * @deprecated
34 34
 	 */
35
-	const email_question_id=3;
35
+	const email_question_id = 3;
36 36
 
37 37
 
38 38
 	/**
39 39
 	 * @deprecated
40 40
 	 */
41
-	const address_question_id=4;
41
+	const address_question_id = 4;
42 42
 
43 43
 
44 44
 	/**
45 45
 	 * @deprecated
46 46
 	 */
47
-	const address2_question_id=5;
47
+	const address2_question_id = 5;
48 48
 
49 49
 
50 50
 	/**
51 51
 	 * @deprecated
52 52
 	 */
53
-	const city_question_id=6;
53
+	const city_question_id = 6;
54 54
 
55 55
 
56 56
 	/**
57 57
 	 * @deprecated
58 58
 	 */
59
-	const state_question_id=7;
59
+	const state_question_id = 7;
60 60
 
61 61
 
62 62
 	/**
63 63
 	 * @deprecated
64 64
 	 */
65
-	const country_question_id=8;
65
+	const country_question_id = 8;
66 66
 
67 67
 
68 68
 	/**
69 69
 	 * @deprecated
70 70
 	 */
71
-	const zip_question_id=9;
71
+	const zip_question_id = 9;
72 72
 
73 73
 
74 74
 	/**
75 75
 	 * @deprecated
76 76
 	 */
77
-	const phone_question_id=10;
77
+	const phone_question_id = 10;
78 78
 
79 79
 	/**
80 80
 	 * When looking for questions that correspond to attendee fields,
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * @access protected
120 120
 	 * @param null $timezone
121 121
 	 */
122
-	protected function __construct( $timezone = NULL ) {
123
-		$this->singular_item = __('Attendee','event_espresso');
124
-		$this->plural_item = __('Attendees','event_espresso');
122
+	protected function __construct($timezone = NULL) {
123
+		$this->singular_item = __('Attendee', 'event_espresso');
124
+		$this->plural_item = __('Attendees', 'event_espresso');
125 125
 		$this->_tables = array(
126 126
 			'Attendee_CPT'=> new EE_Primary_Table('posts', 'ID'),
127 127
 			'Attendee_Meta'=>new EE_Secondary_Table('esp_attendee_meta', 'ATTM_ID', 'ATT_ID')
@@ -132,38 +132,38 @@  discard block
 block discarded – undo
132 132
 				'ATT_full_name'=>new EE_Plain_Text_Field('post_title', __("Attendee Full Name", "event_espresso"), false, __("Unknown", "event_espresso")),
133 133
 				'ATT_bio'=>new EE_Post_Content_Field('post_content', __("Attendee Biography", "event_espresso"), false, __("No Biography Provided", "event_espresso")),
134 134
 				'ATT_slug'=>new EE_Slug_Field('post_name', __("Attendee URL Slug", "event_espresso"), false),
135
-				'ATT_created'=>new EE_Datetime_Field('post_date', __("Time Attendee Created", "event_espresso"), false, EE_Datetime_Field::now ),
135
+				'ATT_created'=>new EE_Datetime_Field('post_date', __("Time Attendee Created", "event_espresso"), false, EE_Datetime_Field::now),
136 136
 				'ATT_short_bio'=>new EE_Simple_HTML_Field('post_excerpt', __("Attendee Short Biography", "event_espresso"), true, __("No Biography Provided", "event_espresso")),
137
-				'ATT_modified'=>new EE_Datetime_Field('post_modified', __("Time Attendee Last Modified", "event_espresso"), FALSE, EE_Datetime_Field::now ),
138
-				'ATT_author'=>new EE_WP_User_Field('post_author', __("Creator ID of the first Event attended", "event_espresso"), false ),
137
+				'ATT_modified'=>new EE_Datetime_Field('post_modified', __("Time Attendee Last Modified", "event_espresso"), FALSE, EE_Datetime_Field::now),
138
+				'ATT_author'=>new EE_WP_User_Field('post_author', __("Creator ID of the first Event attended", "event_espresso"), false),
139 139
 				'ATT_parent'=>new EE_DB_Only_Int_Field('post_parent', __("Parent Attendee (unused)", "event_espresso"), false, 0),
140
-				'post_type'=>new EE_WP_Post_Type_Field('espresso_attendees'),// EE_DB_Only_Text_Field('post_type', __("Post Type of Attendee", "event_espresso"), false,'espresso_attendees'),
140
+				'post_type'=>new EE_WP_Post_Type_Field('espresso_attendees'), // EE_DB_Only_Text_Field('post_type', __("Post Type of Attendee", "event_espresso"), false,'espresso_attendees'),
141 141
 				'status' => new EE_WP_Post_Status_Field('post_status', __('Attendee Status', 'event_espresso'), false, 'publish')
142 142
 			),
143 143
 			'Attendee_Meta'=>array(
144
-				'ATTM_ID'=> new EE_DB_Only_Int_Field('ATTM_ID', __('Attendee Meta Row ID','event_espresso'), false),
144
+				'ATTM_ID'=> new EE_DB_Only_Int_Field('ATTM_ID', __('Attendee Meta Row ID', 'event_espresso'), false),
145 145
 				'ATT_ID_fk'=>new EE_DB_Only_Int_Field('ATT_ID', __("Foreign Key to Attendee in Post Table", "event_espresso"), false),
146
-				'ATT_fname'=>new EE_Plain_Text_Field('ATT_fname', __('First Name','event_espresso'), true, ''),
147
-				'ATT_lname'=>new EE_Plain_Text_Field('ATT_lname', __('Last Name','event_espresso'), true, ''),
148
-				'ATT_address'=>new EE_Plain_Text_Field('ATT_address', __('Address Part 1','event_espresso'), true, ''),
149
-				'ATT_address2'=>new EE_Plain_Text_Field('ATT_address2', __('Address Part 2','event_espresso'), true, ''),
150
-				'ATT_city'=>new EE_Plain_Text_Field('ATT_city', __('City','event_espresso'), true, ''),
151
-				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __('State','event_espresso'), true,0,'State'),
152
-				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __('Country','event_espresso'), true,'','Country'),
153
-				'ATT_zip'=>new EE_Plain_Text_Field('ATT_zip', __('ZIP/Postal Code','event_espresso'), true, ''),
154
-				'ATT_email'=>new EE_Email_Field('ATT_email', __('Email Address','event_espresso'), true, ''),
155
-				'ATT_phone'=>new EE_Plain_Text_Field('ATT_phone', __('Phone','event_espresso'), true, '')
146
+				'ATT_fname'=>new EE_Plain_Text_Field('ATT_fname', __('First Name', 'event_espresso'), true, ''),
147
+				'ATT_lname'=>new EE_Plain_Text_Field('ATT_lname', __('Last Name', 'event_espresso'), true, ''),
148
+				'ATT_address'=>new EE_Plain_Text_Field('ATT_address', __('Address Part 1', 'event_espresso'), true, ''),
149
+				'ATT_address2'=>new EE_Plain_Text_Field('ATT_address2', __('Address Part 2', 'event_espresso'), true, ''),
150
+				'ATT_city'=>new EE_Plain_Text_Field('ATT_city', __('City', 'event_espresso'), true, ''),
151
+				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __('State', 'event_espresso'), true, 0, 'State'),
152
+				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __('Country', 'event_espresso'), true, '', 'Country'),
153
+				'ATT_zip'=>new EE_Plain_Text_Field('ATT_zip', __('ZIP/Postal Code', 'event_espresso'), true, ''),
154
+				'ATT_email'=>new EE_Email_Field('ATT_email', __('Email Address', 'event_espresso'), true, ''),
155
+				'ATT_phone'=>new EE_Plain_Text_Field('ATT_phone', __('Phone', 'event_espresso'), true, '')
156 156
 			));
157 157
 		$this->_model_relations = array(
158 158
 			'Registration'=>new EE_Has_Many_Relation(),
159 159
 			'State'=>new EE_Belongs_To_Relation(),
160 160
 			'Country'=>new EE_Belongs_To_Relation(),
161
-			'Event'=>new EE_HABTM_Relation('Registration', FALSE ),
161
+			'Event'=>new EE_HABTM_Relation('Registration', FALSE),
162 162
 			'WP_User' => new EE_Belongs_To_Relation(),
163
-			'Message' => new EE_Has_Many_Any_Relation( false ) //allow deletion of attendees even if they have messages in the queue for them.
163
+			'Message' => new EE_Has_Many_Any_Relation(false) //allow deletion of attendees even if they have messages in the queue for them.
164 164
 		);
165 165
 		$this->_caps_slug = 'contacts';
166
-		parent::__construct( $timezone );
166
+		parent::__construct($timezone);
167 167
 
168 168
 	}
169 169
 
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	 * @param string $system_question_string
174 174
 	 * @return string|null if not found
175 175
 	 */
176
-	public function get_attendee_field_for_system_question( $system_question_string ) {
177
-		return isset( $this->_system_question_to_attendee_field_name[ $system_question_string ] ) ? $this->_system_question_to_attendee_field_name[ $system_question_string ] : null;
176
+	public function get_attendee_field_for_system_question($system_question_string) {
177
+		return isset($this->_system_question_to_attendee_field_name[$system_question_string]) ? $this->_system_question_to_attendee_field_name[$system_question_string] : null;
178 178
 	}
179 179
 
180 180
 
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 	 * @param EE_Transaction/int $transaction_id_or_obj EE_Transaction or its ID
186 186
 	 * @return EE_Attendee[]
187 187
 	 */
188
-	public function get_attendees_for_transaction( $transaction_id_or_obj ){
189
-		return $this->get_all( array( array(
188
+	public function get_attendees_for_transaction($transaction_id_or_obj) {
189
+		return $this->get_all(array(array(
190 190
 			  'Registration.Transaction.TXN_ID' => $transaction_id_or_obj instanceof EE_Transaction ? $transaction_id_or_obj->ID() : $transaction_id_or_obj
191 191
 		  )));
192 192
 	}
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
 	*		@return 		mixed		array on success, FALSE on fail
202 202
 	 * 		@deprecated
203 203
 	*/
204
-	public function get_attendee_by_ID( $ATT_ID = FALSE ) {
204
+	public function get_attendee_by_ID($ATT_ID = FALSE) {
205 205
 		// retrieve a particular EE_Attendee
206
-		return $this->get_one_by_ID( $ATT_ID );
206
+		return $this->get_one_by_ID($ATT_ID);
207 207
 	}
208 208
 
209 209
 
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
 	* 		@param		array $where_cols_n_values
217 217
 	*		@return 		mixed		array on success, FALSE on fail
218 218
 	*/
219
-	public function get_attendee( $where_cols_n_values = array() ) {
219
+	public function get_attendee($where_cols_n_values = array()) {
220 220
 
221
-		if ( empty( $where_cols_n_values )) {
221
+		if (empty($where_cols_n_values)) {
222 222
 			return FALSE;
223 223
 		}
224
-		$attendee = $this->get_all( array($where_cols_n_values ));
225
-		if ( ! empty( $attendee )) {
226
-			return array_shift( $attendee );
224
+		$attendee = $this->get_all(array($where_cols_n_values));
225
+		if ( ! empty($attendee)) {
226
+			return array_shift($attendee);
227 227
 		} else {
228 228
 			return FALSE;
229 229
 		}
@@ -239,20 +239,20 @@  discard block
 block discarded – undo
239 239
 	 * @param array $where_cols_n_values
240 240
 	 * @return bool|mixed
241 241
 	 */
242
-	public function find_existing_attendee( $where_cols_n_values = NULL ) {
242
+	public function find_existing_attendee($where_cols_n_values = NULL) {
243 243
 		// search by combo of first and last names plus the email address
244
-		$attendee_data_keys = array( 'ATT_fname' => $this->_ATT_fname, 'ATT_lname' => $this->_ATT_lname, 'ATT_email' => $this->_ATT_email );
244
+		$attendee_data_keys = array('ATT_fname' => $this->_ATT_fname, 'ATT_lname' => $this->_ATT_lname, 'ATT_email' => $this->_ATT_email);
245 245
 		// no search params means attendee object already exists.
246
-		$where_cols_n_values = is_array( $where_cols_n_values ) && ! empty( $where_cols_n_values ) ? $where_cols_n_values : $attendee_data_keys;
246
+		$where_cols_n_values = is_array($where_cols_n_values) && ! empty($where_cols_n_values) ? $where_cols_n_values : $attendee_data_keys;
247 247
 		$valid_data = TRUE;
248 248
 		// check for required values
249
-		$valid_data = isset( $where_cols_n_values['ATT_fname'] ) && ! empty( $where_cols_n_values['ATT_fname'] ) ? $valid_data : FALSE;
250
-		$valid_data = isset( $where_cols_n_values['ATT_lname'] ) && ! empty( $where_cols_n_values['ATT_lname'] ) ? $valid_data : FALSE;
251
-		$valid_data = isset( $where_cols_n_values['ATT_email'] ) && ! empty( $where_cols_n_values['ATT_email'] ) ? $valid_data : FALSE;
249
+		$valid_data = isset($where_cols_n_values['ATT_fname']) && ! empty($where_cols_n_values['ATT_fname']) ? $valid_data : FALSE;
250
+		$valid_data = isset($where_cols_n_values['ATT_lname']) && ! empty($where_cols_n_values['ATT_lname']) ? $valid_data : FALSE;
251
+		$valid_data = isset($where_cols_n_values['ATT_email']) && ! empty($where_cols_n_values['ATT_email']) ? $valid_data : FALSE;
252 252
 
253
-		if ( $valid_data ) {
254
-			$attendee = $this->get_attendee( $where_cols_n_values );
255
-			if ( $attendee instanceof EE_Attendee ) {
253
+		if ($valid_data) {
254
+			$attendee = $this->get_attendee($where_cols_n_values);
255
+			if ($attendee instanceof EE_Attendee) {
256 256
 				return $attendee;
257 257
 			}
258 258
 		}
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
              * @param  array $ids array of EE_Registration ids
271 271
              * @return  EE_Attendee[]
272 272
              */
273
-            public function get_array_of_contacts_from_reg_ids( $ids ) {
273
+            public function get_array_of_contacts_from_reg_ids($ids) {
274 274
                 $ids = (array) $ids;
275 275
                 $_where = array(
276
-                    'Registration.REG_ID' => array( 'in', $ids )
276
+                    'Registration.REG_ID' => array('in', $ids)
277 277
                     );
278
-                return $this->get_all( array( $_where ) );
278
+                return $this->get_all(array($_where));
279 279
             }
280 280
 
281 281
 
Please login to merge, or discard this patch.