@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | * @param null $timezone |
23 | 23 | * @return EE_Event_Message_Template|mixed |
24 | 24 | */ |
25 | - public static function new_instance( $props_n_values = array(), $timezone = NULL ) { |
|
26 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone ); |
|
27 | - return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone ); |
|
25 | + public static function new_instance($props_n_values = array(), $timezone = NULL) { |
|
26 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone); |
|
27 | + return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | * @param null $timezone |
35 | 35 | * @return EE_Event_Message_Template |
36 | 36 | */ |
37 | - public static function new_instance_from_db ( $props_n_values = array(), $timezone = NULL ) { |
|
38 | - return new self( $props_n_values, TRUE, $timezone ); |
|
37 | + public static function new_instance_from_db($props_n_values = array(), $timezone = NULL) { |
|
38 | + return new self($props_n_values, TRUE, $timezone); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -1,18 +1,18 @@ discard block |
||
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 | * Required by EEM_Event_Question_Group in case someone queries for all its model objects |
6 | 6 | */ |
7 | -class EE_Event_Question_Group extends EE_Base_Class{ |
|
7 | +class EE_Event_Question_Group extends EE_Base_Class { |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @param array $props_n_values |
11 | 11 | * @return EE_Event_Question_Group|mixed |
12 | 12 | */ |
13 | - public static function new_instance( $props_n_values = array() ) { |
|
14 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
15 | - return $has_object ? $has_object : new self( $props_n_values); |
|
13 | + public static function new_instance($props_n_values = array()) { |
|
14 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
15 | + return $has_object ? $has_object : new self($props_n_values); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param array $props_n_values |
22 | 22 | * @return EE_Event_Question_Group |
23 | 23 | */ |
24 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
25 | - return new self( $props_n_values, TRUE ); |
|
24 | + public static function new_instance_from_db($props_n_values = array()) { |
|
25 | + return new self($props_n_values, TRUE); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | \ No newline at end of file |
@@ -2,15 +2,15 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Required by EEM_Event_Question_Group in case someone queries for all its model objects |
4 | 4 | */ |
5 | -class EE_Event_Venue extends EE_Base_Class{ |
|
5 | +class EE_Event_Venue extends EE_Base_Class { |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @param array $props_n_values |
9 | 9 | * @return EE_Event_Venue|mixed |
10 | 10 | */ |
11 | - public static function new_instance( $props_n_values = array() ) { |
|
12 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
13 | - return $has_object ? $has_object : new self( $props_n_values); |
|
11 | + public static function new_instance($props_n_values = array()) { |
|
12 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
13 | + return $has_object ? $has_object : new self($props_n_values); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | * @param array $props_n_values |
20 | 20 | * @return EE_Event_Venue |
21 | 21 | */ |
22 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
23 | - return new self( $props_n_values, TRUE ); |
|
22 | + public static function new_instance_from_db($props_n_values = array()) { |
|
23 | + return new self($props_n_values, TRUE); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * @param array $props_n_values |
31 | 31 | * @return EE_Extra_Meta|mixed |
32 | 32 | */ |
33 | - public static function new_instance( $props_n_values = array() ) { |
|
34 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
35 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
33 | + public static function new_instance($props_n_values = array()) { |
|
34 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
35 | + return $has_object ? $has_object : new self($props_n_values); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * @param array $props_n_values |
42 | 42 | * @return EE_Extra_Meta |
43 | 43 | */ |
44 | - public static function new_instance_from_db( $props_n_values = array() ) { |
|
45 | - return new self( $props_n_values, TRUE ); |
|
44 | + public static function new_instance_from_db($props_n_values = array()) { |
|
45 | + return new self($props_n_values, TRUE); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @return int |
53 | 53 | */ |
54 | 54 | function FK_ID() { |
55 | - return $this->get( 'FK_ID' ); |
|
55 | + return $this->get('FK_ID'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | * @param int $FK_ID |
63 | 63 | * @return boolean |
64 | 64 | */ |
65 | - function set_FK_ID( $FK_ID ) { |
|
66 | - $this->set( 'FK_ID', $FK_ID ); |
|
65 | + function set_FK_ID($FK_ID) { |
|
66 | + $this->set('FK_ID', $FK_ID); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @return string |
74 | 74 | */ |
75 | 75 | function model() { |
76 | - return $this->get( 'EXM_model' ); |
|
76 | + return $this->get('EXM_model'); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | * @param string $model |
84 | 84 | * @return boolean |
85 | 85 | */ |
86 | - function set_model( $model ) { |
|
87 | - $this->set( 'EXM_model', $model ); |
|
86 | + function set_model($model) { |
|
87 | + $this->set('EXM_model', $model); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | * @return string |
95 | 95 | */ |
96 | 96 | function key() { |
97 | - return $this->get( 'EXM_key' ); |
|
97 | + return $this->get('EXM_key'); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -104,8 +104,8 @@ discard block |
||
104 | 104 | * @param string $key |
105 | 105 | * @return boolean |
106 | 106 | */ |
107 | - function set_key( $key ) { |
|
108 | - $this->set( 'EXM_key', $key ); |
|
107 | + function set_key($key) { |
|
108 | + $this->set('EXM_key', $key); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @return string |
116 | 116 | */ |
117 | 117 | function value() { |
118 | - return $this->get( 'EXM_value' ); |
|
118 | + return $this->get('EXM_value'); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * @param string $value |
126 | 126 | * @return boolean |
127 | 127 | */ |
128 | - function set_value( $value ) { |
|
129 | - $this->set( 'EXM_value', $value ); |
|
128 | + function set_value($value) { |
|
129 | + $this->set('EXM_value', $value); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Sets meta_id |
62 | 62 | * @param int $meta_id |
63 | - * @return boolean |
|
63 | + * @return boolean|null |
|
64 | 64 | */ |
65 | 65 | function set_meta_id( $meta_id) { |
66 | 66 | return $this->set( 'meta_id', $meta_id); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Sets post_id |
80 | 80 | * @param int $post_id |
81 | - * @return boolean |
|
81 | + * @return boolean|null |
|
82 | 82 | */ |
83 | 83 | function set_post_id( $post_id) { |
84 | 84 | return $this->set( 'post_id', $post_id); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | /** |
97 | 97 | * Sets meta_key |
98 | 98 | * @param string $meta_key |
99 | - * @return boolean |
|
99 | + * @return boolean|null |
|
100 | 100 | */ |
101 | 101 | function set_meta_key( $meta_key) { |
102 | 102 | return $this->set( 'meta_key', $meta_key); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * Sets meta_value |
116 | 116 | * @param mixed $meta_value |
117 | - * @return boolean |
|
117 | + * @return boolean|null |
|
118 | 118 | */ |
119 | 119 | function set_meta_value( $meta_value) { |
120 | 120 | return $this->set( 'meta_value', $meta_value); |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | * @param string $timezone |
35 | 35 | * @return EE_Message_Template|mixed |
36 | 36 | */ |
37 | - public static function new_instance( $props_n_values = array(), $timezone = '' ) { |
|
38 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone ); |
|
39 | - return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone ); |
|
37 | + public static function new_instance($props_n_values = array(), $timezone = '') { |
|
38 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone); |
|
39 | + return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | * @param string $timezone |
47 | 47 | * @return EE_Message_Template |
48 | 48 | */ |
49 | - public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) { |
|
50 | - return new self( $props_n_values, TRUE, $timezone ); |
|
49 | + public static function new_instance_from_db($props_n_values = array(), $timezone = '') { |
|
50 | + return new self($props_n_values, TRUE, $timezone); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | * @param bool $GRP_ID |
57 | 57 | * @throws EE_Error |
58 | 58 | */ |
59 | - public function set_group_template_id( $GRP_ID = FALSE ) { |
|
60 | - if ( ! $GRP_ID ) { |
|
61 | - throw new EE_Error( __( 'Missing required value for the message template group id', 'event_espresso' ) ); |
|
59 | + public function set_group_template_id($GRP_ID = FALSE) { |
|
60 | + if ( ! $GRP_ID) { |
|
61 | + throw new EE_Error(__('Missing required value for the message template group id', 'event_espresso')); |
|
62 | 62 | } |
63 | - $this->set( 'GRP_ID', $GRP_ID ); |
|
63 | + $this->set('GRP_ID', $GRP_ID); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @return int |
72 | 72 | */ |
73 | 73 | public function GRP_ID() { |
74 | - return $this->get( 'GRP_ID' ); |
|
74 | + return $this->get('GRP_ID'); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @return int |
83 | 83 | */ |
84 | 84 | public function user() { |
85 | - return $this->get_first_related( 'Message_Template_Group' )->get( 'MTP_user_id' ); |
|
85 | + return $this->get_first_related('Message_Template_Group')->get('MTP_user_id'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @return string |
94 | 94 | */ |
95 | 95 | public function messenger() { |
96 | - return $this->get_first_related( 'Message_Template_Group' )->messenger(); |
|
96 | + return $this->get_first_related('Message_Template_Group')->messenger(); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @return object Messenger Object for the given messenger |
106 | 106 | */ |
107 | 107 | public function messenger_obj() { |
108 | - return $this->get_first_related( 'Message_Template_Group' )->messenger_obj(); |
|
108 | + return $this->get_first_related('Message_Template_Group')->messenger_obj(); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return string |
118 | 118 | */ |
119 | 119 | public function message_type() { |
120 | - return $this->get_first_related( 'Message_Template_Group' )->message_type(); |
|
120 | + return $this->get_first_related('Message_Template_Group')->message_type(); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * @return object Message Type object for the given message type |
130 | 130 | */ |
131 | 131 | public function message_type_obj() { |
132 | - return $this->get_first_related( 'Message_Template_Group' )->message_type_obj(); |
|
132 | + return $this->get_first_related('Message_Template_Group')->message_type_obj(); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | * @return array array of contexts and their configuration. |
142 | 142 | */ |
143 | 143 | public function contexts_config() { |
144 | - return $this->get_first_related( 'Message_Template_Group' )->contexts_config(); |
|
144 | + return $this->get_first_related('Message_Template_Group')->contexts_config(); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @return string label for "context" |
154 | 154 | */ |
155 | 155 | public function context_label() { |
156 | - return $this->get_first_related( 'Message_Template_Group' )->context_label(); |
|
156 | + return $this->get_first_related('Message_Template_Group')->context_label(); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | * @return boolean true if it is, false if it isn't |
164 | 164 | */ |
165 | 165 | public function is_global() { |
166 | - return $this->get_first_related( 'Message_Template_Group' )->is_global(); |
|
166 | + return $this->get_first_related('Message_Template_Group')->is_global(); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @return boolean true if it is, false if it isn't |
174 | 174 | */ |
175 | 175 | public function is_active() { |
176 | - return $this->get_first_related( 'Message_Template_Group' )->is_active(); |
|
176 | + return $this->get_first_related('Message_Template_Group')->is_active(); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | * @param array $fields what fields we're returning valid shortcodes for. If empty then we assume all fields are to be merged and returned. |
187 | 187 | * @return mixed (array|bool) an array of shortcodes in the format array( '[shortcode] => 'label') OR FALSE if no shortcodes found. |
188 | 188 | */ |
189 | - public function get_shortcodes( $context, $fields = array() ) { |
|
190 | - return $this->get_first_related( 'Message_Template_Group' )->get_shortcodes( $context, $fields ); |
|
189 | + public function get_shortcodes($context, $fields = array()) { |
|
190 | + return $this->get_first_related('Message_Template_Group')->get_shortcodes($context, $fields); |
|
191 | 191 | } |
192 | 192 | } |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param array $props_n_values |
33 | 33 | * @return EE_Price_Type |
34 | 34 | */ |
35 | - public static function new_instance( $props_n_values = array() ) { |
|
36 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
37 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
35 | + public static function new_instance($props_n_values = array()) { |
|
36 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
37 | + return $has_object ? $has_object : new self($props_n_values); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | * @param array $props_n_values |
44 | 44 | * @return EE_Price_Type |
45 | 45 | */ |
46 | - public static function new_instance_from_db( $props_n_values = array() ) { |
|
47 | - return new self( $props_n_values, TRUE ); |
|
46 | + public static function new_instance_from_db($props_n_values = array()) { |
|
47 | + return new self($props_n_values, TRUE); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | * @access public |
56 | 56 | * @param string $PRT_name |
57 | 57 | */ |
58 | - public function set_name( $PRT_name = '' ) { |
|
59 | - $this->set( 'PRT_name', $PRT_name ); |
|
58 | + public function set_name($PRT_name = '') { |
|
59 | + $this->set('PRT_name', $PRT_name); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | * @access public |
68 | 68 | * @param bool $PRT_is_percent |
69 | 69 | */ |
70 | - public function set_is_percent( $PRT_is_percent = FALSE ) { |
|
71 | - $this->set( 'PRT_is_percent', $PRT_is_percent ); |
|
70 | + public function set_is_percent($PRT_is_percent = FALSE) { |
|
71 | + $this->set('PRT_is_percent', $PRT_is_percent); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | * @access public |
80 | 80 | * @param int $PRT_order |
81 | 81 | */ |
82 | - public function set_order( $PRT_order = 0 ) { |
|
83 | - $this->set( 'PRT_order', $PRT_order ); |
|
82 | + public function set_order($PRT_order = 0) { |
|
83 | + $this->set('PRT_order', $PRT_order); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * |
90 | 90 | */ |
91 | 91 | public function move_to_trash() { |
92 | - $this->set( 'PRT_deleted', TRUE ); |
|
92 | + $this->set('PRT_deleted', TRUE); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | */ |
100 | 100 | public function restore_from_trash() { |
101 | - $this->set( 'PRT_deleted', FALSE ); |
|
101 | + $this->set('PRT_deleted', FALSE); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @access public |
109 | 109 | */ |
110 | 110 | public function name() { |
111 | - return $this->get( 'PRT_name' ); |
|
111 | + return $this->get('PRT_name'); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * @access public |
119 | 119 | */ |
120 | 120 | public function base_type() { |
121 | - return $this->get( 'PBT_ID' ); |
|
121 | + return $this->get('PBT_ID'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @return mixed |
128 | 128 | */ |
129 | 129 | public function base_type_name() { |
130 | - return $this->get_pretty( 'PBT_ID' ); |
|
130 | + return $this->get_pretty('PBT_ID'); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @access public |
138 | 138 | */ |
139 | 139 | public function is_percent() { |
140 | - return $this->get( 'PRT_is_percent' ); |
|
140 | + return $this->get('PRT_is_percent'); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @return bool |
147 | 147 | */ |
148 | 148 | public function is_discount() { |
149 | - return $this->get( 'PBT_ID' ) == 2 ? TRUE : FALSE; |
|
149 | + return $this->get('PBT_ID') == 2 ? TRUE : FALSE; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @access public |
170 | 170 | */ |
171 | 171 | public function order() { |
172 | - return $this->get( 'PRT_order' ); |
|
172 | + return $this->get('PRT_order'); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | * @access public |
180 | 180 | */ |
181 | 181 | public function deleted() { |
182 | - return $this->get( 'PRT_deleted' ); |
|
182 | + return $this->get('PRT_deleted'); |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @param array $props_n_values |
33 | 33 | * @return EE_Question_Group|mixed |
34 | 34 | */ |
35 | - public static function new_instance( $props_n_values = array() ) { |
|
36 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
37 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
35 | + public static function new_instance($props_n_values = array()) { |
|
36 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
37 | + return $has_object ? $has_object : new self($props_n_values); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | * @param array $props_n_values |
44 | 44 | * @return EE_Question_Group |
45 | 45 | */ |
46 | - public static function new_instance_from_db( $props_n_values = array() ) { |
|
47 | - return new self( $props_n_values, TRUE ); |
|
46 | + public static function new_instance_from_db($props_n_values = array()) { |
|
47 | + return new self($props_n_values, TRUE); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | * @param bool $pretty |
56 | 56 | * @return string |
57 | 57 | */ |
58 | - public function name( $pretty = FALSE ) { |
|
59 | - return $pretty ? $this->get_pretty( 'QSG_name' ) : $this->get( 'QSG_name' ); |
|
58 | + public function name($pretty = FALSE) { |
|
59 | + return $pretty ? $this->get_pretty('QSG_name') : $this->get('QSG_name'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @return string |
69 | 69 | */ |
70 | 70 | public function identifier() { |
71 | - return $this->get( 'QSG_identifier' ); |
|
71 | + return $this->get('QSG_identifier'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | * @param bool $pretty |
80 | 80 | * @return string |
81 | 81 | */ |
82 | - public function desc( $pretty = FALSE ) { |
|
83 | - return $pretty ? $this->get_pretty( 'QSG_desc' ) : $this->get( 'QSG_desc' ); |
|
82 | + public function desc($pretty = FALSE) { |
|
83 | + return $pretty ? $this->get_pretty('QSG_desc') : $this->get('QSG_desc'); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @return int |
93 | 93 | */ |
94 | 94 | public function order() { |
95 | - return $this->get( 'QSG_order' ); |
|
95 | + return $this->get('QSG_order'); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @return boolean |
104 | 104 | */ |
105 | 105 | public function show_group_name() { |
106 | - return $this->get( 'QSG_show_group_name' ); |
|
106 | + return $this->get('QSG_show_group_name'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @return boolean |
116 | 116 | */ |
117 | 117 | public function show_group_desc() { |
118 | - return $this->get( 'QSG_show_group_desc' ); |
|
118 | + return $this->get('QSG_show_group_desc'); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @return boolean |
129 | 129 | */ |
130 | 130 | public function system_group() { |
131 | - return $this->get( 'QSG_system' ); |
|
131 | + return $this->get('QSG_system'); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @return boolean |
154 | 154 | */ |
155 | 155 | public function deleted() { |
156 | - return $this->get( 'QST_deleted' ); |
|
156 | + return $this->get('QST_deleted'); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function questions_in_and_not_in_group() { |
166 | 166 | $questions_in_group = $this->questions(); |
167 | - $exclude_question_ids = ! empty( $questions_in_group ) ? array_keys( $questions_in_group ) : array(); |
|
168 | - $questions_not_in_group = $this->questions_not_in_group( $exclude_question_ids ); |
|
167 | + $exclude_question_ids = ! empty($questions_in_group) ? array_keys($questions_in_group) : array(); |
|
168 | + $questions_not_in_group = $this->questions_not_in_group($exclude_question_ids); |
|
169 | 169 | return $questions_in_group + $questions_not_in_group; |
170 | 170 | } |
171 | 171 | |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | * @param array $query_params |
177 | 177 | * @return EE_Question[] |
178 | 178 | */ |
179 | - public function questions( $query_params = array() ) { |
|
180 | - $query_params = ! empty( $query_params ) ? $query_params : array( 'order_by' => array( 'Question_Group_Question.QGQ_order' => 'ASC' ) ); |
|
181 | - return $this->ID() ? $this->get_many_related( 'Question', $query_params ) : array(); |
|
179 | + public function questions($query_params = array()) { |
|
180 | + $query_params = ! empty($query_params) ? $query_params : array('order_by' => array('Question_Group_Question.QGQ_order' => 'ASC')); |
|
181 | + return $this->ID() ? $this->get_many_related('Question', $query_params) : array(); |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | |
@@ -188,14 +188,14 @@ discard block |
||
188 | 188 | * @param mixed $question_IDS_in_group if empty array then all questions returned. if FALSE then we first get questions in this group and exclude them from questions get all. IF empty array then we just return all questions. |
189 | 189 | * @return EE_Question[] |
190 | 190 | */ |
191 | - public function questions_not_in_group( $question_IDS_in_group = FALSE ) { |
|
192 | - if ( $question_IDS_in_group === FALSE ) { |
|
191 | + public function questions_not_in_group($question_IDS_in_group = FALSE) { |
|
192 | + if ($question_IDS_in_group === FALSE) { |
|
193 | 193 | $questions = $this->questions(); |
194 | - $question_IDS_in_group = ! empty( $questions ) ? array_keys( $questions ) : array(); |
|
194 | + $question_IDS_in_group = ! empty($questions) ? array_keys($questions) : array(); |
|
195 | 195 | } |
196 | - $_where = ! empty( $question_IDS_in_group ) ? array( 'QST_ID' => array( 'not_in', $question_IDS_in_group ) ) : array(); |
|
196 | + $_where = ! empty($question_IDS_in_group) ? array('QST_ID' => array('not_in', $question_IDS_in_group)) : array(); |
|
197 | 197 | |
198 | - return EEM_Question::instance()->get_all( array( $_where, 'order_by' => array( 'QST_ID' => 'ASC' ) ) ); |
|
198 | + return EEM_Question::instance()->get_all(array($_where, 'order_by' => array('QST_ID' => 'ASC'))); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | * @return EE_Event[] |
206 | 206 | */ |
207 | 207 | public function events() { |
208 | - return $this->get_many_related( 'Event' ); |
|
208 | + return $this->get_many_related('Event'); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | * @param EE_Question || int $question object or ID |
216 | 216 | * @return boolean if successful |
217 | 217 | */ |
218 | - public function add_question( $questionObjectOrID ) { |
|
219 | - return $this->_add_relation_to( $questionObjectOrID, 'Question' ); |
|
218 | + public function add_question($questionObjectOrID) { |
|
219 | + return $this->_add_relation_to($questionObjectOrID, 'Question'); |
|
220 | 220 | } |
221 | 221 | |
222 | 222 | |
@@ -226,8 +226,8 @@ discard block |
||
226 | 226 | * @param EE_Question || int $question object or ID |
227 | 227 | * @return boolean of success |
228 | 228 | */ |
229 | - public function remove_question( $questionObjectOrID ) { |
|
230 | - return $this->_remove_relation_to( $questionObjectOrID, 'Question' ); |
|
229 | + public function remove_question($questionObjectOrID) { |
|
230 | + return $this->_remove_relation_to($questionObjectOrID, 'Question'); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 | |
@@ -237,9 +237,9 @@ discard block |
||
237 | 237 | * @param $qst_order |
238 | 238 | * @return int |
239 | 239 | */ |
240 | - public function update_question_order( $questionObjectOrID, $qst_order ) { |
|
241 | - $qst_ID = $questionObjectOrID instanceof EE_Question ? $questionObjectOrID->ID() : (int)$questionObjectOrID; |
|
242 | - return EEM_Question_Group_Question::instance()->update( array( 'QGQ_order' => $qst_order ), array( array( 'QST_ID' => $qst_ID, 'QSG_ID' => $this->ID() ) ) ); |
|
240 | + public function update_question_order($questionObjectOrID, $qst_order) { |
|
241 | + $qst_ID = $questionObjectOrID instanceof EE_Question ? $questionObjectOrID->ID() : (int) $questionObjectOrID; |
|
242 | + return EEM_Question_Group_Question::instance()->update(array('QGQ_order' => $qst_order), array(array('QST_ID' => $qst_ID, 'QSG_ID' => $this->ID()))); |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | |
@@ -250,9 +250,9 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function has_questions_with_answers() { |
252 | 252 | $has_answers = FALSE; |
253 | - $questions = $this->get_many_related( 'Question' ); |
|
254 | - foreach ( $questions as $question ) { |
|
255 | - if ( $question->count_related( 'Answer' ) > 0 ) |
|
253 | + $questions = $this->get_many_related('Question'); |
|
254 | + foreach ($questions as $question) { |
|
255 | + if ($question->count_related('Answer') > 0) |
|
256 | 256 | $has_answers = TRUE; |
257 | 257 | } |
258 | 258 | return $has_answers; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function set_order_to_latest() { |
270 | 270 | $latest_order = $this->get_model()->get_latest_question_group_order(); |
271 | - $latest_order ++; |
|
272 | - $this->set( 'QSG_order', $latest_order ); |
|
271 | + $latest_order++; |
|
272 | + $this->set('QSG_order', $latest_order); |
|
273 | 273 | } |
274 | 274 | } |
@@ -252,8 +252,9 @@ |
||
252 | 252 | $has_answers = FALSE; |
253 | 253 | $questions = $this->get_many_related( 'Question' ); |
254 | 254 | foreach ( $questions as $question ) { |
255 | - if ( $question->count_related( 'Answer' ) > 0 ) |
|
256 | - $has_answers = TRUE; |
|
255 | + if ( $question->count_related( 'Answer' ) > 0 ) { |
|
256 | + $has_answers = TRUE; |
|
257 | + } |
|
257 | 258 | } |
258 | 259 | return $has_answers; |
259 | 260 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | /** |
214 | 214 | * Adds the question to this question group |
215 | 215 | * @param EE_Question || int $question object or ID |
216 | - * @return boolean if successful |
|
216 | + * @return EE_Base_Class if successful |
|
217 | 217 | */ |
218 | 218 | public function add_question( $questionObjectOrID ) { |
219 | 219 | return $this->_add_relation_to( $questionObjectOrID, 'Question' ); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | /** |
225 | 225 | * Removes the question from this question group |
226 | 226 | * @param EE_Question || int $question object or ID |
227 | - * @return boolean of success |
|
227 | + * @return EE_Base_Class of success |
|
228 | 228 | */ |
229 | 229 | public function remove_question( $questionObjectOrID ) { |
230 | 230 | return $this->_remove_relation_to( $questionObjectOrID, 'Question' ); |
@@ -2,15 +2,15 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Required by EEM_Question_Group_Question in case someone queries for all its model objects |
4 | 4 | */ |
5 | -class EE_Question_Group_Question extends EE_Base_Class{ |
|
5 | +class EE_Question_Group_Question extends EE_Base_Class { |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @param array $props_n_values |
9 | 9 | * @return EE_Question_Group_Question|mixed |
10 | 10 | */ |
11 | - public static function new_instance( $props_n_values = array() ) { |
|
12 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
13 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
11 | + public static function new_instance($props_n_values = array()) { |
|
12 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
13 | + return $has_object ? $has_object : new self($props_n_values); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param array $props_n_values |
20 | 20 | * @return EE_Question_Group_Question |
21 | 21 | */ |
22 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
23 | - return new self( $props_n_values, TRUE ); |
|
22 | + public static function new_instance_from_db($props_n_values = array()) { |
|
23 | + return new self($props_n_values, TRUE); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | parent::set( 'STS_ID', $new_STS_ID, $use_default ); |
127 | 127 | do_action( 'AHEE__EE_Registration__set_status__after_update', $this ); |
128 | 128 | return TRUE; |
129 | - }else{ |
|
129 | + } else{ |
|
130 | 130 | //even though the old value matches the new value, it's still good to |
131 | 131 | //allow the parent set method to have a say |
132 | 132 | parent::set( 'STS_ID', $new_STS_ID, $use_default ); |
@@ -625,8 +625,9 @@ discard block |
||
625 | 625 | * @return EE_Registration |
626 | 626 | */ |
627 | 627 | public function get_primary_registration() { |
628 | - if ( $this->is_primary_registrant() ) |
|
629 | - return $this; |
|
628 | + if ( $this->is_primary_registrant() ) { |
|
629 | + return $this; |
|
630 | + } |
|
630 | 631 | |
631 | 632 | //k reg_count !== 1 so let's get the EE_Registration object matching this txn_id and reg_count == 1 |
632 | 633 | $primary_registrant = EEM_Registration::instance()->get_one( array( array('TXN_ID' => $this->transaction_ID(), 'REG_count' => 1 ) ) ); |
@@ -618,9 +618,9 @@ |
||
618 | 618 | |
619 | 619 | |
620 | 620 | /** |
621 | - * get Attendee Number |
|
622 | - * @access public |
|
623 | - */ |
|
621 | + * get Attendee Number |
|
622 | + * @access public |
|
623 | + */ |
|
624 | 624 | public function count() { |
625 | 625 | return $this->get( 'REG_count' ); |
626 | 626 | } |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php use EventEspresso\core\exceptions\EntityNotFoundException; |
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 | * EE_Registration class |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | * date_format and the second value is the time format |
44 | 44 | * @return EE_Registration |
45 | 45 | */ |
46 | - public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) { |
|
47 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats ); |
|
48 | - return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats ); |
|
46 | + public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) { |
|
47 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats); |
|
48 | + return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | * the website will be used. |
57 | 57 | * @return EE_Registration |
58 | 58 | */ |
59 | - public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) { |
|
60 | - return new self( $props_n_values, TRUE, $timezone ); |
|
59 | + public static function new_instance_from_db($props_n_values = array(), $timezone = null) { |
|
60 | + return new self($props_n_values, TRUE, $timezone); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | * @access public |
69 | 69 | * @param int $EVT_ID Event ID |
70 | 70 | */ |
71 | - public function set_event( $EVT_ID = 0 ) { |
|
72 | - $this->set( 'EVT_ID', $EVT_ID ); |
|
71 | + public function set_event($EVT_ID = 0) { |
|
72 | + $this->set('EVT_ID', $EVT_ID); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | |
@@ -80,18 +80,18 @@ discard block |
||
80 | 80 | * @param mixed $field_value |
81 | 81 | * @param bool $use_default |
82 | 82 | */ |
83 | - public function set( $field_name, $field_value, $use_default = FALSE ) { |
|
84 | - switch( $field_name ) { |
|
83 | + public function set($field_name, $field_value, $use_default = FALSE) { |
|
84 | + switch ($field_name) { |
|
85 | 85 | case 'REG_code' : |
86 | - if ( ! empty( $field_value ) && $this->reg_code() == '' ) { |
|
87 | - $this->set_reg_code( $field_value, $use_default ); |
|
86 | + if ( ! empty($field_value) && $this->reg_code() == '') { |
|
87 | + $this->set_reg_code($field_value, $use_default); |
|
88 | 88 | } |
89 | 89 | break; |
90 | 90 | case 'STS_ID' : |
91 | - $this->set_status( $field_value, $use_default ); |
|
91 | + $this->set_status($field_value, $use_default); |
|
92 | 92 | break; |
93 | 93 | default : |
94 | - parent::set( $field_name, $field_value, $use_default ); |
|
94 | + parent::set($field_name, $field_value, $use_default); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
@@ -109,30 +109,30 @@ discard block |
||
109 | 109 | * @return bool |
110 | 110 | * @throws \EE_Error |
111 | 111 | */ |
112 | - public function set_status( $new_STS_ID = NULL, $use_default = FALSE ) { |
|
112 | + public function set_status($new_STS_ID = NULL, $use_default = FALSE) { |
|
113 | 113 | // get current REG_Status |
114 | 114 | $old_STS_ID = $this->status_ID(); |
115 | 115 | // if status has changed |
116 | - if ( $old_STS_ID !== $new_STS_ID ) { |
|
116 | + if ($old_STS_ID !== $new_STS_ID) { |
|
117 | 117 | // TO approved |
118 | - if ( $new_STS_ID === EEM_Registration::status_id_approved ) { |
|
118 | + if ($new_STS_ID === EEM_Registration::status_id_approved) { |
|
119 | 119 | // reserve a space by incrementing ticket and datetime sold values |
120 | 120 | $this->_reserve_registration_space(); |
121 | - do_action( 'AHEE__EE_Registration__set_status__to_approved', $this, $old_STS_ID, $new_STS_ID ); |
|
121 | + do_action('AHEE__EE_Registration__set_status__to_approved', $this, $old_STS_ID, $new_STS_ID); |
|
122 | 122 | // OR FROM approved |
123 | - } else if ( $old_STS_ID === EEM_Registration::status_id_approved ) { |
|
123 | + } else if ($old_STS_ID === EEM_Registration::status_id_approved) { |
|
124 | 124 | // release a space by decrementing ticket and datetime sold values |
125 | 125 | $this->_release_registration_space(); |
126 | - do_action( 'AHEE__EE_Registration__set_status__from_approved', $this, $old_STS_ID, $new_STS_ID ); |
|
126 | + do_action('AHEE__EE_Registration__set_status__from_approved', $this, $old_STS_ID, $new_STS_ID); |
|
127 | 127 | } |
128 | 128 | // update status |
129 | - parent::set( 'STS_ID', $new_STS_ID, $use_default ); |
|
130 | - do_action( 'AHEE__EE_Registration__set_status__after_update', $this ); |
|
129 | + parent::set('STS_ID', $new_STS_ID, $use_default); |
|
130 | + do_action('AHEE__EE_Registration__set_status__after_update', $this); |
|
131 | 131 | return TRUE; |
132 | - }else{ |
|
132 | + } else { |
|
133 | 133 | //even though the old value matches the new value, it's still good to |
134 | 134 | //allow the parent set method to have a say |
135 | - parent::set( 'STS_ID', $new_STS_ID, $use_default ); |
|
135 | + parent::set('STS_ID', $new_STS_ID, $use_default); |
|
136 | 136 | return TRUE; |
137 | 137 | } |
138 | 138 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * @access public |
145 | 145 | */ |
146 | 146 | public function status_ID() { |
147 | - return $this->get( 'STS_ID' ); |
|
147 | + return $this->get('STS_ID'); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | * @param boolean $include_archived whether to include archived tickets or not. |
170 | 170 | * @return EE_Ticket |
171 | 171 | */ |
172 | - public function ticket( $include_archived = TRUE ) { |
|
172 | + public function ticket($include_archived = TRUE) { |
|
173 | 173 | $query_params = array(); |
174 | - if ( $include_archived ) { |
|
175 | - $query_params[ 'default_where_conditions' ] = 'none'; |
|
174 | + if ($include_archived) { |
|
175 | + $query_params['default_where_conditions'] = 'none'; |
|
176 | 176 | } |
177 | - return $this->get_first_related( 'Ticket', $query_params ); |
|
177 | + return $this->get_first_related('Ticket', $query_params); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function wp_user() { |
204 | 204 | $event = $this->event(); |
205 | - if ( $event instanceof EE_Event ) { |
|
205 | + if ($event instanceof EE_Event) { |
|
206 | 206 | return $event->wp_user(); |
207 | 207 | } |
208 | 208 | return 0; |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | * @access public |
229 | 229 | * @param int $ATT_ID Attendee ID |
230 | 230 | */ |
231 | - public function set_attendee_id( $ATT_ID = 0 ) { |
|
232 | - $this->set( 'ATT_ID', $ATT_ID ); |
|
231 | + public function set_attendee_id($ATT_ID = 0) { |
|
232 | + $this->set('ATT_ID', $ATT_ID); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | * @access public |
241 | 241 | * @param int $TXN_ID Transaction ID |
242 | 242 | */ |
243 | - public function set_transaction_id( $TXN_ID = 0 ) { |
|
244 | - $this->set( 'TXN_ID', $TXN_ID ); |
|
243 | + public function set_transaction_id($TXN_ID = 0) { |
|
244 | + $this->set('TXN_ID', $TXN_ID); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | |
@@ -252,8 +252,8 @@ discard block |
||
252 | 252 | * @access public |
253 | 253 | * @param string $REG_session PHP Session ID |
254 | 254 | */ |
255 | - public function set_session( $REG_session = '' ) { |
|
256 | - $this->set( 'REG_session', $REG_session ); |
|
255 | + public function set_session($REG_session = '') { |
|
256 | + $this->set('REG_session', $REG_session); |
|
257 | 257 | } |
258 | 258 | |
259 | 259 | |
@@ -264,8 +264,8 @@ discard block |
||
264 | 264 | * @access public |
265 | 265 | * @param string $REG_url_link Registration URL Link |
266 | 266 | */ |
267 | - public function set_reg_url_link( $REG_url_link = '' ) { |
|
268 | - $this->set( 'REG_url_link', $REG_url_link ); |
|
267 | + public function set_reg_url_link($REG_url_link = '') { |
|
268 | + $this->set('REG_url_link', $REG_url_link); |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | |
@@ -276,8 +276,8 @@ discard block |
||
276 | 276 | * @access public |
277 | 277 | * @param int $REG_count Primary Attendee |
278 | 278 | */ |
279 | - public function set_count( $REG_count = 1 ) { |
|
280 | - $this->set( 'REG_count', $REG_count ); |
|
279 | + public function set_count($REG_count = 1) { |
|
280 | + $this->set('REG_count', $REG_count); |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | * @access public |
289 | 289 | * @param boolean $REG_group_size Group Registration |
290 | 290 | */ |
291 | - public function set_group_size( $REG_group_size = FALSE ) { |
|
292 | - $this->set( 'REG_group_size', $REG_group_size ); |
|
291 | + public function set_group_size($REG_group_size = FALSE) { |
|
292 | + $this->set('REG_group_size', $REG_group_size); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | |
@@ -372,8 +372,8 @@ discard block |
||
372 | 372 | * @access public |
373 | 373 | * @param mixed ( int or string ) $REG_date Registration Date - Unix timestamp or string representation of Date |
374 | 374 | */ |
375 | - public function set_reg_date( $REG_date = FALSE ) { |
|
376 | - $this->set( 'REG_date', $REG_date ); |
|
375 | + public function set_reg_date($REG_date = FALSE) { |
|
376 | + $this->set('REG_date', $REG_date); |
|
377 | 377 | } |
378 | 378 | |
379 | 379 | |
@@ -384,8 +384,8 @@ discard block |
||
384 | 384 | * @access public |
385 | 385 | * @param float $REG_final_price |
386 | 386 | */ |
387 | - public function set_final_price( $REG_final_price = 0.00 ) { |
|
388 | - $this->set( 'REG_final_price', $REG_final_price ); |
|
387 | + public function set_final_price($REG_final_price = 0.00) { |
|
388 | + $this->set('REG_final_price', $REG_final_price); |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | |
@@ -396,8 +396,8 @@ discard block |
||
396 | 396 | * @access public |
397 | 397 | * @param float $REG_paid |
398 | 398 | */ |
399 | - public function set_paid( $REG_paid = 0.00 ) { |
|
400 | - $this->set( 'REG_paid', $REG_paid ); |
|
399 | + public function set_paid($REG_paid = 0.00) { |
|
400 | + $this->set('REG_paid', $REG_paid); |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | * @access public |
409 | 409 | * @param boolean $REG_att_is_going Attendee Is Going |
410 | 410 | */ |
411 | - public function set_att_is_going( $REG_att_is_going = FALSE ) { |
|
412 | - $this->set( 'REG_att_is_going', $REG_att_is_going ); |
|
411 | + public function set_att_is_going($REG_att_is_going = FALSE) { |
|
412 | + $this->set('REG_att_is_going', $REG_att_is_going); |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | * @return EE_Attendee |
420 | 420 | */ |
421 | 421 | public function attendee() { |
422 | - return $this->get_first_related( 'Attendee' ); |
|
422 | + return $this->get_first_related('Attendee'); |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * @access public |
430 | 430 | */ |
431 | 431 | public function event_ID() { |
432 | - return $this->get( 'EVT_ID' ); |
|
432 | + return $this->get('EVT_ID'); |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | */ |
441 | 441 | public function event_name() { |
442 | 442 | $event = $this->event_obj(); |
443 | - if ( $event ) { |
|
443 | + if ($event) { |
|
444 | 444 | return $event->name(); |
445 | 445 | } else { |
446 | 446 | return NULL; |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | * @return EE_Event |
455 | 455 | */ |
456 | 456 | public function event_obj() { |
457 | - return $this->get_first_related( 'Event' ); |
|
457 | + return $this->get_first_related('Event'); |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | * @access public |
465 | 465 | */ |
466 | 466 | public function attendee_ID() { |
467 | - return $this->get( 'ATT_ID' ); |
|
467 | + return $this->get('ATT_ID'); |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | * @access public |
475 | 475 | */ |
476 | 476 | public function session_ID() { |
477 | - return $this->get( 'REG_session' ); |
|
477 | + return $this->get('REG_session'); |
|
478 | 478 | } |
479 | 479 | |
480 | 480 | |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | * @param string $messenger 'pdf' or 'html'. Default 'html'. |
485 | 485 | * @return string |
486 | 486 | */ |
487 | - public function receipt_url( $messenger = 'html' ) { |
|
487 | + public function receipt_url($messenger = 'html') { |
|
488 | 488 | |
489 | 489 | /** |
490 | 490 | * The below will be deprecated one version after this. We check first if there is a custom receipt template already in use on old system. If there is then we just return the standard url for it. |
@@ -492,12 +492,12 @@ discard block |
||
492 | 492 | * @since 4.5.0 |
493 | 493 | */ |
494 | 494 | $template_relative_path = 'modules/gateways/Invoice/lib/templates/receipt_body.template.php'; |
495 | - $has_custom = EEH_Template::locate_template( $template_relative_path , array(), TRUE, TRUE, TRUE ); |
|
495 | + $has_custom = EEH_Template::locate_template($template_relative_path, array(), TRUE, TRUE, TRUE); |
|
496 | 496 | |
497 | - if ( $has_custom ) { |
|
498 | - return add_query_arg( array( 'receipt' => 'true' ), $this->invoice_url( 'launch' ) ); |
|
497 | + if ($has_custom) { |
|
498 | + return add_query_arg(array('receipt' => 'true'), $this->invoice_url('launch')); |
|
499 | 499 | } |
500 | - return apply_filters( 'FHEE__EE_Registration__receipt_url__receipt_url', '', $this, $messenger, 'receipt' ); |
|
500 | + return apply_filters('FHEE__EE_Registration__receipt_url__receipt_url', '', $this, $messenger, 'receipt'); |
|
501 | 501 | } |
502 | 502 | |
503 | 503 | |
@@ -508,28 +508,28 @@ discard block |
||
508 | 508 | * @param string $messenger 'pdf' or 'html'. Default 'html'. |
509 | 509 | * @return string |
510 | 510 | */ |
511 | - public function invoice_url( $messenger = 'html' ) { |
|
511 | + public function invoice_url($messenger = 'html') { |
|
512 | 512 | /** |
513 | 513 | * The below will be deprecated one version after this. We check first if there is a custom invoice template already in use on old system. If there is then we just return the standard url for it. |
514 | 514 | * |
515 | 515 | * @since 4.5.0 |
516 | 516 | */ |
517 | 517 | $template_relative_path = 'modules/gateways/Invoice/lib/templates/invoice_body.template.php'; |
518 | - $has_custom = EEH_Template::locate_template( $template_relative_path , array(), TRUE, TRUE, TRUE ); |
|
518 | + $has_custom = EEH_Template::locate_template($template_relative_path, array(), TRUE, TRUE, TRUE); |
|
519 | 519 | |
520 | - if ( $has_custom ) { |
|
521 | - if ( $messenger == 'html' ) { |
|
522 | - return $this->invoice_url( 'launch' ); |
|
520 | + if ($has_custom) { |
|
521 | + if ($messenger == 'html') { |
|
522 | + return $this->invoice_url('launch'); |
|
523 | 523 | } |
524 | 524 | $route = $messenger == 'download' || $messenger == 'pdf' ? 'download_invoice' : 'launch_invoice'; |
525 | 525 | |
526 | - $query_args = array( 'ee' => $route, 'id' => $this->reg_url_link() ); |
|
527 | - if ( $messenger == 'html' ) { |
|
526 | + $query_args = array('ee' => $route, 'id' => $this->reg_url_link()); |
|
527 | + if ($messenger == 'html') { |
|
528 | 528 | $query_args['html'] = TRUE; |
529 | 529 | } |
530 | - return add_query_arg( $query_args, get_permalink( EE_Registry::instance()->CFG->core->thank_you_page_id ) ); |
|
530 | + return add_query_arg($query_args, get_permalink(EE_Registry::instance()->CFG->core->thank_you_page_id)); |
|
531 | 531 | } |
532 | - return apply_filters( 'FHEE__EE_Registration__invoice_url__invoice_url', '', $this, $messenger, 'invoice' ); |
|
532 | + return apply_filters('FHEE__EE_Registration__invoice_url__invoice_url', '', $this, $messenger, 'invoice'); |
|
533 | 533 | } |
534 | 534 | |
535 | 535 | |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * @throws \EE_Error |
543 | 543 | */ |
544 | 544 | public function reg_url_link() { |
545 | - return (string)$this->get( 'REG_url_link' ); |
|
545 | + return (string) $this->get('REG_url_link'); |
|
546 | 546 | } |
547 | 547 | |
548 | 548 | |
@@ -552,8 +552,8 @@ discard block |
||
552 | 552 | * @param string $type 'download','launch', or 'html' (default is 'launch') |
553 | 553 | * @return void |
554 | 554 | */ |
555 | - public function e_invoice_url( $type = 'launch' ) { |
|
556 | - echo $this->invoice_url( $type ); |
|
555 | + public function e_invoice_url($type = 'launch') { |
|
556 | + echo $this->invoice_url($type); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * @return string |
574 | 574 | */ |
575 | 575 | public function payment_overview_url() { |
576 | - return add_query_arg( array( 'e_reg_url_link' => $this->reg_url_link(), 'step' => 'payment_options', 'revisit' => TRUE ), EE_Registry::instance()->CFG->core->reg_page_url() ); |
|
576 | + return add_query_arg(array('e_reg_url_link' => $this->reg_url_link(), 'step' => 'payment_options', 'revisit' => TRUE), EE_Registry::instance()->CFG->core->reg_page_url()); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | * @return string |
585 | 585 | */ |
586 | 586 | public function edit_attendee_information_url() { |
587 | - return add_query_arg( array( 'e_reg_url_link' => $this->reg_url_link(), 'step' => 'attendee_information', 'revisit' => TRUE ), EE_Registry::instance()->CFG->core->reg_page_url() ); |
|
587 | + return add_query_arg(array('e_reg_url_link' => $this->reg_url_link(), 'step' => 'attendee_information', 'revisit' => TRUE), EE_Registry::instance()->CFG->core->reg_page_url()); |
|
588 | 588 | } |
589 | 589 | |
590 | 590 | |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | * @return string |
595 | 595 | */ |
596 | 596 | public function get_admin_edit_url() { |
597 | - return EEH_URL::add_query_args_and_nonce( array( 'page' => 'espresso_registrations', 'action' => 'view_registration', '_REG_ID' => $this->ID() ), admin_url( 'admin.php' ) ); |
|
597 | + return EEH_URL::add_query_args_and_nonce(array('page' => 'espresso_registrations', 'action' => 'view_registration', '_REG_ID' => $this->ID()), admin_url('admin.php')); |
|
598 | 598 | } |
599 | 599 | |
600 | 600 | |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | * @access public |
605 | 605 | */ |
606 | 606 | public function is_primary_registrant() { |
607 | - return $this->get( 'REG_count' ) == 1 ? TRUE : FALSE; |
|
607 | + return $this->get('REG_count') == 1 ? TRUE : FALSE; |
|
608 | 608 | } |
609 | 609 | |
610 | 610 | |
@@ -613,12 +613,12 @@ discard block |
||
613 | 613 | * This returns the primary registration object for this registration group (which may be this object). |
614 | 614 | * @return EE_Registration |
615 | 615 | */ |
616 | - public function get_primary_registration() { |
|
617 | - if ( $this->is_primary_registrant() ) |
|
616 | + public function get_primary_registration() { |
|
617 | + if ($this->is_primary_registrant()) |
|
618 | 618 | return $this; |
619 | 619 | |
620 | 620 | //k reg_count !== 1 so let's get the EE_Registration object matching this txn_id and reg_count == 1 |
621 | - $primary_registrant = EEM_Registration::instance()->get_one( array( array('TXN_ID' => $this->transaction_ID(), 'REG_count' => 1 ) ) ); |
|
621 | + $primary_registrant = EEM_Registration::instance()->get_one(array(array('TXN_ID' => $this->transaction_ID(), 'REG_count' => 1))); |
|
622 | 622 | return $primary_registrant; |
623 | 623 | } |
624 | 624 | |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | * @access public |
630 | 630 | */ |
631 | 631 | public function count() { |
632 | - return $this->get( 'REG_count' ); |
|
632 | + return $this->get('REG_count'); |
|
633 | 633 | } |
634 | 634 | |
635 | 635 | |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | * @access public |
640 | 640 | */ |
641 | 641 | public function group_size() { |
642 | - return $this->get( 'REG_group_size' ); |
|
642 | + return $this->get('REG_group_size'); |
|
643 | 643 | } |
644 | 644 | |
645 | 645 | |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | * @access public |
650 | 650 | */ |
651 | 651 | public function date() { |
652 | - return $this->get( 'REG_date' ); |
|
652 | + return $this->get('REG_date'); |
|
653 | 653 | } |
654 | 654 | |
655 | 655 | |
@@ -660,8 +660,8 @@ discard block |
||
660 | 660 | * @param string $time_format |
661 | 661 | * @return string |
662 | 662 | */ |
663 | - public function pretty_date( $date_format = NULL, $time_format = NULL ) { |
|
664 | - return $this->get_datetime( 'REG_date', $date_format, $time_format ); |
|
663 | + public function pretty_date($date_format = NULL, $time_format = NULL) { |
|
664 | + return $this->get_datetime('REG_date', $date_format, $time_format); |
|
665 | 665 | } |
666 | 666 | |
667 | 667 | |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * @return float |
675 | 675 | */ |
676 | 676 | public function final_price() { |
677 | - return $this->get( 'REG_final_price' ); |
|
677 | + return $this->get('REG_final_price'); |
|
678 | 678 | } |
679 | 679 | |
680 | 680 | |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | * @return string |
686 | 686 | */ |
687 | 687 | public function pretty_final_price() { |
688 | - return $this->get_pretty( 'REG_final_price' ); |
|
688 | + return $this->get_pretty('REG_final_price'); |
|
689 | 689 | } |
690 | 690 | |
691 | 691 | |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | * @return float |
697 | 697 | */ |
698 | 698 | public function paid() { |
699 | - return $this->get( 'REG_paid' ); |
|
699 | + return $this->get('REG_paid'); |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | * @return float |
708 | 708 | */ |
709 | 709 | public function pretty_paid() { |
710 | - return $this->get_pretty( 'REG_paid' ); |
|
710 | + return $this->get_pretty('REG_paid'); |
|
711 | 711 | } |
712 | 712 | |
713 | 713 | |
@@ -719,11 +719,11 @@ discard block |
||
719 | 719 | * @param array $requires_payment |
720 | 720 | * @return bool |
721 | 721 | */ |
722 | - public function owes_monies_and_can_pay( $requires_payment = array()) { |
|
722 | + public function owes_monies_and_can_pay($requires_payment = array()) { |
|
723 | 723 | // these reg statuses require payment (if event is not free) |
724 | - $requires_payment = ! empty( $requires_payment ) ? $requires_payment : EEM_Registration::reg_statuses_that_allow_payment(); |
|
724 | + $requires_payment = ! empty($requires_payment) ? $requires_payment : EEM_Registration::reg_statuses_that_allow_payment(); |
|
725 | 725 | if ( |
726 | - in_array( $this->status_ID(), $requires_payment ) && |
|
726 | + in_array($this->status_ID(), $requires_payment) && |
|
727 | 727 | $this->final_price() != 0 && |
728 | 728 | $this->final_price() != $this->paid() |
729 | 729 | ) { |
@@ -740,8 +740,8 @@ discard block |
||
740 | 740 | * @param bool $show_icons |
741 | 741 | * @return void |
742 | 742 | */ |
743 | - public function e_pretty_status( $show_icons = FALSE ) { |
|
744 | - echo $this->pretty_status( $show_icons ); |
|
743 | + public function e_pretty_status($show_icons = FALSE) { |
|
744 | + echo $this->pretty_status($show_icons); |
|
745 | 745 | } |
746 | 746 | |
747 | 747 | |
@@ -752,10 +752,10 @@ discard block |
||
752 | 752 | * @param bool $show_icons |
753 | 753 | * @return string |
754 | 754 | */ |
755 | - public function pretty_status( $show_icons = FALSE ) { |
|
756 | - $status = EEM_Status::instance()->localized_status( array( $this->status_ID() => __( 'unknown', 'event_espresso' ) ), FALSE, 'sentence' ); |
|
755 | + public function pretty_status($show_icons = FALSE) { |
|
756 | + $status = EEM_Status::instance()->localized_status(array($this->status_ID() => __('unknown', 'event_espresso')), FALSE, 'sentence'); |
|
757 | 757 | $icon = ''; |
758 | - switch ( $this->status_ID() ) { |
|
758 | + switch ($this->status_ID()) { |
|
759 | 759 | case EEM_Registration::status_id_approved: |
760 | 760 | $icon = $show_icons ? '<span class="dashicons dashicons-star-filled ee-icon-size-16 green-text"></span>' : ''; |
761 | 761 | break; |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | $icon = $show_icons ? '<span class="dashicons dashicons-no ee-icon-size-16 red-text"></span>' : ''; |
776 | 776 | break; |
777 | 777 | } |
778 | - return $icon . $status[ $this->status_ID() ]; |
|
778 | + return $icon.$status[$this->status_ID()]; |
|
779 | 779 | } |
780 | 780 | |
781 | 781 | |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | * @access public |
786 | 786 | */ |
787 | 787 | public function att_is_going() { |
788 | - return $this->get( 'REG_att_is_going' ); |
|
788 | + return $this->get('REG_att_is_going'); |
|
789 | 789 | } |
790 | 790 | |
791 | 791 | |
@@ -795,8 +795,8 @@ discard block |
||
795 | 795 | * @param array $query_params like EEM_Base::get_all |
796 | 796 | * @return EE_Answer[] |
797 | 797 | */ |
798 | - public function answers( $query_params = NULL ) { |
|
799 | - return $this->get_many_related( 'Answer', $query_params ); |
|
798 | + public function answers($query_params = NULL) { |
|
799 | + return $this->get_many_related('Answer', $query_params); |
|
800 | 800 | } |
801 | 801 | |
802 | 802 | |
@@ -810,9 +810,9 @@ discard block |
||
810 | 810 | * (because the answer might be an array of answer values, so passing pretty_value=true |
811 | 811 | * will convert it into some kind of string) |
812 | 812 | */ |
813 | - public function answer_value_to_question( $question, $pretty_value=true ) { |
|
813 | + public function answer_value_to_question($question, $pretty_value = true) { |
|
814 | 814 | $question_id = EEM_Question::instance()->ensure_is_ID($question); |
815 | - return EEM_Answer::instance()->get_answer_value_to_question($this,$question_id,$pretty_value); |
|
815 | + return EEM_Answer::instance()->get_answer_value_to_question($this, $question_id, $pretty_value); |
|
816 | 816 | } |
817 | 817 | |
818 | 818 | |
@@ -825,13 +825,13 @@ discard block |
||
825 | 825 | */ |
826 | 826 | public function question_groups() { |
827 | 827 | $question_groups = array(); |
828 | - if ( $this->event() instanceof EE_Event ) { |
|
828 | + if ($this->event() instanceof EE_Event) { |
|
829 | 829 | $question_groups = $this->event()->question_groups( |
830 | 830 | array( |
831 | 831 | array( |
832 | 832 | 'Event_Question_Group.EQG_primary' => $this->count() == 1 ? true : false |
833 | 833 | ), |
834 | - 'order_by' => array( 'QSG_order' => 'ASC' ) |
|
834 | + 'order_by' => array('QSG_order' => 'ASC') |
|
835 | 835 | ) |
836 | 836 | ); |
837 | 837 | } |
@@ -848,7 +848,7 @@ discard block |
||
848 | 848 | */ |
849 | 849 | public function count_question_groups() { |
850 | 850 | $qg_count = 0; |
851 | - if ( $this->event() instanceof EE_Event ) { |
|
851 | + if ($this->event() instanceof EE_Event) { |
|
852 | 852 | $qg_count = $this->event()->count_related( |
853 | 853 | 'Question_Group', |
854 | 854 | array( |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | * @return string |
870 | 870 | */ |
871 | 871 | public function reg_date() { |
872 | - return $this->get_datetime( 'REG_date' ); |
|
872 | + return $this->get_datetime('REG_date'); |
|
873 | 873 | } |
874 | 874 | |
875 | 875 | |
@@ -881,7 +881,7 @@ discard block |
||
881 | 881 | * @return EE_Datetime_Ticket |
882 | 882 | */ |
883 | 883 | public function datetime_ticket() { |
884 | - return $this->get_first_related( 'Datetime_Ticket' ); |
|
884 | + return $this->get_first_related('Datetime_Ticket'); |
|
885 | 885 | } |
886 | 886 | |
887 | 887 | |
@@ -891,15 +891,15 @@ discard block |
||
891 | 891 | * @param EE_Datetime_Ticket $datetime_ticket |
892 | 892 | * @return EE_Datetime_Ticket |
893 | 893 | */ |
894 | - public function set_datetime_ticket( $datetime_ticket ) { |
|
895 | - return $this->_add_relation_to( $datetime_ticket, 'Datetime_Ticket' ); |
|
894 | + public function set_datetime_ticket($datetime_ticket) { |
|
895 | + return $this->_add_relation_to($datetime_ticket, 'Datetime_Ticket'); |
|
896 | 896 | } |
897 | 897 | /** |
898 | 898 | * Gets deleted |
899 | 899 | * @return boolean |
900 | 900 | */ |
901 | 901 | public function deleted() { |
902 | - return $this->get( 'REG_deleted' ); |
|
902 | + return $this->get('REG_deleted'); |
|
903 | 903 | } |
904 | 904 | |
905 | 905 | /** |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | * @return boolean |
909 | 909 | */ |
910 | 910 | public function set_deleted($deleted) { |
911 | - $this->set( 'REG_deleted', $deleted ); |
|
911 | + $this->set('REG_deleted', $deleted); |
|
912 | 912 | } |
913 | 913 | |
914 | 914 | |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | * @return EE_Status |
919 | 919 | */ |
920 | 920 | public function status_obj() { |
921 | - return $this->get_first_related( 'Status' ); |
|
921 | + return $this->get_first_related('Status'); |
|
922 | 922 | } |
923 | 923 | |
924 | 924 | |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | * @return int |
930 | 930 | */ |
931 | 931 | public function count_checkins() { |
932 | - return $this->get_model()->count_related( $this, 'Checkin' ); |
|
932 | + return $this->get_model()->count_related($this, 'Checkin'); |
|
933 | 933 | } |
934 | 934 | |
935 | 935 | |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | * @return int |
940 | 940 | */ |
941 | 941 | public function count_checkins_not_checkedout() { |
942 | - return $this->get_model()->count_related( $this, 'Checkin', array( array( 'CHK_in' => 1 ) ) ); |
|
942 | + return $this->get_model()->count_related($this, 'Checkin', array(array('CHK_in' => 1))); |
|
943 | 943 | } |
944 | 944 | |
945 | 945 | |
@@ -952,20 +952,20 @@ discard block |
||
952 | 952 | * |
953 | 953 | * @return bool |
954 | 954 | */ |
955 | - public function can_checkin( $DTT_OR_ID, $check_approved = TRUE ) { |
|
956 | - $DTT_ID = EEM_Datetime::instance()->ensure_is_ID( $DTT_OR_ID ); |
|
955 | + public function can_checkin($DTT_OR_ID, $check_approved = TRUE) { |
|
956 | + $DTT_ID = EEM_Datetime::instance()->ensure_is_ID($DTT_OR_ID); |
|
957 | 957 | |
958 | 958 | //first check registration status |
959 | - if ( ( $check_approved && ! $this->is_approved() ) || ! $DTT_ID ) { |
|
959 | + if (($check_approved && ! $this->is_approved()) || ! $DTT_ID) { |
|
960 | 960 | return false; |
961 | 961 | } |
962 | 962 | //is there a datetime ticket that matches this dtt_ID? |
963 | - if ( ! ( EEM_Datetime_Ticket::instance()->exists( array( array( 'TKT_ID' => $this->get('TKT_ID' ), 'DTT_ID' => $DTT_ID ) ) ) ) ) { |
|
963 | + if ( ! (EEM_Datetime_Ticket::instance()->exists(array(array('TKT_ID' => $this->get('TKT_ID'), 'DTT_ID' => $DTT_ID))))) { |
|
964 | 964 | return false; |
965 | 965 | } |
966 | 966 | |
967 | 967 | //final check is against TKT_uses |
968 | - return $this->verify_can_checkin_against_TKT_uses( $DTT_ID ); |
|
968 | + return $this->verify_can_checkin_against_TKT_uses($DTT_ID); |
|
969 | 969 | } |
970 | 970 | |
971 | 971 | |
@@ -978,10 +978,10 @@ discard block |
||
978 | 978 | * @param int | EE_Datetime $DTT_OR_ID The datetime the registration is being checked against |
979 | 979 | * @return bool true means can checkin. false means cannot checkin. |
980 | 980 | */ |
981 | - public function verify_can_checkin_against_TKT_uses( $DTT_OR_ID ) { |
|
982 | - $DTT_ID = EEM_Datetime::instance()->ensure_is_ID( $DTT_OR_ID ); |
|
981 | + public function verify_can_checkin_against_TKT_uses($DTT_OR_ID) { |
|
982 | + $DTT_ID = EEM_Datetime::instance()->ensure_is_ID($DTT_OR_ID); |
|
983 | 983 | |
984 | - if ( ! $DTT_ID ) { |
|
984 | + if ( ! $DTT_ID) { |
|
985 | 985 | return false; |
986 | 986 | } |
987 | 987 | |
@@ -989,23 +989,23 @@ discard block |
||
989 | 989 | |
990 | 990 | // if max uses is not set or equals infinity then return true cause its not a factor for whether user can check-in |
991 | 991 | // or not. |
992 | - if ( ! $max_uses || $max_uses === EE_INF ) { |
|
992 | + if ( ! $max_uses || $max_uses === EE_INF) { |
|
993 | 993 | return true; |
994 | 994 | } |
995 | 995 | |
996 | 996 | //does this datetime have a checkin record? If so, then the dtt count has already been verified so we can just |
997 | 997 | //go ahead and toggle. |
998 | - if ( EEM_Checkin::instance()->exists( array( array( 'REG_ID' => $this->ID(), 'DTT_ID' => $DTT_ID ) ) ) ) { |
|
998 | + if (EEM_Checkin::instance()->exists(array(array('REG_ID' => $this->ID(), 'DTT_ID' => $DTT_ID)))) { |
|
999 | 999 | return true; |
1000 | 1000 | } |
1001 | 1001 | |
1002 | 1002 | //made it here so the last check is whether the number of checkins per unique datetime on this registration |
1003 | 1003 | //disallows further check-ins. |
1004 | - $count_unique_dtt_checkins = EEM_Checkin::instance()->count( array( array( 'REG_ID' => $this->ID(), 'CHK_in' => true ) ), 'DTT_ID', true ); |
|
1004 | + $count_unique_dtt_checkins = EEM_Checkin::instance()->count(array(array('REG_ID' => $this->ID(), 'CHK_in' => true)), 'DTT_ID', true); |
|
1005 | 1005 | // checkins have already reached their max number of uses |
1006 | 1006 | // so registrant can NOT checkin |
1007 | - if ( $count_unique_dtt_checkins >= $max_uses ) { |
|
1008 | - EE_Error::add_error( __( 'Check-in denied because number of datetime uses for the ticket has been reached or exceeded.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ ); |
|
1007 | + if ($count_unique_dtt_checkins >= $max_uses) { |
|
1008 | + EE_Error::add_error(__('Check-in denied because number of datetime uses for the ticket has been reached or exceeded.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
1009 | 1009 | return false; |
1010 | 1010 | } |
1011 | 1011 | return true; |
@@ -1026,15 +1026,15 @@ discard block |
||
1026 | 1026 | * @param bool $verify If true then can_checkin() is used to verify whether the person can be checked in or not. Otherwise this forces change in checkin status. |
1027 | 1027 | * @return int|BOOL the chk_in status toggled to OR false if nothing got changed. |
1028 | 1028 | */ |
1029 | - public function toggle_checkin_status( $DTT_ID = null, $verify = false ) { |
|
1030 | - if ( empty( $DTT_ID ) ) { |
|
1029 | + public function toggle_checkin_status($DTT_ID = null, $verify = false) { |
|
1030 | + if (empty($DTT_ID)) { |
|
1031 | 1031 | $datetime = $this->get_related_primary_datetime(); |
1032 | 1032 | $DTT_ID = $datetime->ID(); |
1033 | 1033 | // verify the registration can checkin for the given DTT_ID |
1034 | - } elseif ( ! $this->can_checkin( $DTT_ID, $verify ) ) { |
|
1034 | + } elseif ( ! $this->can_checkin($DTT_ID, $verify)) { |
|
1035 | 1035 | EE_Error::add_error( |
1036 | 1036 | sprintf( |
1037 | - __( 'The given registration (ID:%1$d) can not be checked in to the given DTT_ID (%2$d), because the registration does not have access', 'event_espresso'), |
|
1037 | + __('The given registration (ID:%1$d) can not be checked in to the given DTT_ID (%2$d), because the registration does not have access', 'event_espresso'), |
|
1038 | 1038 | $this->ID(), |
1039 | 1039 | $DTT_ID |
1040 | 1040 | ), |
@@ -1048,8 +1048,8 @@ discard block |
||
1048 | 1048 | EE_Registration::checkin_status_out => EE_Registration::checkin_status_in |
1049 | 1049 | ); |
1050 | 1050 | //start by getting the current status so we know what status we'll be changing to. |
1051 | - $cur_status = $this->check_in_status_for_datetime( $DTT_ID, NULL ); |
|
1052 | - $status_to = $status_paths[ $cur_status ]; |
|
1051 | + $cur_status = $this->check_in_status_for_datetime($DTT_ID, NULL); |
|
1052 | + $status_to = $status_paths[$cur_status]; |
|
1053 | 1053 | // database only records true for checked IN or false for checked OUT |
1054 | 1054 | // no record ( null ) means checked in NEVER, but we obviously don't save that |
1055 | 1055 | $new_status = $status_to == EE_Registration::checkin_status_in ? true : false; |
@@ -1057,24 +1057,24 @@ discard block |
||
1057 | 1057 | // because we are keeping track of Check-ins over time. |
1058 | 1058 | // Eventually we'll probably want to show a list table |
1059 | 1059 | // for the individual Check-ins so that they can be managed. |
1060 | - $checkin = EE_Checkin::new_instance( array( |
|
1060 | + $checkin = EE_Checkin::new_instance(array( |
|
1061 | 1061 | 'REG_ID' => $this->ID(), |
1062 | 1062 | 'DTT_ID' => $DTT_ID, |
1063 | 1063 | 'CHK_in' => $new_status |
1064 | - ) ); |
|
1064 | + )); |
|
1065 | 1065 | // if the record could not be saved then return false |
1066 | - if ( $checkin->save() === 0 ) { |
|
1067 | - if ( WP_DEBUG ) { |
|
1066 | + if ($checkin->save() === 0) { |
|
1067 | + if (WP_DEBUG) { |
|
1068 | 1068 | global $wpdb; |
1069 | 1069 | $error = sprintf( |
1070 | - __( 'Registration check in update failed because of the following database error: %1$s%2$s', 'event_espresso' ), |
|
1070 | + __('Registration check in update failed because of the following database error: %1$s%2$s', 'event_espresso'), |
|
1071 | 1071 | '<br />', |
1072 | 1072 | $wpdb->last_error |
1073 | 1073 | ); |
1074 | 1074 | } else { |
1075 | - $error = __( 'Registration check in update failed because of an unknown database error', 'event_espresso' ); |
|
1075 | + $error = __('Registration check in update failed because of an unknown database error', 'event_espresso'); |
|
1076 | 1076 | } |
1077 | - EE_Error::add_error( $error, __FILE__, __FUNCTION__, __LINE__ ); |
|
1077 | + EE_Error::add_error($error, __FILE__, __FUNCTION__, __LINE__); |
|
1078 | 1078 | return false; |
1079 | 1079 | } |
1080 | 1080 | return $status_to; |
@@ -1098,19 +1098,19 @@ discard block |
||
1098 | 1098 | * @param EE_Checkin $checkin If present, we use the given checkin object rather than the dtt_id. |
1099 | 1099 | * @return int Integer representing Check-in status. |
1100 | 1100 | */ |
1101 | - public function check_in_status_for_datetime( $DTT_ID = 0, $checkin = NULL ) { |
|
1102 | - if ( empty( $DTT_ID ) && ! $checkin instanceof EE_Checkin ) { |
|
1101 | + public function check_in_status_for_datetime($DTT_ID = 0, $checkin = NULL) { |
|
1102 | + if (empty($DTT_ID) && ! $checkin instanceof EE_Checkin) { |
|
1103 | 1103 | $datetime = $this->get_related_primary_datetime(); |
1104 | - if ( ! $datetime instanceof EE_Datetime ) { |
|
1104 | + if ( ! $datetime instanceof EE_Datetime) { |
|
1105 | 1105 | return 0; |
1106 | 1106 | } |
1107 | 1107 | $DTT_ID = $datetime->ID(); |
1108 | 1108 | //verify the registration can checkin for the given DTT_ID |
1109 | 1109 | } |
1110 | 1110 | //get checkin object (if exists) |
1111 | - $checkin = $checkin instanceof EE_Checkin ? $checkin : $this->get_first_related( 'Checkin', array( array( 'DTT_ID' => $DTT_ID ), 'order_by' => array( 'CHK_timestamp' => 'DESC' ) ) ); |
|
1112 | - if ( $checkin instanceof EE_Checkin ) { |
|
1113 | - if ( $checkin->get( 'CHK_in' ) ) { |
|
1111 | + $checkin = $checkin instanceof EE_Checkin ? $checkin : $this->get_first_related('Checkin', array(array('DTT_ID' => $DTT_ID), 'order_by' => array('CHK_timestamp' => 'DESC'))); |
|
1112 | + if ($checkin instanceof EE_Checkin) { |
|
1113 | + if ($checkin->get('CHK_in')) { |
|
1114 | 1114 | return EE_Registration::checkin_status_in; //checked in |
1115 | 1115 | } else { |
1116 | 1116 | return EE_Registration::checkin_status_out; //had checked in but is now checked out. |
@@ -1128,28 +1128,28 @@ discard block |
||
1128 | 1128 | * @param bool $error This just flags that you want an error message returned. This is put in so that the error message can be customized with the attendee name. |
1129 | 1129 | * @return string internationalized message |
1130 | 1130 | */ |
1131 | - public function get_checkin_msg( $DTT_ID, $error = FALSE ) { |
|
1131 | + public function get_checkin_msg($DTT_ID, $error = FALSE) { |
|
1132 | 1132 | //let's get the attendee first so we can include the name of the attendee |
1133 | - $attendee = $this->get_first_related( 'Attendee' ); |
|
1134 | - if ( $attendee instanceof EE_Attendee ) { |
|
1135 | - if ( $error ) { |
|
1136 | - return sprintf( __( "%s's check-in status was not changed.", "event_espresso" ), $attendee->full_name() ); |
|
1133 | + $attendee = $this->get_first_related('Attendee'); |
|
1134 | + if ($attendee instanceof EE_Attendee) { |
|
1135 | + if ($error) { |
|
1136 | + return sprintf(__("%s's check-in status was not changed.", "event_espresso"), $attendee->full_name()); |
|
1137 | 1137 | } |
1138 | - $cur_status = $this->check_in_status_for_datetime( $DTT_ID ); |
|
1138 | + $cur_status = $this->check_in_status_for_datetime($DTT_ID); |
|
1139 | 1139 | //what is the status message going to be? |
1140 | - switch ( $cur_status ) { |
|
1140 | + switch ($cur_status) { |
|
1141 | 1141 | case EE_Registration::checkin_status_never : |
1142 | - return sprintf( __( "%s has been removed from Check-in records", "event_espresso" ), $attendee->full_name() ); |
|
1142 | + return sprintf(__("%s has been removed from Check-in records", "event_espresso"), $attendee->full_name()); |
|
1143 | 1143 | break; |
1144 | 1144 | case EE_Registration::checkin_status_in : |
1145 | - return sprintf( __( '%s has been checked in', 'event_espresso' ), $attendee->full_name() ); |
|
1145 | + return sprintf(__('%s has been checked in', 'event_espresso'), $attendee->full_name()); |
|
1146 | 1146 | break; |
1147 | 1147 | case EE_Registration::checkin_status_out : |
1148 | - return sprintf( __( '%s has been checked out', 'event_espresso' ), $attendee->full_name() ); |
|
1148 | + return sprintf(__('%s has been checked out', 'event_espresso'), $attendee->full_name()); |
|
1149 | 1149 | break; |
1150 | 1150 | } |
1151 | 1151 | } |
1152 | - return __( "The check-in status could not be determined.", "event_espresso" ); |
|
1152 | + return __("The check-in status could not be determined.", "event_espresso"); |
|
1153 | 1153 | } |
1154 | 1154 | |
1155 | 1155 | |
@@ -1174,7 +1174,7 @@ discard block |
||
1174 | 1174 | * @access public |
1175 | 1175 | */ |
1176 | 1176 | public function reg_code() { |
1177 | - return $this->get( 'REG_code' ); |
|
1177 | + return $this->get('REG_code'); |
|
1178 | 1178 | } |
1179 | 1179 | |
1180 | 1180 | |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | * @access public |
1185 | 1185 | */ |
1186 | 1186 | public function transaction_ID() { |
1187 | - return $this->get( 'TXN_ID' ); |
|
1187 | + return $this->get('TXN_ID'); |
|
1188 | 1188 | } |
1189 | 1189 | |
1190 | 1190 | |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | * @return int |
1194 | 1194 | */ |
1195 | 1195 | public function ticket_ID() { |
1196 | - return $this->get( 'TKT_ID' ); |
|
1196 | + return $this->get('TKT_ID'); |
|
1197 | 1197 | } |
1198 | 1198 | |
1199 | 1199 | |
@@ -1205,17 +1205,17 @@ discard block |
||
1205 | 1205 | * @param string $REG_code Registration Code |
1206 | 1206 | * @param boolean $use_default |
1207 | 1207 | */ |
1208 | - public function set_reg_code( $REG_code, $use_default = FALSE ) { |
|
1209 | - if ( empty( $REG_code )) { |
|
1210 | - EE_Error::add_error( __( 'REG_code can not be empty.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ ); |
|
1208 | + public function set_reg_code($REG_code, $use_default = FALSE) { |
|
1209 | + if (empty($REG_code)) { |
|
1210 | + EE_Error::add_error(__('REG_code can not be empty.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__); |
|
1211 | 1211 | return; |
1212 | 1212 | } |
1213 | - if ( ! $this->reg_code() ) { |
|
1214 | - parent::set( 'REG_code', $REG_code, $use_default ); |
|
1213 | + if ( ! $this->reg_code()) { |
|
1214 | + parent::set('REG_code', $REG_code, $use_default); |
|
1215 | 1215 | } else { |
1216 | 1216 | EE_Error::doing_it_wrong( |
1217 | - __CLASS__ . '::' . __FUNCTION__, |
|
1218 | - __( 'Can not change a registration REG_code once it has been set.', 'event_espresso' ), |
|
1217 | + __CLASS__.'::'.__FUNCTION__, |
|
1218 | + __('Can not change a registration REG_code once it has been set.', 'event_espresso'), |
|
1219 | 1219 | '4.6.0' |
1220 | 1220 | ); |
1221 | 1221 | } |
@@ -1235,17 +1235,17 @@ discard block |
||
1235 | 1235 | * @return EE_Registration[] or empty array if this isn't a group registration. |
1236 | 1236 | */ |
1237 | 1237 | public function get_all_other_registrations_in_group() { |
1238 | - if ( $this->group_size() < 2 ) { |
|
1238 | + if ($this->group_size() < 2) { |
|
1239 | 1239 | return array(); |
1240 | 1240 | } |
1241 | 1241 | |
1242 | 1242 | $query[0] = array( |
1243 | 1243 | 'TXN_ID' => $this->transaction_ID(), |
1244 | - 'REG_ID' => array( '!=', $this->ID() ), |
|
1244 | + 'REG_ID' => array('!=', $this->ID()), |
|
1245 | 1245 | 'TKT_ID' => $this->ticket_ID() |
1246 | 1246 | ); |
1247 | 1247 | |
1248 | - $registrations = $this->get_model()->get_all( $query ); |
|
1248 | + $registrations = $this->get_model()->get_all($query); |
|
1249 | 1249 | return $registrations; |
1250 | 1250 | } |
1251 | 1251 | |
@@ -1254,14 +1254,14 @@ discard block |
||
1254 | 1254 | * @return string |
1255 | 1255 | */ |
1256 | 1256 | public function get_admin_details_link() { |
1257 | - EE_Registry::instance()->load_helper( 'URL' ); |
|
1257 | + EE_Registry::instance()->load_helper('URL'); |
|
1258 | 1258 | return EEH_URL::add_query_args_and_nonce( |
1259 | 1259 | array( |
1260 | 1260 | 'page' => 'espresso_registrations', |
1261 | 1261 | 'action' => 'view_registration', |
1262 | 1262 | '_REG_ID' => $this->ID() |
1263 | 1263 | ), |
1264 | - admin_url( 'admin.php' ) |
|
1264 | + admin_url('admin.php') |
|
1265 | 1265 | ); |
1266 | 1266 | } |
1267 | 1267 | |
@@ -1286,12 +1286,12 @@ discard block |
||
1286 | 1286 | * @return string |
1287 | 1287 | */ |
1288 | 1288 | public function get_admin_overview_link() { |
1289 | - EE_Registry::instance()->load_helper( 'URL' ); |
|
1289 | + EE_Registry::instance()->load_helper('URL'); |
|
1290 | 1290 | return EEH_URL::add_query_args_and_nonce( |
1291 | 1291 | array( |
1292 | 1292 | 'page' => 'espresso_registrations' |
1293 | 1293 | ), |
1294 | - admin_url( 'admin.php' ) |
|
1294 | + admin_url('admin.php') |
|
1295 | 1295 | ); |
1296 | 1296 | } |
1297 | 1297 | |
@@ -1302,8 +1302,8 @@ discard block |
||
1302 | 1302 | * @return \EE_Registration[] |
1303 | 1303 | * @throws \EE_Error |
1304 | 1304 | */ |
1305 | - public function payments( $query_params = array() ) { |
|
1306 | - return $this->get_many_related( 'Payment', $query_params ); |
|
1305 | + public function payments($query_params = array()) { |
|
1306 | + return $this->get_many_related('Payment', $query_params); |
|
1307 | 1307 | } |
1308 | 1308 | |
1309 | 1309 | |
@@ -1313,8 +1313,8 @@ discard block |
||
1313 | 1313 | * @return \EE_Registration_Payment[] |
1314 | 1314 | * @throws \EE_Error |
1315 | 1315 | */ |
1316 | - public function registration_payments( $query_params = array() ) { |
|
1317 | - return $this->get_many_related( 'Registration_Payment', $query_params ); |
|
1316 | + public function registration_payments($query_params = array()) { |
|
1317 | + return $this->get_many_related('Registration_Payment', $query_params); |
|
1318 | 1318 | } |
1319 | 1319 | |
1320 | 1320 | |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | * @return EE_Payment_Method|null |
1328 | 1328 | */ |
1329 | 1329 | public function payment_method() { |
1330 | - return EEM_Payment_Method::instance()->get_last_used_for_registration( $this ); |
|
1330 | + return EEM_Payment_Method::instance()->get_last_used_for_registration($this); |
|
1331 | 1331 | } |
1332 | 1332 | |
1333 | 1333 |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | /** |
899 | 899 | * Sets deleted |
900 | 900 | * @param boolean $deleted |
901 | - * @return boolean |
|
901 | + * @return boolean|null |
|
902 | 902 | */ |
903 | 903 | public function set_deleted($deleted) { |
904 | 904 | $this->set( 'REG_deleted', $deleted ); |
@@ -942,6 +942,7 @@ discard block |
||
942 | 942 | * |
943 | 943 | * @param int | EE_Datetime $DTT_OR_ID The datetime the registration is being checked against |
944 | 944 | * @param bool $check_approved This is used to indicate whether the caller wants can_checkin to also consider registration status as well as datetime access. |
945 | + * @param integer $DTT_OR_ID |
|
945 | 946 | * |
946 | 947 | * @return bool |
947 | 948 | */ |
@@ -1347,7 +1348,7 @@ discard block |
||
1347 | 1348 | * This grabs the payment method corresponding to the last payment made for the amount owing on the registration. |
1348 | 1349 | * Note: if there are no payments on the registration there will be no payment method returned. |
1349 | 1350 | * |
1350 | - * @return EE_Payment_Method|null |
|
1351 | + * @return EE_Base_Class|null |
|
1351 | 1352 | */ |
1352 | 1353 | public function payment_method() { |
1353 | 1354 | return EEM_Payment_Method::instance()->get_last_used_for_registration( $this ); |