Completed
Pull Request — master (#1221)
by
unknown
11:14 queued 11s
created
libraries/messages/data_class/EE_Messages_Gateways_incoming_data.class.php 2 patches
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -14,141 +14,141 @@
 block discarded – undo
14 14
 class EE_Messages_Gateways_incoming_data extends EE_Messages_incoming_data
15 15
 {
16 16
 
17
-    /**
18
-     * This holds the incoming payment object
19
-     * @var EE_Payment
20
-     */
21
-    public $payment;
22
-
23
-
24
-
25
-    /**
26
-     * incoming data is expected to be a EE_Transaction object and (possibly) EE_Payment object in an array.
27
-     *
28
-     * @param array $data
29
-     * @throws EE_Error
30
-     */
31
-    public function __construct($data)
32
-    {
33
-
34
-        // test for valid params
35
-        if (! ( $data[0] instanceof EE_Transaction )) {
36
-            throw new EE_Error(__('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso'));
37
-        }
38
-
39
-        if (empty($data[1]) || ! $data[1] instanceof  EE_Payment) {
40
-            $pmt_obj = $this->_get_empty_payment_obj($data[0]);
41
-        }
42
-
43
-        if (! empty($data[2])) {
44
-            $filtered_reg_status = $data[2];
45
-        }
17
+	/**
18
+	 * This holds the incoming payment object
19
+	 * @var EE_Payment
20
+	 */
21
+	public $payment;
22
+
23
+
24
+
25
+	/**
26
+	 * incoming data is expected to be a EE_Transaction object and (possibly) EE_Payment object in an array.
27
+	 *
28
+	 * @param array $data
29
+	 * @throws EE_Error
30
+	 */
31
+	public function __construct($data)
32
+	{
33
+
34
+		// test for valid params
35
+		if (! ( $data[0] instanceof EE_Transaction )) {
36
+			throw new EE_Error(__('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso'));
37
+		}
38
+
39
+		if (empty($data[1]) || ! $data[1] instanceof  EE_Payment) {
40
+			$pmt_obj = $this->_get_empty_payment_obj($data[0]);
41
+		}
42
+
43
+		if (! empty($data[2])) {
44
+			$filtered_reg_status = $data[2];
45
+		}
46 46
 
47
-        $data = array(
48
-            'txn_obj' => $data[0],
49
-            'pmt_obj' => isset($pmt_obj) ? $pmt_obj : $data[1],
50
-            'filtered_reg_status' => isset($filtered_reg_status) ? $filtered_reg_status : null
51
-            );
52
-        parent::__construct($data);
53
-    }
54
-
55
-
56
-
57
-
58
-
59
-    /**
60
-     * Returns database safe representation of the data later used to when instantiating this object.
61
-     *
62
-     * @param array $data The incoming data to be prepped.
63
-     *
64
-     * @return array   The prepped data for db
65
-     */
66
-    public static function convert_data_for_persistent_storage($data)
67
-    {
68
-        $prepped_data = array();
69
-
70
-        if ($data[0] instanceof EE_Transaction) {
71
-            $prepped_data['Transaction'] = $data[0]->ID();
72
-        }
73
-
74
-        if (isset($data[1]) && $data[1] instanceof EE_Payment) {
75
-            $prepped_data['Payment'] = $data[1]->ID();
76
-        }
77
-
78
-        if (! empty($data[2])) {
79
-            $prepped_data['filter'] = $data[2];
80
-        }
81
-
82
-        return $prepped_data;
83
-    }
84
-
85
-
86
-
87
-
88
-
89
-
90
-    /**
91
-     * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
92
-     * can be sent into this method and converted back into the format used for instantiating with this data handler.
93
-     *
94
-     * @param array  $data
95
-     *
96
-     * @return array
97
-     */
98
-    public static function convert_data_from_persistent_storage($data)
99
-    {
100
-        $prepped_data = array(
101
-            0 => isset($data['Transaction']) ? EEM_Transaction::instance()->get_one_by_ID($data['Transaction']) : null,
102
-            1 => isset($data['Payment']) ? EEM_Payment::instance()->get_one_by_ID($data['Payment']) : null,
103
-            2 => isset($data['filter']) ? $data['filter'] : null
104
-        );
105
-        return $prepped_data;
106
-    }
107
-
108
-
109
-    /**
110
-     * This sets up an empty EE_Payment object for the purpose of shortcode parsing.  Note that this doesn't actually get saved to the db.
111
-     * @param \EE_Transaction $txn
112
-     * @return \EE_Payment
113
-     */
114
-    private function _get_empty_payment_obj(EE_Transaction $txn)
115
-    {
116
-        $PMT = EE_Payment::new_instance(array(
117
-            'STS_ID' => EEM_Payment::status_id_pending,
118
-            'PAY_timestamp' => time(),
119
-            'PMD_ID' => $txn->payment_method_ID(),
120
-            'PAY_gateway_response' => $txn->gateway_response_on_transaction(),
121
-            ));
122
-        return $PMT;
123
-    }
124
-
125
-
126
-
127
-    /**
128
-     * _setup_data
129
-     *
130
-     * @throws EE_Error
131
-     */
132
-    protected function _setup_data()
133
-    {
134
-
135
-        $this->reg_info = array();
136
-
137
-        $this->txn = $this->_data['txn_obj'];
138
-        $this->payment = $this->_data['pmt_obj'];
139
-        $this->filtered_reg_status = $this->_data['filtered_reg_status'];
140
-        $this->incoming_data = $this->_data;
141
-
142
-        $session_data = $this->txn->session_data();
143
-
144
-
145
-        // other data from the session (if possible)
146
-        $this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
147
-        $this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
148
-        $this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
149
-        $this->init_access = $this->last_access = '';
150
-        // get all non-trashed registrations
151
-        $this->reg_objs = $this->txn->registrations(array(array('REG_deleted' => false)));
152
-        $this->_assemble_data();
153
-    }
47
+		$data = array(
48
+			'txn_obj' => $data[0],
49
+			'pmt_obj' => isset($pmt_obj) ? $pmt_obj : $data[1],
50
+			'filtered_reg_status' => isset($filtered_reg_status) ? $filtered_reg_status : null
51
+			);
52
+		parent::__construct($data);
53
+	}
54
+
55
+
56
+
57
+
58
+
59
+	/**
60
+	 * Returns database safe representation of the data later used to when instantiating this object.
61
+	 *
62
+	 * @param array $data The incoming data to be prepped.
63
+	 *
64
+	 * @return array   The prepped data for db
65
+	 */
66
+	public static function convert_data_for_persistent_storage($data)
67
+	{
68
+		$prepped_data = array();
69
+
70
+		if ($data[0] instanceof EE_Transaction) {
71
+			$prepped_data['Transaction'] = $data[0]->ID();
72
+		}
73
+
74
+		if (isset($data[1]) && $data[1] instanceof EE_Payment) {
75
+			$prepped_data['Payment'] = $data[1]->ID();
76
+		}
77
+
78
+		if (! empty($data[2])) {
79
+			$prepped_data['filter'] = $data[2];
80
+		}
81
+
82
+		return $prepped_data;
83
+	}
84
+
85
+
86
+
87
+
88
+
89
+
90
+	/**
91
+	 * Data that has been stored in persistent storage that was prepped by _convert_data_for_persistent_storage
92
+	 * can be sent into this method and converted back into the format used for instantiating with this data handler.
93
+	 *
94
+	 * @param array  $data
95
+	 *
96
+	 * @return array
97
+	 */
98
+	public static function convert_data_from_persistent_storage($data)
99
+	{
100
+		$prepped_data = array(
101
+			0 => isset($data['Transaction']) ? EEM_Transaction::instance()->get_one_by_ID($data['Transaction']) : null,
102
+			1 => isset($data['Payment']) ? EEM_Payment::instance()->get_one_by_ID($data['Payment']) : null,
103
+			2 => isset($data['filter']) ? $data['filter'] : null
104
+		);
105
+		return $prepped_data;
106
+	}
107
+
108
+
109
+	/**
110
+	 * This sets up an empty EE_Payment object for the purpose of shortcode parsing.  Note that this doesn't actually get saved to the db.
111
+	 * @param \EE_Transaction $txn
112
+	 * @return \EE_Payment
113
+	 */
114
+	private function _get_empty_payment_obj(EE_Transaction $txn)
115
+	{
116
+		$PMT = EE_Payment::new_instance(array(
117
+			'STS_ID' => EEM_Payment::status_id_pending,
118
+			'PAY_timestamp' => time(),
119
+			'PMD_ID' => $txn->payment_method_ID(),
120
+			'PAY_gateway_response' => $txn->gateway_response_on_transaction(),
121
+			));
122
+		return $PMT;
123
+	}
124
+
125
+
126
+
127
+	/**
128
+	 * _setup_data
129
+	 *
130
+	 * @throws EE_Error
131
+	 */
132
+	protected function _setup_data()
133
+	{
134
+
135
+		$this->reg_info = array();
136
+
137
+		$this->txn = $this->_data['txn_obj'];
138
+		$this->payment = $this->_data['pmt_obj'];
139
+		$this->filtered_reg_status = $this->_data['filtered_reg_status'];
140
+		$this->incoming_data = $this->_data;
141
+
142
+		$session_data = $this->txn->session_data();
143
+
144
+
145
+		// other data from the session (if possible)
146
+		$this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
147
+		$this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
148
+		$this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
149
+		$this->init_access = $this->last_access = '';
150
+		// get all non-trashed registrations
151
+		$this->reg_objs = $this->txn->registrations(array(array('REG_deleted' => false)));
152
+		$this->_assemble_data();
153
+	}
154 154
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
 
34 34
         // test for valid params
35
-        if (! ( $data[0] instanceof EE_Transaction )) {
35
+        if ( ! ($data[0] instanceof EE_Transaction)) {
36 36
             throw new EE_Error(__('Incoming data for the Gateways data handler must have an EE_Transaction object as the value for the first array index.', 'event_espresso'));
37 37
         }
38 38
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $pmt_obj = $this->_get_empty_payment_obj($data[0]);
41 41
         }
42 42
 
43
-        if (! empty($data[2])) {
43
+        if ( ! empty($data[2])) {
44 44
             $filtered_reg_status = $data[2];
45 45
         }
46 46
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $prepped_data['Payment'] = $data[1]->ID();
76 76
         }
77 77
 
78
-        if (! empty($data[2])) {
78
+        if ( ! empty($data[2])) {
79 79
             $prepped_data['filter'] = $data[2];
80 80
         }
81 81
 
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.
messages/validators/email/EE_Messages_Email_Payment_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';
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';
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.
messages/validators/html/EE_Messages_Html_Invoice_Validator.class.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,21 +16,21 @@
 block discarded – undo
16 16
 class EE_Messages_Html_Invoice_Validator extends EE_Messages_Validator
17 17
 {
18 18
 
19
-    public function __construct($fields, $context)
20
-    {
21
-        $this->_m_name = 'html';
22
-        $this->_mt_name = 'invoice';
19
+	public function __construct($fields, $context)
20
+	{
21
+		$this->_m_name = 'html';
22
+		$this->_mt_name = 'invoice';
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
-     * Note nothing is currently done for this messenger and message type.
30
-     */
31
-    protected function _modify_validator()
32
-    {
33
-        $this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]');
34
-        return;
35
-    }
27
+	/**
28
+	 * custom validator (restricting what was originally set by the messenger).
29
+	 * Note nothing is currently done for this messenger and message type.
30
+	 */
31
+	protected function _modify_validator()
32
+	{
33
+		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_HTML_URL]');
34
+		return;
35
+	}
36 36
 }
Please login to merge, or discard this patch.