Completed
Branch Gutenberg/espresso-cpt-editor (d57906)
by
unknown
78:21 queued 69:49
created
defaults/default/email_registration_summary_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/EE_Message_To_Generate_From_Request.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
 	 * @param   EE_Message_Resource_Manager $message_resource_manager
39 39
 	 * @param   EE_Request_Handler 			$request
40 40
 	 */
41
-	public function __construct( EE_Message_Resource_Manager $message_resource_manager, EE_Request_Handler $request ) {
41
+	public function __construct(EE_Message_Resource_Manager $message_resource_manager, EE_Request_Handler $request) {
42 42
 		parent::__construct(
43
-			$request->get( 'gen_msgr' ),
44
-			$request->get( 'message_type' ),
43
+			$request->get('gen_msgr'),
44
+			$request->get('message_type'),
45 45
 			array(),
46
-			$request->get( 'context' )
46
+			$request->get('context')
47 47
 		);
48
-		if ( ! $this->valid() ) {
48
+		if ( ! $this->valid()) {
49 49
 			return;
50 50
 		}
51
-		$this->_sending_messenger = $message_resource_manager->get_active_messenger( $request->get( 'snd_msgr' ) );
52
-		$this->token = $request->get( 'token' );
51
+		$this->_sending_messenger = $message_resource_manager->get_active_messenger($request->get('snd_msgr'));
52
+		$this->token = $request->get('token');
53 53
 		$this->_validate_request();
54
-		$this->_data = $this->_get_data_from_request( $request->get( 'id' ) );
54
+		$this->_data = $this->_get_data_from_request($request->get('id'));
55 55
 	}
56 56
 
57 57
 
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 			! $this->_sending_messenger instanceof EE_messenger
76 76
 			|| ! $this->_messenger instanceof EE_messenger
77 77
 			|| ! $this->_message_type instanceof EE_message_type
78
-			|| empty( $this->_context )
79
-			|| empty( $this->token )
78
+			|| empty($this->_context)
79
+			|| empty($this->token)
80 80
 		) {
81
-			throw new EE_Error( __( 'The request for the "msg_url_trigger" route has a malformed url.', 'event_espresso' ) );
81
+			throw new EE_Error(__('The request for the "msg_url_trigger" route has a malformed url.', 'event_espresso'));
82 82
 		}
83 83
 	}
84 84
 
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
 	 * @throws EE_Error
91 91
 	 * @return mixed (whatever the data is returned from the message type).
92 92
 	 */
