Completed
Branch BUG-10434-reg-cancel-shortcode... (f76056)
by
unknown
14:04
created
core/libraries/messages/data_class/EE_Messages_REG_incoming_data.class.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -29,20 +29,20 @@  discard block
 block discarded – undo
29 29
 	 * @param EE_Registration|array $data
30 30
 	 * @throws \EE_Error
31 31
 	 */
32
-	public function __construct( $data ) {
32
+	public function __construct($data) {
33 33
 		$filtered_reg_status = null;
34 34
 
35
-		if ( ! is_array( $data ) && $data instanceof EE_Registration ) {
35
+		if ( ! is_array($data) && $data instanceof EE_Registration) {
36 36
 			$this->reg_obj = $data;
37 37
 		} else {
38
-			$this->reg_obj = is_array( $data ) && isset( $data[0] ) && $data[0] instanceof EE_Registration ? $data[0] : null;
39
-			$filtered_reg_status = is_array( $data ) && ! empty( $data[1] ) ? $data[1] : null;
38
+			$this->reg_obj = is_array($data) && isset($data[0]) && $data[0] instanceof EE_Registration ? $data[0] : null;
39
+			$filtered_reg_status = is_array($data) && ! empty($data[1]) ? $data[1] : null;
40 40
 		}
41 41
 
42
-		if ( ! $this->reg_obj instanceof EE_Registration ) {
42
+		if ( ! $this->reg_obj instanceof EE_Registration) {
43 43
 			throw new EE_Error(
44 44
 				sprintf(
45
-					__( '%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'),
45
+					__('%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'),
46 46
 					'EE_Messages_REG_incoming_data',
47 47
 					'EE_Registration'
48 48
 				)
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return array   The prepped data for db
66 66
 	 */
67
-	static public function convert_data_for_persistent_storage( $data ) {
67
+	static public function convert_data_for_persistent_storage($data) {
68 68
 		$prepped_data = array();
69
-		if ( ! is_array( $data ) && $data instanceof EE_Registration ) {
69
+		if ( ! is_array($data) && $data instanceof EE_Registration) {
70 70
 			$prepped_data['Registration'] = $data->ID();
71 71
 			return $prepped_data;
72
-		} elseif ( ! is_array( $data ) ) {
72
+		} elseif ( ! is_array($data)) {
73 73
 			return array();
74 74
 		} else {
75
-			if ( $data[0] instanceof EE_Registration ) {
75
+			if ($data[0] instanceof EE_Registration) {
76 76
 				$prepped_data['Registration'] = $data[0];
77 77
 			}
78
-			if ( ! empty( $data[1] ) ) {
78
+			if ( ! empty($data[1])) {
79 79
 				$prepped_data['filter'] = $data[1];
80 80
 			}
81 81
 		}
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @return mixed
93 93
 	 */
94
-	static public function convert_data_from_persistent_storage( $data ) {
94
+	static public function convert_data_from_persistent_storage($data) {
95 95
 		$registration = null;
96 96
 		//$data['Registration'] could be either an ID (back compat) or a registration object (prepped using old system).
97
-		if ( isset( $data[ 'Registration' ] ) ) {
98
-			$registration = $data[ 'Registration' ] instanceof EE_Registration
99
-				? $data[ 'Registration' ]
100
-				: EEM_Registration::instance()->get_one_by_ID( $data[ 'Registration' ] );
97
+		if (isset($data['Registration'])) {
98
+			$registration = $data['Registration'] instanceof EE_Registration
99
+				? $data['Registration']
100
+				: EEM_Registration::instance()->get_one_by_ID($data['Registration']);
101 101
 		}
102 102
 		$prepped_data = array(
103 103
 			0 => $registration,
104
-			1 => isset( $data['filter'] ) ? $data['filter'] : null
104
+			1 => isset($data['filter']) ? $data['filter'] : null
105 105
 		);
106 106
 		return $prepped_data;
107 107
 	}
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
 		$this->txn = $this->reg_obj->transaction();
120 120
 		//possible session stuff?
121 121
 		$session = $this->txn->session_data();
122
-		$session_data =  $session instanceof EE_Session ? $session->get_session_data() : array();
122
+		$session_data = $session instanceof EE_Session ? $session->get_session_data() : array();
123 123
 
124 124
 		//other data from the session (if possible)
125
-		$this->user_id = isset( $session_data['user_id'] ) ? $session_data['user_id'] : '';
126
-		$this->ip_address = isset( $session_data['ip_address'] ) ? $session_data['ip_address'] : '';
127
-		$this->user_agent = isset( $session_data['user_agent'] ) ? $session_data['user_agent'] : '';
125
+		$this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
126
+		$this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
127
+		$this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
128 128
 		$this->init_access = $this->last_access = '';
129 129
 
130 130
 		$this->payment = $this->txn->get_first_related('Payment');
131 131
 		// if there is no payments associated with the transaction
132 132
 		// then we just create a default payment object for potential parsing.
133
-		$this->payment = empty( $this->payment )
133
+		$this->payment = empty($this->payment)
134 134
 			? EE_Payment::new_instance(
135 135
 				array(
136 136
 					'STS_ID'               => EEM_Payment::status_id_pending,
Please login to merge, or discard this patch.
default/email_not_approved_registration_attendee_list_admin.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <h4><a href="[EDIT_ATTENDEE_LINK]">[FNAME] [LNAME]</a></h4>
2 2
 <ul>
3 3
 	<li>
4
-		<strong><?php _e( 'Registration Code:', 'event_espresso' ); ?></strong>
4
+		<strong><?php _e('Registration Code:', 'event_espresso'); ?></strong>
5 5
 		<a href="[EDIT_ATTENDEE_LINK]">[REGISTRATION_CODE]</a>
6 6
 	</li>
7 7
 	<li>
8
-		<strong><?php _e( 'Tickets:', 'event_espresso' ); ?></strong>
8
+		<strong><?php _e('Tickets:', 'event_espresso'); ?></strong>
9 9
 		<ul>[TICKET_LIST]</ul>
10 10
 	</li>
11 11
 </ul>
Please login to merge, or discard this patch.
messages/defaults/default/email_pending_approval_event_list.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 		<tbody>
4 4
 			<tr>
5 5
 				<td>
6
-					<p class="callout"><strong><?php _e( 'Event:', 'event_espresso' ); ?> [EVENT_LINK]</strong></p>
6
+					<p class="callout"><strong><?php _e('Event:', 'event_espresso'); ?> [EVENT_LINK]</strong></p>
7 7
 				</td>
8 8
 			</tr>
9 9
 		</tbody>
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 			<tbody>
17 17
 				<tr>
18 18
 					<td>
19
-						<h3><?php _e( 'Registrant(s):', 'event_espresso' ); ?></h3>
19
+						<h3><?php _e('Registrant(s):', 'event_espresso'); ?></h3>
20 20
 						[ATTENDEE_LIST]
21 21
 					</td>
22 22
 				</tr>
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Invoice_message_type.class.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 	protected function _set_admin_pages() {
35
-		$this->admin_registered_pages = array( 'events_edit' => TRUE );
35
+		$this->admin_registered_pages = array('events_edit' => TRUE);
36 36
 	}
37 37
 
38 38
 
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
 	protected function _set_with_messengers() {
47 47
 		$this->_with_messengers = array(
48
-			'html' => array( 'pdf' )
48
+			'html' => array('pdf')
49 49
 			);
50 50
 	}
51 51
 
52 52
 
53 53
 
54
-	protected function _get_data_for_context( $context, EE_Registration $registration, $id ) {
54
+	protected function _get_data_for_context($context, EE_Registration $registration, $id) {
55 55
 		//receipt message type data handler is 'Gateways' and it expects a transaction object.
56 56
 		$transaction = $registration->transaction();
57
-		if ( $transaction instanceof EE_Transaction ) {
58
-			return array( $transaction );
57
+		if ($transaction instanceof EE_Transaction) {
58
+			return array($transaction);
59 59
 		}
60 60
 		return array();
61 61
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage plugin api, messages
6 6
  * @since           4.5.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * Use this to register or deregister a new message template pack variation for the EE messages system.
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,12 +87,12 @@
 block discarded – undo
87 87
 
88 88
 
89 89
 	/**
90
-	* used to set the valid shortcodes for the receipt message type
91
-	*
92
-	* @since   4.5.0
93
-	*
94
-	* @return  void
95
-	*/
90
+	 * used to set the valid shortcodes for the receipt message type
91
+	 *
92
+	 * @since   4.5.0
93
+	 *
94
+	 * @return  void
95
+	 */
96 96
 	protected function _set_valid_shortcodes() {
97 97
 		$this->_valid_shortcodes['purchaser'] = array(
98 98
 			'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment'
Please login to merge, or discard this patch.
messages/message_type/EE_Not_Approved_Registration_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
libraries/messages/message_type/EE_Payment_Refund_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Payment_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
libraries/messages/message_type/EE_Pending_Approval_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
messages/message_type/EE_Registration_Summary_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.