Completed
Branch new-admin-design (7f58b2)
by
unknown
02:54
created
core/libraries/messages/EE_Messages_Template_Pack_Collection.lib.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,19 +11,19 @@
 block discarded – undo
11 11
 {
12 12
 
13 13
 
14
-    public function __construct()
15
-    {
16
-        $this->interface = 'EE_Messages_Template_Pack';
17
-    }
14
+	public function __construct()
15
+	{
16
+		$this->interface = 'EE_Messages_Template_Pack';
17
+	}
18 18
 
19
-    public function get_by_name($template_pack_name)
20
-    {
21
-        $this->rewind();
22
-        while ($this->valid()) {
23
-            if ($this->current()->dbref == $template_pack_name) {
24
-                return $this->current();
25
-            }
26
-            $this->next();
27
-        }
28
-    }
19
+	public function get_by_name($template_pack_name)
20
+	{
21
+		$this->rewind();
22
+		while ($this->valid()) {
23
+			if ($this->current()->dbref == $template_pack_name) {
24
+				return $this->current();
25
+			}
26
+			$this->next();
27
+		}
28
+	}
29 29
 }
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Factory.lib.php 2 patches
Indentation   +171 added lines, -171 removed lines patch added patch discarded remove patch
@@ -15,175 +15,175 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * @type EE_Message_Factory $_instance
20
-     */
21
-    protected static $_instance = null;
22
-
23
-
24
-    /**
25
-     * @type EE_Message_Resource_Manager $_message_resource_manager
26
-     */
27
-    protected $_message_resource_manager;
28
-
29
-
30
-
31
-    /**
32
-     * EE_Message_Factory constructor.
33
-     *
34
-     * @access protected
35
-     * @param \EE_Message_Resource_Manager $Message_Resource_Manager
36
-     */
37
-    protected function __construct(
38
-        EE_Message_Resource_Manager $Message_Resource_Manager
39
-    ) {
40
-        $this->_message_resource_manager = $Message_Resource_Manager;
41
-    }
42
-
43
-
44
-
45
-    /**
46
-     * @singleton method used to instantiate class object
47
-     * @access    public
48
-     * @param \EE_Message_Resource_Manager $Message_Resource_Manager
49
-     * @return \EE_Message_Factory instance
50
-     */
51
-    public static function instance(EE_Message_Resource_Manager $Message_Resource_Manager)
52
-    {
53
-        // check if class object is instantiated, and instantiated properly
54
-        if (! self::$_instance instanceof EE_Message_Factory) {
55
-            self::$_instance = new EE_Message_Factory($Message_Resource_Manager);
56
-        }
57
-        return self::$_instance;
58
-    }
59
-
60
-
61
-
62
-    /**
63
-     * @access public
64
-     * @param  array $props_n_values
65
-     * @return EE_Message
66
-     */
67
-    public static function create($props_n_values = array())
68
-    {
69
-        /** @type EE_Message_Factory $Message_Factory */
70
-        $Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
71
-        return $Message_Factory->_create($props_n_values);
72
-    }
73
-
74
-
75
-
76
-    /**
77
-     * @access public
78
-     * @param  \EE_Message $message
79
-     * @return \EE_Message
80
-     * @throws \EE_Error
81
-     */
82
-    public static function set_messenger_and_message_type(EE_Message $message)
83
-    {
84
-        /** @type EE_Message_Factory $Message_Factory */
85
-        $Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
86
-        return $Message_Factory->_set_messenger_and_message_type($message);
87
-    }
88
-
89
-
90
-
91
-    /**
92
-     * @access public
93
-     * @param  \EE_Message $message
94
-     * @return \EE_Message
95
-     * @throws \EE_Error
96
-     */
97
-    public static function set_messenger(EE_Message $message)
98
-    {
99
-        /** @type EE_Message_Factory $Message_Factory */
100
-        $Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
101
-        return $Message_Factory->_set_messenger($message);
102
-    }
103
-
104
-
105
-
106
-    /**
107
-     * @access public
108
-     * @param  \EE_Message $message
109
-     * @return \EE_Message
110
-     * @throws \EE_Error
111
-     */
112
-    public static function set_message_type(EE_Message $message)
113
-    {
114
-        /** @type EE_Message_Factory $Message_Factory */
115
-        $Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
116
-        return $Message_Factory->_set_message_type($message);
117
-    }
118
-
119
-
120
-
121
-    /**
122
-     * @access protected
123
-     * @param  array $props_n_values
124
-     * @return \EE_Message
125
-     * @throws \EE_Error
126
-     */
127
-    protected function _create($props_n_values = array())
128
-    {
129
-        $new_instance = false;
130
-        if (! empty($props_n_values['MSG_ID'])) {
131
-            $message = EE_Message::new_instance_from_db($props_n_values);
132
-        } else {
133
-            $message = EE_Message::new_instance($props_n_values);
134
-            $new_instance = true;
135
-        }
136
-        return $this->_set_messenger_and_message_type($message, $new_instance);
137
-    }
138
-
139
-
140
-
141
-    /**
142
-     * @access public
143
-     * @param  \EE_Message $message
144
-     * @param  bool        $new_instance Whether the message type was setup from the database (false) or not (true)
145
-     * @return \EE_Message
146
-     * @throws \EE_Error
147
-     */
148
-    protected function _set_messenger_and_message_type(EE_Message $message, $new_instance = false)
149
-    {
150
-        $message = $this->_set_messenger($message);
151
-        $message = $this->_set_message_type($message, $new_instance);
152
-        return $message;
153
-    }
154
-
155
-
156
-
157
-    /**
158
-     * @access protected
159
-     * @param  \EE_Message $message
160
-     * @return \EE_Message
161
-     * @throws \EE_Error
162
-     */
163
-    protected function _set_messenger(EE_Message $message)
164
-    {
165
-        $messenger = $this->_message_resource_manager->get_messenger($message->messenger());
166
-        if ($messenger instanceof EE_messenger) {
167
-            $message->set_messenger_object($messenger);
168
-        }
169
-        return $message;
170
-    }
171
-
172
-
173
-
174
-    /**
175
-     * @access protected
176
-     * @param  \EE_Message $message
177
-     * @param  bool        $new_instance Whether the message type was setup from the database (false) or not (true)
178
-     * @return \EE_Message
179
-     * @throws \EE_Error
180
-     */
181
-    protected function _set_message_type(EE_Message $message, $new_instance = false)
182
-    {
183
-        $message_type = $this->_message_resource_manager->get_message_type($message->message_type());
184
-        if ($message_type instanceof EE_message_type) {
185
-            $message->set_message_type_object($message_type, $new_instance);
186
-        }
187
-        return $message;
188
-    }
18
+	/**
19
+	 * @type EE_Message_Factory $_instance
20
+	 */
21
+	protected static $_instance = null;
22
+
23
+
24
+	/**
25
+	 * @type EE_Message_Resource_Manager $_message_resource_manager
26
+	 */
27
+	protected $_message_resource_manager;
28
+
29
+
30
+
31
+	/**
32
+	 * EE_Message_Factory constructor.
33
+	 *
34
+	 * @access protected
35
+	 * @param \EE_Message_Resource_Manager $Message_Resource_Manager
36
+	 */
37
+	protected function __construct(
38
+		EE_Message_Resource_Manager $Message_Resource_Manager
39
+	) {
40
+		$this->_message_resource_manager = $Message_Resource_Manager;
41
+	}
42
+
43
+
44
+
45
+	/**
46
+	 * @singleton method used to instantiate class object
47
+	 * @access    public
48
+	 * @param \EE_Message_Resource_Manager $Message_Resource_Manager
49
+	 * @return \EE_Message_Factory instance
50
+	 */
51
+	public static function instance(EE_Message_Resource_Manager $Message_Resource_Manager)
52
+	{
53
+		// check if class object is instantiated, and instantiated properly
54
+		if (! self::$_instance instanceof EE_Message_Factory) {
55
+			self::$_instance = new EE_Message_Factory($Message_Resource_Manager);
56
+		}
57
+		return self::$_instance;
58
+	}
59
+
60
+
61
+
62
+	/**
63
+	 * @access public
64
+	 * @param  array $props_n_values
65
+	 * @return EE_Message
66
+	 */
67
+	public static function create($props_n_values = array())
68
+	{
69
+		/** @type EE_Message_Factory $Message_Factory */
70
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
71
+		return $Message_Factory->_create($props_n_values);
72
+	}
73
+
74
+
75
+
76
+	/**
77
+	 * @access public
78
+	 * @param  \EE_Message $message
79
+	 * @return \EE_Message
80
+	 * @throws \EE_Error
81
+	 */
82
+	public static function set_messenger_and_message_type(EE_Message $message)
83
+	{
84
+		/** @type EE_Message_Factory $Message_Factory */
85
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
86
+		return $Message_Factory->_set_messenger_and_message_type($message);
87
+	}
88
+
89
+
90
+
91
+	/**
92
+	 * @access public
93
+	 * @param  \EE_Message $message
94
+	 * @return \EE_Message
95
+	 * @throws \EE_Error
96
+	 */
97
+	public static function set_messenger(EE_Message $message)
98
+	{
99
+		/** @type EE_Message_Factory $Message_Factory */
100
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
101
+		return $Message_Factory->_set_messenger($message);
102
+	}
103
+
104
+
105
+
106
+	/**
107
+	 * @access public
108
+	 * @param  \EE_Message $message
109
+	 * @return \EE_Message
110
+	 * @throws \EE_Error
111
+	 */
112
+	public static function set_message_type(EE_Message $message)
113
+	{
114
+		/** @type EE_Message_Factory $Message_Factory */
115
+		$Message_Factory = EE_Registry::instance()->load_lib('Message_Factory');
116
+		return $Message_Factory->_set_message_type($message);
117
+	}
118
+
119
+
120
+
121
+	/**
122
+	 * @access protected
123
+	 * @param  array $props_n_values
124
+	 * @return \EE_Message
125
+	 * @throws \EE_Error
126
+	 */
127
+	protected function _create($props_n_values = array())
128
+	{
129
+		$new_instance = false;
130
+		if (! empty($props_n_values['MSG_ID'])) {
131
+			$message = EE_Message::new_instance_from_db($props_n_values);
132
+		} else {
133
+			$message = EE_Message::new_instance($props_n_values);
134
+			$new_instance = true;
135
+		}
136
+		return $this->_set_messenger_and_message_type($message, $new_instance);
137
+	}
138
+
139
+
140
+
141
+	/**
142
+	 * @access public
143
+	 * @param  \EE_Message $message
144
+	 * @param  bool        $new_instance Whether the message type was setup from the database (false) or not (true)
145
+	 * @return \EE_Message
146
+	 * @throws \EE_Error
147
+	 */
148
+	protected function _set_messenger_and_message_type(EE_Message $message, $new_instance = false)
149
+	{
150
+		$message = $this->_set_messenger($message);
151
+		$message = $this->_set_message_type($message, $new_instance);
152
+		return $message;
153
+	}
154
+
155
+
156
+
157
+	/**
158
+	 * @access protected
159
+	 * @param  \EE_Message $message
160
+	 * @return \EE_Message
161
+	 * @throws \EE_Error
162
+	 */
163
+	protected function _set_messenger(EE_Message $message)
164
+	{
165
+		$messenger = $this->_message_resource_manager->get_messenger($message->messenger());
166
+		if ($messenger instanceof EE_messenger) {
167
+			$message->set_messenger_object($messenger);
168
+		}
169
+		return $message;
170
+	}
171
+
172
+
173
+
174
+	/**
175
+	 * @access protected
176
+	 * @param  \EE_Message $message
177
+	 * @param  bool        $new_instance Whether the message type was setup from the database (false) or not (true)
178
+	 * @return \EE_Message
179
+	 * @throws \EE_Error
180
+	 */
181
+	protected function _set_message_type(EE_Message $message, $new_instance = false)
182
+	{
183
+		$message_type = $this->_message_resource_manager->get_message_type($message->message_type());
184
+		if ($message_type instanceof EE_message_type) {
185
+			$message->set_message_type_object($message_type, $new_instance);
186
+		}
187
+		return $message;
188
+	}
189 189
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public static function instance(EE_Message_Resource_Manager $Message_Resource_Manager)
52 52
     {
53 53
         // check if class object is instantiated, and instantiated properly
54
-        if (! self::$_instance instanceof EE_Message_Factory) {
54
+        if ( ! self::$_instance instanceof EE_Message_Factory) {
55 55
             self::$_instance = new EE_Message_Factory($Message_Resource_Manager);
56 56
         }
57 57
         return self::$_instance;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     protected function _create($props_n_values = array())
128 128
     {
129 129
         $new_instance = false;
130
-        if (! empty($props_n_values['MSG_ID'])) {
130
+        if ( ! empty($props_n_values['MSG_ID'])) {
131 131
             $message = EE_Message::new_instance_from_db($props_n_values);
132 132
         } else {
133 133
             $message = EE_Message::new_instance($props_n_values);
Please login to merge, or discard this patch.
core/libraries/messages/data_class/EE_Messages_Addressee.class.php 2 patches
Indentation   +295 added lines, -295 removed lines patch added patch discarded remove patch
@@ -15,299 +15,299 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Identifier properties for the recipient
20
-     */
21
-
22
-    /**
23
-     * if available we'll use this to set the fname and lname (admin)
24
-     *
25
-     * @var int
26
-     */
27
-    public $user_id;
28
-
29
-    /**
30
-     * this will always be the admin fname (set later via incoming user_id)
31
-     *
32
-     * @var string
33
-     */
34
-    public $fname;
35
-
36
-    /**
37
-     * this will always be the admin lname (set later via incoming user_id)
38
-     *
39
-     * @var string
40
-     */
41
-    public $lname;
42
-
43
-    /**
44
-     * @var int
45
-     */
46
-    public $primary_registration_id;
47
-
48
-    /**
49
-     * @var int
50
-     */
51
-    public $attendee_registration_id;
52
-
53
-    /**
54
-     * This is should represent the data object that can be used to regenerate this addressee if needed.
55
-     * It is saved to the MSG_recipient_ID column in the generated EE_Message using this data.
56
-     *
57
-     * @var int
58
-     */
59
-    public $recipient_id;
60
-
61
-    /**
62
-     * This represents the reference to the EE_Base_Class child that the $recipient_ID is for (eg. 'Registration',
63
-     * 'Attendee') It is saved to the MSG_recipient_type column in the generated EE_Message using this data.
64
-     *
65
-     * @var string
66
-     */
67
-    public $recipient_type;
68
-
69
-    /**
70
-     * communication related
71
-     */
72
-    /**
73
-     * @var string
74
-     */
75
-    public $attendee_email;
76
-
77
-    /**
78
-     * @var string
79
-     */
80
-    public $primary_attendee_email;
81
-
82
-    /**
83
-     * @var string
84
-     */
85
-    public $admin_email;
86
-
87
-
88
-
89
-    /**
90
-     * Attendee related
91
-     */
92
-
93
-    /**
94
-     * holds the attendee object for the primary attendee
95
-     *
96
-     * @var EE_Attendee
97
-     */
98
-    public $primary_att_obj;
99
-
100
-    /**
101
-     * holds the registration object for the primary attendee
102
-     *
103
-     * @var EE_Registration
104
-     */
105
-    public $primary_reg_obj;
106
-
107
-    /**
108
-     * holds the attendee object for an attendee
109
-     *
110
-     * @var EE_Attendee
111
-     */
112
-    public $att_obj;
113
-
114
-    /**
115
-     * holds the registration object for an attendee
116
-     *
117
-     * @var EE_Registration
118
-     */
119
-    public $reg_obj;
120
-
121
-    /**
122
-     * array of EE_Question objects (indexed by EE_Answer->ID())
123
-     *
124
-     * @var EE_Question[]
125
-     */
126
-    public $questions;
127
-
128
-    /**
129
-     * array of EE_Answer objects
130
-     *
131
-     * @var EE_Answer[]
132
-     */
133
-    public $answers;
134
-
135
-
136
-
137
-    /**
138
-     * event related
139
-     */
140
-
141
-    /**
142
-     * This will hold all event info/
143
-     * @var EE_Event[]
144
-     */
145
-    public $events;
146
-
147
-    /**
148
-     * holds all the attendees for an event.
149
-     *
150
-     * @var EE_Attendee[]
151
-     */
152
-    public $attendees;
153
-
154
-    /**
155
-     * holds all the purchased tickets for an event
156
-     *
157
-     * @var EE_Ticket[]
158
-     */
159
-    public $tickets;
160
-
161
-    /**
162
-     * holds an array of line items indexed by parent ticket line item ids and values are array of children of that
163
-     * line item
164
-     *
165
-     * @var EE_Line_Item[]
166
-     */
167
-    public $line_items_with_children;
168
-
169
-    /**
170
-     * holds all the datetimes accessed via the tickets purchased for the event
171
-     *
172
-     * @var EE_Datetime[]
173
-     */
174
-    public $datetimes;
175
-
176
-    /**
177
-     * holds all registrations for a transaction (with cached relations on that registration)
178
-     *
179
-     * @var EE_Registration[]
180
-     */
181
-    public $registrations;
182
-
183
-
184
-
185
-    /**
186
-     * txn related
187
-     */
188
-
189
-    /**
190
-     * @var array
191
-     */
192
-    public $billing;
193
-
194
-    /**
195
-     *total taxes
196
-     *
197
-     * @var array
198
-     */
199
-    public $taxes;
200
-
201
-    /**
202
-     * @var EE_Line_Item[]
203
-     */
204
-    public $tax_line_items;
205
-
206
-    /**
207
-     * @var EE_Line_Item[]
208
-     */
209
-    public $additional_line_items;
210
-
211
-    /**
212
-     * @var EE_Line_Item
213
-     */
214
-    public $grand_total_line_item;
215
-
216
-    /**
217
-     * @var EE_Transaction
218
-     */
219
-    public $txn;
220
-
221
-    /**
222
-     * @var EE_Payment
223
-     */
224
-    public $payment;
225
-
226
-    /**
227
-     * @var EE_Payment[]
228
-     */
229
-    public $payments;
230
-
231
-    /**
232
-     * @var EE_Transaction[]
233
-     */
234
-    public $txn_objs;
235
-
236
-    /**
237
-     * @var EE_Registration[]
238
-     */
239
-    public $reg_objs;
240
-
241
-    /**
242
-     * total number of ALL tickets purchased for the txn.
243
-     *
244
-     * @var int
245
-     */
246
-    public $total_ticket_count;
247
-
248
-
249
-
250
-    /**
251
-     * things that get set later by parsers
252
-     */
253
-
254
-    /**
255
-     * @var string $event_list
256
-     */
257
-    public $event_list;
258
-
259
-    /**
260
-     * @var string
261
-     */
262
-    public $attendee_list;
263
-
264
-
265
-
266
-    /**
267
-     * This just holds the incoming data
268
-     *
269
-     * @var array
270
-     */
271
-    protected $_data;
272
-
273
-
274
-
275
-    /**
276
-     * constructor
277
-     *
278
-     * @access public
279
-     * @param array $addressee_data We're expecting an incoming array of data that will be used to fill the properties
280
-     *                              for the object.
281
-     */
282
-    public function __construct($addressee_data)
283
-    {
284
-        $this->_data = $addressee_data;
285
-        $this->_set_properties();
286
-    }
287
-
288
-
289
-
290
-    /**
291
-     * This simply loops through the data and makes sure that each item is present in the incoming data.  If it is then
292
-     * it is assigned to the property.
293
-     *
294
-     * @access protected
295
-     * @return void.
296
-     */
297
-    protected function _set_properties()
298
-    {
299
-        foreach ($this->_data as $prop => $value) {
300
-            if (property_exists($this, $prop)) {
301
-                $this->{$prop} = $value;
302
-            }
303
-        }
304
-        // if user_id present we'll use this to set the fname and lname and admin_email.
305
-        if (! empty($this->user_id)) {
306
-            $this->user_id = (int) $this->user_id;
307
-            $user = get_userdata($this->user_id);
308
-            $this->fname = $user->user_firstname;
309
-            $this->lname = $user->user_lastname;
310
-            $this->admin_email = $user->user_email;
311
-        }
312
-    }
18
+	/**
19
+	 * Identifier properties for the recipient
20
+	 */
21
+
22
+	/**
23
+	 * if available we'll use this to set the fname and lname (admin)
24
+	 *
25
+	 * @var int
26
+	 */
27
+	public $user_id;
28
+
29
+	/**
30
+	 * this will always be the admin fname (set later via incoming user_id)
31
+	 *
32
+	 * @var string
33
+	 */
34
+	public $fname;
35
+
36
+	/**
37
+	 * this will always be the admin lname (set later via incoming user_id)
38
+	 *
39
+	 * @var string
40
+	 */
41
+	public $lname;
42
+
43
+	/**
44
+	 * @var int
45
+	 */
46
+	public $primary_registration_id;
47
+
48
+	/**
49
+	 * @var int
50
+	 */
51
+	public $attendee_registration_id;
52
+
53
+	/**
54
+	 * This is should represent the data object that can be used to regenerate this addressee if needed.
55
+	 * It is saved to the MSG_recipient_ID column in the generated EE_Message using this data.
56
+	 *
57
+	 * @var int
58
+	 */
59
+	public $recipient_id;
60
+
61
+	/**
62
+	 * This represents the reference to the EE_Base_Class child that the $recipient_ID is for (eg. 'Registration',
63
+	 * 'Attendee') It is saved to the MSG_recipient_type column in the generated EE_Message using this data.
64
+	 *
65
+	 * @var string
66
+	 */
67
+	public $recipient_type;
68
+
69
+	/**
70
+	 * communication related
71
+	 */
72
+	/**
73
+	 * @var string
74
+	 */
75
+	public $attendee_email;
76
+
77
+	/**
78
+	 * @var string
79
+	 */
80
+	public $primary_attendee_email;
81
+
82
+	/**
83
+	 * @var string
84
+	 */
85
+	public $admin_email;
86
+
87
+
88
+
89
+	/**
90
+	 * Attendee related
91
+	 */
92
+
93
+	/**
94
+	 * holds the attendee object for the primary attendee
95
+	 *
96
+	 * @var EE_Attendee
97
+	 */
98
+	public $primary_att_obj;
99
+
100
+	/**
101
+	 * holds the registration object for the primary attendee
102
+	 *
103
+	 * @var EE_Registration
104
+	 */
105
+	public $primary_reg_obj;
106
+
107
+	/**
108
+	 * holds the attendee object for an attendee
109
+	 *
110
+	 * @var EE_Attendee
111
+	 */
112
+	public $att_obj;
113
+
114
+	/**
115
+	 * holds the registration object for an attendee
116
+	 *
117
+	 * @var EE_Registration
118
+	 */
119
+	public $reg_obj;
120
+
121
+	/**
122
+	 * array of EE_Question objects (indexed by EE_Answer->ID())
123
+	 *
124
+	 * @var EE_Question[]
125
+	 */
126
+	public $questions;
127
+
128
+	/**
129
+	 * array of EE_Answer objects
130
+	 *
131
+	 * @var EE_Answer[]
132
+	 */
133
+	public $answers;
134
+
135
+
136
+
137
+	/**
138
+	 * event related
139
+	 */
140
+
141
+	/**
142
+	 * This will hold all event info/
143
+	 * @var EE_Event[]
144
+	 */
145
+	public $events;
146
+
147
+	/**
148
+	 * holds all the attendees for an event.
149
+	 *
150
+	 * @var EE_Attendee[]
151
+	 */
152
+	public $attendees;
153
+
154
+	/**
155
+	 * holds all the purchased tickets for an event
156
+	 *
157
+	 * @var EE_Ticket[]
158
+	 */
159
+	public $tickets;
160
+
161
+	/**
162
+	 * holds an array of line items indexed by parent ticket line item ids and values are array of children of that
163
+	 * line item
164
+	 *
165
+	 * @var EE_Line_Item[]
166
+	 */
167
+	public $line_items_with_children;
168
+
169
+	/**
170
+	 * holds all the datetimes accessed via the tickets purchased for the event
171
+	 *
172
+	 * @var EE_Datetime[]
173
+	 */
174
+	public $datetimes;
175
+
176
+	/**
177
+	 * holds all registrations for a transaction (with cached relations on that registration)
178
+	 *
179
+	 * @var EE_Registration[]
180
+	 */
181
+	public $registrations;
182
+
183
+
184
+
185
+	/**
186
+	 * txn related
187
+	 */
188
+
189
+	/**
190
+	 * @var array
191
+	 */
192
+	public $billing;
193
+
194
+	/**
195
+	 *total taxes
196
+	 *
197
+	 * @var array
198
+	 */
199
+	public $taxes;
200
+
201
+	/**
202
+	 * @var EE_Line_Item[]
203
+	 */
204
+	public $tax_line_items;
205
+
206
+	/**
207
+	 * @var EE_Line_Item[]
208
+	 */
209
+	public $additional_line_items;
210
+
211
+	/**
212
+	 * @var EE_Line_Item
213
+	 */
214
+	public $grand_total_line_item;
215
+
216
+	/**
217
+	 * @var EE_Transaction
218
+	 */
219
+	public $txn;
220
+
221
+	/**
222
+	 * @var EE_Payment
223
+	 */
224
+	public $payment;
225
+
226
+	/**
227
+	 * @var EE_Payment[]
228
+	 */
229
+	public $payments;
230
+
231
+	/**
232
+	 * @var EE_Transaction[]
233
+	 */
234
+	public $txn_objs;
235
+
236
+	/**
237
+	 * @var EE_Registration[]
238
+	 */
239
+	public $reg_objs;
240
+
241
+	/**
242
+	 * total number of ALL tickets purchased for the txn.
243
+	 *
244
+	 * @var int
245
+	 */
246
+	public $total_ticket_count;
247
+
248
+
249
+
250
+	/**
251
+	 * things that get set later by parsers
252
+	 */
253
+
254
+	/**
255
+	 * @var string $event_list
256
+	 */
257
+	public $event_list;
258
+
259
+	/**
260
+	 * @var string
261
+	 */
262
+	public $attendee_list;
263
+
264
+
265
+
266
+	/**
267
+	 * This just holds the incoming data
268
+	 *
269
+	 * @var array
270
+	 */
271
+	protected $_data;
272
+
273
+
274
+
275
+	/**
276
+	 * constructor
277
+	 *
278
+	 * @access public
279
+	 * @param array $addressee_data We're expecting an incoming array of data that will be used to fill the properties
280
+	 *                              for the object.
281
+	 */
282
+	public function __construct($addressee_data)
283
+	{
284
+		$this->_data = $addressee_data;
285
+		$this->_set_properties();
286
+	}
287
+
288
+
289
+
290
+	/**
291
+	 * This simply loops through the data and makes sure that each item is present in the incoming data.  If it is then
292
+	 * it is assigned to the property.
293
+	 *
294
+	 * @access protected
295
+	 * @return void.
296
+	 */
297
+	protected function _set_properties()
298
+	{
299
+		foreach ($this->_data as $prop => $value) {
300
+			if (property_exists($this, $prop)) {
301
+				$this->{$prop} = $value;
302
+			}
303
+		}
304
+		// if user_id present we'll use this to set the fname and lname and admin_email.
305
+		if (! empty($this->user_id)) {
306
+			$this->user_id = (int) $this->user_id;
307
+			$user = get_userdata($this->user_id);
308
+			$this->fname = $user->user_firstname;
309
+			$this->lname = $user->user_lastname;
310
+			$this->admin_email = $user->user_email;
311
+		}
312
+	}
313 313
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@
 block discarded – undo
302 302
             }
303 303
         }
304 304
         // if user_id present we'll use this to set the fname and lname and admin_email.
305
-        if (! empty($this->user_id)) {
305
+        if ( ! empty($this->user_id)) {
306 306
             $this->user_id = (int) $this->user_id;
307 307
             $user = get_userdata($this->user_id);
308 308
             $this->fname = $user->user_firstname;
Please login to merge, or discard this patch.
messages/data_class/EE_Messages_Registrations_incoming_data.class.php 2 patches
Indentation   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -17,172 +17,172 @@
 block discarded – undo
17 17
 {
18 18
 
19 19
 
20
-    /**
21
-     * Constructor.
22
-     *
23
-     * @param  EE_Registration[] $data expecting an array of EE_Registration objects.
24
-     * @throws EE_Error
25
-     * @access protected
26
-     */
27
-    public function __construct($data = array())
28
-    {
29
-
30
-        // validate that the first element in the array is an EE_Registration object.
31
-        if (! reset($data) instanceof EE_Registration) {
32
-            throw new EE_Error(
33
-                esc_html__(
34
-                    'The EE_Message_Registrations_incoming_data class expects an array of EE_Registration objects.',
35
-                    'event_espresso'
36
-                )
37
-            );
38
-        }
39
-        parent::__construct($data);
40
-    }
41
-
42
-
43
-    /**
44
-     * setup the data.
45
-     * Sets up the expected data object for the messages prep using incoming registration objects.
46
-     *
47
-     * @return void
48
-     * @throws EE_Error
49
-     * @throws EntityNotFoundException
50
-     * @access protected
51
-     */
52
-    protected function _setup_data()
53
-    {
54
-        // we'll loop through each contact and setup the data needed.  Note that many properties will just be set as
55
-        // empty because this data handler is for a very specific set of data (i.e. just what's related to the
56
-        // registration).
57
-
58
-        $this->reg_objs = $this->data();
59
-        $this->txn      = $this->_maybe_get_transaction();
60
-        $this->_assemble_data();
61
-    }
62
-
63
-
64
-    /**
65
-     * If the incoming registrations all share the same transaction then this will return the transaction object shared
66
-     * among the registrations. Otherwise the transaction object is set to null because its intended to only represent
67
-     * one transaction.
68
-     *
69
-     * @return EE_Transaction|null
70
-     * @throws EE_Error
71
-     * @throws EntityNotFoundException
72
-     */
73
-    protected function _maybe_get_transaction()
74
-    {
75
-        $transactions = array();
76
-        foreach ($this->reg_objs as $registration) {
77
-            if ($registration instanceof EE_Registration) {
78
-                $transaction = $registration->transaction();
79
-                if ($transaction instanceof EE_Transaction) {
80
-                    $transactions[ $transaction->ID() ] = $transaction;
81
-                }
82
-            }
83
-        }
84
-        return count($transactions) === 1 ? reset($transactions) : null;
85
-    }
86
-
87
-
88
-    /**
89
-     * Returns database safe representation of the data later used to when instantiating this object.
90
-     *
91
-     * @param array $registrations The incoming data to be prepped.
92
-     * @return EE_Registration[] The data being prepared for the db
93
-     * @throws EE_Error
94
-     * @throws InvalidArgumentException
95
-     * @throws InvalidDataTypeException
96
-     * @throws InvalidInterfaceException
97
-     */
98
-    public static function convert_data_for_persistent_storage($registrations)
99
-    {
100
-        if (! self::validateRegistrationsForConversion($registrations)) {
101
-            return array();
102
-        }
103
-
104
-        // is this an array of ints?
105
-        $first_item = reset($registrations);
106
-        if (is_int($first_item)) {
107
-            return $registrations;
108
-        }
109
-
110
-        // k nope so let's pull from the registrations
111
-        $registration_ids = array_filter(
112
-            array_map(
113
-                function ($registration) {
114
-                    if ($registration instanceof EE_Registration) {
115
-                        return $registration->ID();
116
-                    }
117
-                    return false;
118
-                },
119
-                $registrations
120
-            )
121
-        );
122
-
123
-        return $registration_ids;
124
-    }
125
-
126
-
127
-    /**
128
-     * This validates incoming registrations (considers whether they are ids or EE_Registration objects.
129
-     *
130
-     * @param array $registrations Could be EE_Registration[] or int[]
131
-     * @return bool
132
-     * @throws EE_Error
133
-     * @throws InvalidArgumentException
134
-     * @throws InvalidDataTypeException
135
-     * @throws InvalidInterfaceException
136
-     */
137
-    protected static function validateRegistrationsForConversion($registrations)
138
-    {
139
-        if (is_array($registrations)) {
140
-            $first_item = reset($registrations);
141
-            if ($first_item instanceof EE_Registration) {
142
-                return true;
143
-            }
144
-            if (is_int($first_item)) {
145
-                // k let's some basic validation here.  This isn't foolproof but better than nothing.
146
-                // the purpose of this validation is to verify that the ids sent in match valid registrations existing
147
-                // in the db.  If the count is different, then we know they aren't valid.
148
-                $count_for_ids = EEM_Registration::instance()->count(
149
-                    array(
150
-                        array(
151
-                            'REG_ID' => array('IN', $registrations)
152
-                        )
153
-                    )
154
-                );
155
-                return $count_for_ids === count($registrations);
156
-            }
157
-        }
158
-        return false;
159
-    }
160
-
161
-
162
-    /**
163
-     * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
164
-     * can be sent into this method and converted back into the format used for instantiating with this data handler.
165
-     *
166
-     * @param array $data
167
-     * @return EE_Registration[]
168
-     * @throws EE_Error
169
-     * @throws InvalidArgumentException
170
-     * @throws InvalidDataTypeException
171
-     * @throws InvalidInterfaceException
172
-     */
173
-    public static function convert_data_from_persistent_storage($data)
174
-    {
175
-        // since this was added later, we need to account of possible back compat issues where data already queued for
176
-        // generation is in the old format, which is an array of EE_Registration objects.  So if that's the case, then
177
-        // let's just return them
178
-        // @see https://events.codebasehq.com/projects/event-espresso/tickets/10127
179
-        if (is_array($data) && reset($data) instanceof EE_Registration) {
180
-            return $data;
181
-        }
182
-
183
-        $registrations = is_array($data)
184
-            ? EEM_Registration::instance()->get_all(array(array('REG_ID' => array('IN', $data))))
185
-            : array();
186
-        return $registrations;
187
-    }
20
+	/**
21
+	 * Constructor.
22
+	 *
23
+	 * @param  EE_Registration[] $data expecting an array of EE_Registration objects.
24
+	 * @throws EE_Error
25
+	 * @access protected
26
+	 */
27
+	public function __construct($data = array())
28
+	{
29
+
30
+		// validate that the first element in the array is an EE_Registration object.
31
+		if (! reset($data) instanceof EE_Registration) {
32
+			throw new EE_Error(
33
+				esc_html__(
34
+					'The EE_Message_Registrations_incoming_data class expects an array of EE_Registration objects.',
35
+					'event_espresso'
36
+				)
37
+			);
38
+		}
39
+		parent::__construct($data);
40
+	}
41
+
42
+
43
+	/**
44
+	 * setup the data.
45
+	 * Sets up the expected data object for the messages prep using incoming registration objects.
46
+	 *
47
+	 * @return void
48
+	 * @throws EE_Error
49
+	 * @throws EntityNotFoundException
50
+	 * @access protected
51
+	 */
52
+	protected function _setup_data()
53
+	{
54
+		// we'll loop through each contact and setup the data needed.  Note that many properties will just be set as
55
+		// empty because this data handler is for a very specific set of data (i.e. just what's related to the
56
+		// registration).
57
+
58
+		$this->reg_objs = $this->data();
59
+		$this->txn      = $this->_maybe_get_transaction();
60
+		$this->_assemble_data();
61
+	}
62
+
63
+
64
+	/**
65
+	 * If the incoming registrations all share the same transaction then this will return the transaction object shared
66
+	 * among the registrations. Otherwise the transaction object is set to null because its intended to only represent
67
+	 * one transaction.
68
+	 *
69
+	 * @return EE_Transaction|null
70
+	 * @throws EE_Error
71
+	 * @throws EntityNotFoundException
72
+	 */
73
+	protected function _maybe_get_transaction()
74
+	{
75
+		$transactions = array();
76
+		foreach ($this->reg_objs as $registration) {
77
+			if ($registration instanceof EE_Registration) {
78
+				$transaction = $registration->transaction();
79
+				if ($transaction instanceof EE_Transaction) {
80
+					$transactions[ $transaction->ID() ] = $transaction;
81
+				}
82
+			}
83
+		}
84
+		return count($transactions) === 1 ? reset($transactions) : null;
85
+	}
86
+
87
+
88
+	/**
89
+	 * Returns database safe representation of the data later used to when instantiating this object.
90
+	 *
91
+	 * @param array $registrations The incoming data to be prepped.
92
+	 * @return EE_Registration[] The data being prepared for the db
93
+	 * @throws EE_Error
94
+	 * @throws InvalidArgumentException
95
+	 * @throws InvalidDataTypeException
96
+	 * @throws InvalidInterfaceException
97
+	 */
98
+	public static function convert_data_for_persistent_storage($registrations)
99
+	{
100
+		if (! self::validateRegistrationsForConversion($registrations)) {
101
+			return array();
102
+		}
103
+
104
+		// is this an array of ints?
105
+		$first_item = reset($registrations);
106
+		if (is_int($first_item)) {
107
+			return $registrations;
108
+		}
109
+
110
+		// k nope so let's pull from the registrations
111
+		$registration_ids = array_filter(
112
+			array_map(
113
+				function ($registration) {
114
+					if ($registration instanceof EE_Registration) {
115
+						return $registration->ID();
116
+					}
117
+					return false;
118
+				},
119
+				$registrations
120
+			)
121
+		);
122
+
123
+		return $registration_ids;
124
+	}
125
+
126
+
127
+	/**
128
+	 * This validates incoming registrations (considers whether they are ids or EE_Registration objects.
129
+	 *
130
+	 * @param array $registrations Could be EE_Registration[] or int[]
131
+	 * @return bool
132
+	 * @throws EE_Error
133
+	 * @throws InvalidArgumentException
134
+	 * @throws InvalidDataTypeException
135
+	 * @throws InvalidInterfaceException
136
+	 */
137
+	protected static function validateRegistrationsForConversion($registrations)
138
+	{
139
+		if (is_array($registrations)) {
140
+			$first_item = reset($registrations);
141
+			if ($first_item instanceof EE_Registration) {
142
+				return true;
143
+			}
144
+			if (is_int($first_item)) {
145
+				// k let's some basic validation here.  This isn't foolproof but better than nothing.
146
+				// the purpose of this validation is to verify that the ids sent in match valid registrations existing
147
+				// in the db.  If the count is different, then we know they aren't valid.
148
+				$count_for_ids = EEM_Registration::instance()->count(
149
+					array(
150
+						array(
151
+							'REG_ID' => array('IN', $registrations)
152
+						)
153
+					)
154
+				);
155
+				return $count_for_ids === count($registrations);
156
+			}
157
+		}
158
+		return false;
159
+	}
160
+
161
+
162
+	/**
163
+	 * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
164
+	 * can be sent into this method and converted back into the format used for instantiating with this data handler.
165
+	 *
166
+	 * @param array $data
167
+	 * @return EE_Registration[]
168
+	 * @throws EE_Error
169
+	 * @throws InvalidArgumentException
170
+	 * @throws InvalidDataTypeException
171
+	 * @throws InvalidInterfaceException
172
+	 */
173
+	public static function convert_data_from_persistent_storage($data)
174
+	{
175
+		// since this was added later, we need to account of possible back compat issues where data already queued for
176
+		// generation is in the old format, which is an array of EE_Registration objects.  So if that's the case, then
177
+		// let's just return them
178
+		// @see https://events.codebasehq.com/projects/event-espresso/tickets/10127
179
+		if (is_array($data) && reset($data) instanceof EE_Registration) {
180
+			return $data;
181
+		}
182
+
183
+		$registrations = is_array($data)
184
+			? EEM_Registration::instance()->get_all(array(array('REG_ID' => array('IN', $data))))
185
+			: array();
186
+		return $registrations;
187
+	}
188 188
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
 
30 30
         // validate that the first element in the array is an EE_Registration object.
31
-        if (! reset($data) instanceof EE_Registration) {
31
+        if ( ! reset($data) instanceof EE_Registration) {
32 32
             throw new EE_Error(
33 33
                 esc_html__(
34 34
                     'The EE_Message_Registrations_incoming_data class expects an array of EE_Registration objects.',
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             if ($registration instanceof EE_Registration) {
78 78
                 $transaction = $registration->transaction();
79 79
                 if ($transaction instanceof EE_Transaction) {
80
-                    $transactions[ $transaction->ID() ] = $transaction;
80
+                    $transactions[$transaction->ID()] = $transaction;
81 81
                 }
82 82
             }
83 83
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public static function convert_data_for_persistent_storage($registrations)
99 99
     {
100
-        if (! self::validateRegistrationsForConversion($registrations)) {
100
+        if ( ! self::validateRegistrationsForConversion($registrations)) {
101 101
             return array();
102 102
         }
103 103
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         // k nope so let's pull from the registrations
111 111
         $registration_ids = array_filter(
112 112
             array_map(
113
-                function ($registration) {
113
+                function($registration) {
114 114
                     if ($registration instanceof EE_Registration) {
115 115
                         return $registration->ID();
116 116
                     }
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Payment_Refund_Validator.class.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'payment_refund';
22
-
23
-        parent::__construct($fields, $context);
24
-    }
25
-
26
-    /**
27
-     * at this point no custom validation needed for this messenger/message_type combo.
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-
33
-        // modify just event_list
34
-        $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
-            );
37
-        $new_config['ticket_list'] = array(
38
-            'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
-            );
40
-        $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
-            );
43
-        $this->_messenger->set_validator_config($new_config);
44
-
45
-        if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47
-        }
48
-
49
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
-    }
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'payment_refund';
22
+
23
+		parent::__construct($fields, $context);
24
+	}
25
+
26
+	/**
27
+	 * at this point no custom validation needed for this messenger/message_type combo.
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+
33
+		// modify just event_list
34
+		$new_config['event_list'] = array(
35
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
+			);
37
+		$new_config['ticket_list'] = array(
38
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39
+			);
40
+		$new_config['content'] = array(
41
+			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
+			);
43
+		$this->_messenger->set_validator_config($new_config);
44
+
45
+		if ($this->_context != 'admin') {
46
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47
+		}
48
+
49
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50
+	}
51 51
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
 
33 33
         // modify just event_list
34 34
         $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
35
+            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36 36
             );
37 37
         $new_config['ticket_list'] = array(
38 38
             'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
39 39
             );
40 40
         $new_config['content'] = array(
41
-            'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
41
+            'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42 42
             );
43 43
         $this->_messenger->set_validator_config($new_config);
44 44
 
45 45
         if ($this->_context != 'admin') {
46
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
46
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47 47
         }
48 48
 
49 49
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Registration_Summary_Validator.class.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -16,31 +16,31 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    public function __construct($fields, $context)
20
-    {
21
-        $this->_m_name = 'email';
22
-        $this->_mt_name = 'registration_summary';
19
+	public function __construct($fields, $context)
20
+	{
21
+		$this->_m_name = 'email';
22
+		$this->_mt_name = 'registration_summary';
23 23
 
24
-        parent::__construct($fields, $context);
25
-    }
24
+		parent::__construct($fields, $context);
25
+	}
26 26
 
27
-    /**
28
-     * custom validator (restricting what was originally set by the messenger)
29
-     */
30
-    protected function _modify_validator()
31
-    {
32
-        $new_config = $this->_messenger->get_validator_config();
33
-        // modify just event_list
34
-        $new_config['event_list'] = array(
35
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
36
-            'required' => array('[EVENT_LIST]')
37
-            );
38
-        $this->_messenger->set_validator_config($new_config);
27
+	/**
28
+	 * custom validator (restricting what was originally set by the messenger)
29
+	 */
30
+	protected function _modify_validator()
31
+	{
32
+		$new_config = $this->_messenger->get_validator_config();
33
+		// modify just event_list
34
+		$new_config['event_list'] = array(
35
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
36
+			'required' => array('[EVENT_LIST]')
37
+			);
38
+		$this->_messenger->set_validator_config($new_config);
39 39
 
40
-        if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42
-        }
40
+		if ($this->_context != 'admin') {
41
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42
+		}
43 43
 
44
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
45
-    }
44
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
45
+	}
46 46
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Registration_Validator.class.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'registration';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'registration';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (restricting what was originally set by the messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        // modify just event_list
33
-        $new_config['event_list'] = array(
34
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
-            'required' => array('[EVENT_LIST]')
36
-            );
37
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (restricting what was originally set by the messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		// modify just event_list
33
+		$new_config['event_list'] = array(
34
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
+			'required' => array('[EVENT_LIST]')
36
+			);
37
+		$this->_messenger->set_validator_config($new_config);
38 38
 
39
-        if ($this->_context != 'admin') {
40
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
-        }
39
+		if ($this->_context != 'admin') {
40
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+		}
42 42
 
43
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
-    }
43
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
+	}
45 45
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
email/EE_Messages_Email_Not_Approved_Registration_Validator.class.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,30 +15,30 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'not_approved_registration';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'not_approved_registration';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (restricting what was originally set by the messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        $new_config['event_list'] = array(
33
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
-            'required' => array('[EVENT_LIST]')
35
-            );
36
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (restricting what was originally set by the messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		$new_config['event_list'] = array(
33
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
34
+			'required' => array('[EVENT_LIST]')
35
+			);
36
+		$this->_messenger->set_validator_config($new_config);
37 37
 
38
-        if ($this->_context != 'admin') {
39
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
40
-        }
38
+		if ($this->_context != 'admin') {
39
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
40
+		}
41 41
 
42
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
-    }
42
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
43
+	}
44 44
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Pending_Approval_Validator.class.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,31 +15,31 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    public function __construct($fields, $context)
19
-    {
20
-        $this->_m_name = 'email';
21
-        $this->_mt_name = 'pending_approval';
18
+	public function __construct($fields, $context)
19
+	{
20
+		$this->_m_name = 'email';
21
+		$this->_mt_name = 'pending_approval';
22 22
 
23
-        parent::__construct($fields, $context);
24
-    }
23
+		parent::__construct($fields, $context);
24
+	}
25 25
 
26
-    /**
27
-     * custom validator (restricting what was originally set by the messenger)
28
-     */
29
-    protected function _modify_validator()
30
-    {
31
-        $new_config = $this->_messenger->get_validator_config();
32
-        // modify just event_list
33
-        $new_config['event_list'] = array(
34
-            'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
-            'required' => array('[EVENT_LIST]')
36
-            );
37
-        $this->_messenger->set_validator_config($new_config);
26
+	/**
27
+	 * custom validator (restricting what was originally set by the messenger)
28
+	 */
29
+	protected function _modify_validator()
30
+	{
31
+		$new_config = $this->_messenger->get_validator_config();
32
+		// modify just event_list
33
+		$new_config['event_list'] = array(
34
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
35
+			'required' => array('[EVENT_LIST]')
36
+			);
37
+		$this->_messenger->set_validator_config($new_config);
38 38
 
39
-        if ($this->_context != 'admin') {
40
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
-        }
39
+		if ($this->_context != 'admin') {
40
+			$this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+		}
42 42
 
43
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
-    }
43
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
44
+	}
45 45
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->_messenger->set_validator_config($new_config);
39 39
 
40 40
         if ($this->_context != 'admin') {
41
-            $this->_valid_shortcodes_modifier[ $this->_context ]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
41
+            $this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
42 42
         }
43 43
 
44 44
         $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.