93
-	protected function _get_data_from_request( $id ) {
93
+	protected function _get_data_from_request($id) {
94 94
 		//get the EE_Registration from the token
95 95
 		/** @type EE_Registration $registration */
96
-		$registration = EEM_Registration::instance()->get_one( array( array( 'REG_url_link' => $this->token ) ) );
96
+		$registration = EEM_Registration::instance()->get_one(array(array('REG_url_link' => $this->token)));
97 97
 		//if no registration then bail early.
98
-		if ( ! $registration instanceof EE_Registration ) {
99
-			throw new EE_Error( __( 'Unable to complete the request because the token is invalid.', 'event_espresso' ) );
98
+		if ( ! $registration instanceof EE_Registration) {
99
+			throw new EE_Error(__('Unable to complete the request because the token is invalid.', 'event_espresso'));
100 100
 		}
101 101
 
102
-		return $this->_get_data_to_use( $registration, $id );
102
+		return $this->_get_data_to_use($registration, $id);
103 103
 	}
104 104
 
105 105
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 	 * @param int             $data_id   This is sometimes used for secondary data a message type requires.
112 112
 	 * @return mixed   Data prepared as needed for generating this message.
113 113
 	 */
114
-	protected function _get_data_to_use( $registration, $data_id ) {
114
+	protected function _get_data_to_use($registration, $data_id) {
115 115
 		//use incoming data from url to setup data for the message type requirements
116
-		return $this->_message_type->get_data_for_context( $this->_context, $registration, $data_id );
116
+		return $this->_message_type->get_data_for_context($this->_context, $registration, $data_id);
117 117
 	}
118 118
 
119 119
 
Please login to merge, or discard this patch.
core/libraries/messages/EE_Messages_Data_Handler_Collection.lib.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if (!defined('EVENT_ESPRESSO_VERSION')) {
3 3
 	exit('No direct script access allowed');
4
+}
4 5
 
5 6
 
6 7
 /**
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 
5 5
 
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	 *                                                   classname to create an alternative index for retrieving data_handlers.
27 27
 	 * @return bool
28 28
 	 */
29
-	public function add( $data_handler, $data = null) {
29
+	public function add($data_handler, $data = null) {
30 30
 		$data = $data === null ? array() : (array) $data;
31
-		$info['key'] = $this->get_key( get_class( $data_handler ), $data );
32
-		return parent::add( $data_handler, $info );
31
+		$info['key'] = $this->get_key(get_class($data_handler), $data);
32
+		return parent::add($data_handler, $info);
33 33
 	}
34 34
 	
35 35
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	 *
45 45
 	 * @return  string      md5 hash using provided info.
46 46
 	 */
47
-	public function get_key( $classname, $data ) {
48
-		return md5( $classname . serialize( $data ) );
47
+	public function get_key($classname, $data) {
48
+		return md5($classname.serialize($data));
49 49
 	}
50 50
 
51 51
 
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
 	 *
62 62
 	 * @return null|EE_Messages_incoming_data
63 63
 	 */
64
-	public function get_by_key( $key ) {
64
+	public function get_by_key($key) {
65 65
 		$this->rewind();
66
-		while( $this->valid() ) {
66
+		while ($this->valid()) {
67 67
 			$data = $this->getInfo();
68
-			if ( isset( $data['key'] ) && $data['key'] === $key ) {
68
+			if (isset($data['key']) && $data['key'] === $key) {
69 69
 				$handler = $this->current();
70 70
 				$this->rewind();
71 71
 				return $handler;
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Registration_message_type.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
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,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
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,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
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,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
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,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Event_List_Shortcodes.lib.php 2 patches
Spacing   +10 added lines, -10 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
 /**
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
 
50 50
 
51
-	protected function _parser( $shortcode ) {
52
-		switch ( $shortcode ) {
51
+	protected function _parser($shortcode) {
52
+		switch ($shortcode) {
53 53
 			case '[EVENT_LIST]' :
54 54
 				return $this->_get_event_list();
55 55
 				break;
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 	private function _get_event_list() {
66 66
 		$this->_validate_list_requirements();
67 67
 
68
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
68
+		if ($this->_data['data'] instanceof EE_Messages_Addressee)
69 69
 			return $this->_get_event_list_for_main();
70 70
 
71
-		else if ( $this->_data['data'] instanceof EE_Registration )
71
+		else if ($this->_data['data'] instanceof EE_Registration)
72 72
 			return $this->_get_event_list_for_registration();
73 73
 
74 74
 		//prevent recursive loop
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		$events = '';
91 91
 
92 92
 		//now we need to loop through the events array in EE_Messages_Addressee and send data to the EE_Parser helper.
93
-		foreach ( $data->events as $event ) {
93
+		foreach ($data->events as $event) {
94 94
 			$events .= $this->_shortcode_helper->parse_event_list_template($template, $event['event'], $valid_shortcodes, $this->_extra_data);
95 95
 		}
96 96
 		return $events;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	private function _get_event_list_for_registration() {
108 108
 		$valid_shortcodes = array('event', 'ticket_list', 'datetime_list', 'attendee', 'event_author', 'recipient_details', 'recipient_list', 'venue');
109
-		$template = is_array( $this->_data['template'] ) && isset($this->_data['template']['event_list']) ? $this->_data['template']['event_list'] : $this->_extra_data['template']['event_list'];
109
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['event_list']) ? $this->_data['template']['event_list'] : $this->_extra_data['template']['event_list'];
110 110
 		$registration = $this->_data['data'];
111 111
 
112 112
 		//let's remove any existing [ATTENDEE_LIST] shortcode from the event list template so that we don't get recursion.
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		//we're NOT going to prepare a list of attendees this time around
120 120
 		$events = '';
121 121
 
122
-		foreach ( (array) $all_events as $event ) {
122
+		foreach ((array) $all_events as $event) {
123 123
 			$events .= $this->_shortcode_helper->parse_event_list_template($template, $event, $valid_shortcodes, $this->_extra_data);
124 124
 		}
125 125
 
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 
129 129
 
130 130
 
131
-	private function _get_events_from_registration( EE_Registration $registration ) {
132
-		return isset( $this->_extra_data['data']->registrations ) ? array($this->_extra_data['data']->registrations[$registration->ID()]['evt_obj']) : array();
131
+	private function _get_events_from_registration(EE_Registration $registration) {
132
+		return isset($this->_extra_data['data']->registrations) ? array($this->_extra_data['data']->registrations[$registration->ID()]['evt_obj']) : array();
133 133
 	}
134 134
 
135 135
 
Please login to merge, or discard this patch.
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  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 7
 /**
7 8
  * Event Espresso
@@ -65,15 +66,16 @@  discard block
 block discarded – undo
65 66
 	private function _get_event_list() {
66 67
 		$this->_validate_list_requirements();
67 68
 
68
-		if ( $this->_data['data'] instanceof EE_Messages_Addressee )
69
-			return $this->_get_event_list_for_main();
70
-
71
-		else if ( $this->_data['data'] instanceof EE_Registration )
72
-			return $this->_get_event_list_for_registration();
69
+		if ( $this->_data['data'] instanceof EE_Messages_Addressee ) {
70
+					return $this->_get_event_list_for_main();
71
+		} else if ( $this->_data['data'] instanceof EE_Registration ) {
72
+					return $this->_get_event_list_for_registration();
73
+		}
73 74
 
74 75
 		//prevent recursive loop
75
-		else
76
-			return '';
76
+		else {
77
+					return '';
78
+		}
77 79
 	}
78 80
 
79 81
 
Please login to merge, or discard this patch.