Completed
Branch BUG-9715-shortcode-resources (0cf20f)
by
unknown
695:33 queued 678:11
created
core/helpers/EEH_Schema.helper.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public static function location( $location = null ) {
31 31
 		return ! empty( $location ) ? '<div itemprop="location" itemscope itemtype="http://schema.org/Place">'
32
-		                              . $location
33
-		                              . '</div>' : '';
32
+									  . $location
33
+									  . '</div>' : '';
34 34
 	}
35 35
 
36 36
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 */
151 151
 	public static function postalCode( EEI_Address $obj_with_address = null ) {
152 152
 		return $obj_with_address->zip() !== null && $obj_with_address->zip() !== '' ? '<span itemprop="postalCode">'
153
-		                                                                              . $obj_with_address->zip()
154
-		                                                                              . '</span>' : '';
153
+																					  . $obj_with_address->zip()
154
+																					  . '</span>' : '';
155 155
 	}
156 156
 
157 157
 
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
4
-	exit( 'No direct script access allowed' );
3
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
4
+	exit('No direct script access allowed');
5 5
 }
6 6
 
7 7
 
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 	 * @param string $location
28 28
 	 * @return string
29 29
 	 */
30
-	public static function location( $location = null ) {
31
-		return ! empty( $location ) ? '<div itemprop="location" itemscope itemtype="http://schema.org/Place">'
30
+	public static function location($location = null) {
31
+		return ! empty($location) ? '<div itemprop="location" itemscope itemtype="http://schema.org/Place">'
32 32
 		                              . $location
33 33
 		                              . '</div>' : '';
34 34
 	}
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @param string $name
44 44
 	 * @return string
45 45
 	 */
46
-	public static function name( $name = null ) {
47
-		return ! empty( $name ) ? '<span itemprop="name">' . $name . '</span>' : '';
46
+	public static function name($name = null) {
47
+		return ! empty($name) ? '<span itemprop="name">'.$name.'</span>' : '';
48 48
 	}
49 49
 
50 50
 
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
 	 * @param EEI_Address $obj_with_address
58 58
 	 * @return string
59 59
 	 */
60
-	public static function streetAddress( EEI_Address $obj_with_address = null ) {
60
+	public static function streetAddress(EEI_Address $obj_with_address = null) {
61 61
 		return $obj_with_address->address() !== null && $obj_with_address->address() !== ''
62
-			? '<span itemprop="streetAddress">' . $obj_with_address->address() . '</span>' : '';
62
+			? '<span itemprop="streetAddress">'.$obj_with_address->address().'</span>' : '';
63 63
 	}
64 64
 
65 65
 
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
 	 * @param EEI_Address $obj_with_address
73 73
 	 * @return string
74 74
 	 */
75
-	public static function postOfficeBoxNumber( EEI_Address $obj_with_address = null ) {
75
+	public static function postOfficeBoxNumber(EEI_Address $obj_with_address = null) {
76 76
 		// regex check for some form of PO Box or P.O. Box, etc, etc, etc
77
-		if ( preg_match(
77
+		if (preg_match(
78 78
 			"/^\s*((P(OST)?.?\s*(O(FF(ICE)?)?)?.?\s+(B(IN|OX))?)|B(IN|OX))/i",
79 79
 			$obj_with_address->address2()
80
-		) ) {
80
+		)) {
81 81
 			return $obj_with_address->address2() !== null && $obj_with_address->address2() !== ''
82
-				? '<span itemprop="postOfficeBoxNumber">' . $obj_with_address->address2() . '</span>' : '';
82
+				? '<span itemprop="postOfficeBoxNumber">'.$obj_with_address->address2().'</span>' : '';
83 83
 		} else {
84 84
 			return $obj_with_address->address2();
85 85
 		}
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 	 * @param EEI_Address $obj_with_address
96 96
 	 * @return string
97 97
 	 */
98
-	public static function addressLocality( EEI_Address $obj_with_address = null ) {
98
+	public static function addressLocality(EEI_Address $obj_with_address = null) {
99 99
 		return $obj_with_address->city() !== null && $obj_with_address->city() !== ''
100
-			? '<span itemprop="addressLocality">' . $obj_with_address->city() . '</span>' : '';
100
+			? '<span itemprop="addressLocality">'.$obj_with_address->city().'</span>' : '';
101 101
 	}
102 102
 
103 103
 
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 	 * @param EEI_Address $obj_with_address
111 111
 	 * @return string
112 112
 	 */
113
-	public static function addressRegion( EEI_Address $obj_with_address = null ) {
113
+	public static function addressRegion(EEI_Address $obj_with_address = null) {
114 114
 		$state = $obj_with_address->state_name();
115
-		if ( ! empty( $state ) ) {
116
-			return '<span itemprop="addressRegion">' . $state . '</span>';
115
+		if ( ! empty($state)) {
116
+			return '<span itemprop="addressRegion">'.$state.'</span>';
117 117
 		} else {
118 118
 			return '';
119 119
 		}
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
 	 * @param EEI_Address $obj_with_address
130 130
 	 * @return string
131 131
 	 */
132
-	public static function addressCountry( EEI_Address $obj_with_address = null ) {
132
+	public static function addressCountry(EEI_Address $obj_with_address = null) {
133 133
 		$country = $obj_with_address->country_name();
134
-		if ( ! empty( $country ) ) {
135
-			return '<span itemprop="addressCountry">' . $country . '</span>';
134
+		if ( ! empty($country)) {
135
+			return '<span itemprop="addressCountry">'.$country.'</span>';
136 136
 		} else {
137 137
 			return '';
138 138
 		}
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @param EEI_Address $obj_with_address
149 149
 	 * @return string
150 150
 	 */
151
-	public static function postalCode( EEI_Address $obj_with_address = null ) {
151
+	public static function postalCode(EEI_Address $obj_with_address = null) {
152 152
 		return $obj_with_address->zip() !== null && $obj_with_address->zip() !== '' ? '<span itemprop="postalCode">'
153 153
 		                                                                              . $obj_with_address->zip()
154 154
 		                                                                              . '</span>' : '';
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 	 * @param string $phone_nmbr
165 165
 	 * @return string
166 166
 	 */
167
-	public static function telephone( $phone_nmbr = null ) {
168
-		return $phone_nmbr !== null && $phone_nmbr !== '' ? '<span itemprop="telephone">' . $phone_nmbr . '</span>'
167
+	public static function telephone($phone_nmbr = null) {
168
+		return $phone_nmbr !== null && $phone_nmbr !== '' ? '<span itemprop="telephone">'.$phone_nmbr.'</span>'
169 169
 			: '';
170 170
 	}
171 171
 
@@ -181,13 +181,13 @@  discard block
 block discarded – undo
181 181
 	 * @param array  $attributes - array of additional link attributes in  attribute_name => value pairs. ie: array( 'title' => 'click here', 'class' => 'link-class' )
182 182
 	 * @return string (link)
183 183
 	 */
184
-	public static function url( $url = null, $text = null, $attributes = array() ) {
184
+	public static function url($url = null, $text = null, $attributes = array()) {
185 185
 		$atts = '';
186
-		foreach ( $attributes as $attribute => $value ) {
187
-			$atts .= ' ' . $attribute . '="' . $value . '"';
186
+		foreach ($attributes as $attribute => $value) {
187
+			$atts .= ' '.$attribute.'="'.$value.'"';
188 188
 		}
189 189
 		$text = $text !== null && $text !== '' ? $text : $url;
190
-		return $url !== null && $url !== '' ? '<a itemprop="url" href="' . $url . '"' . $atts . '>' . $text . '</a>'
190
+		return $url !== null && $url !== '' ? '<a itemprop="url" href="'.$url.'"'.$atts.'>'.$text.'</a>'
191 191
 			: '';
192 192
 	}
193 193
 
Please login to merge, or discard this patch.
core/services/address/formatters/NullAddressFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string $CNT_ISO
29 29
 	 * @return string
30 30
 	 */
31
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
31
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
32 32
 		return null;
33 33
 	}
34 34
 
Please login to merge, or discard this patch.
core/services/address/formatters/AddressFormatter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 		// swap address part placeholders for the real text
42 42
 		$formatted_address = str_replace(
43 43
 		// find
44
-			array( '{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}' ),
44
+			array('{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}'),
45 45
 			// replace
46
-			array( $address, $address2, $city, $state, $zip, $country ),
46
+			array($address, $address2, $city, $state, $zip, $country),
47 47
 			// string
48 48
 			$formatted_address
49 49
 		);
50 50
 		// remove placeholder from start and end, reduce repeating placeholders to singles, then replace with HTML line breaks
51
-		return preg_replace( '/%+/', $sub, trim( $formatted_address, '%' ) );
51
+		return preg_replace('/%+/', $sub, trim($formatted_address, '%'));
52 52
 	}
53 53
 
54 54
 
Please login to merge, or discard this patch.
core/services/address/formatters/InlineAddressFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string $CNT_ISO
29 29
 	 * @return string
30 30
 	 */
31
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
31
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
32 32
 		$address_formats = apply_filters(
33 33
 			'FHEE__EE_Inline_Address_Formatter__address_formats',
34 34
 			array(
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			)
40 40
 		);
41 41
 		// if the incoming country has a set format, use that, else use the default
42
-		$formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ]
42
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
43 43
 			: $address_formats['ZZZ'];
44 44
 		return $this->parse_formatted_address(
45 45
 			$address,
Please login to merge, or discard this patch.
core/business/EE_Processor_Base.class.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @param boolean $IPN
34 34
 	 */
35
-	public static function set_IPN( $IPN ) {
36
-		self::$IPN = filter_var( $IPN, FILTER_VALIDATE_BOOLEAN );
35
+	public static function set_IPN($IPN) {
36
+		self::$IPN = filter_var($IPN, FILTER_VALIDATE_BOOLEAN);
37 37
 	}
38 38
 
39 39
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	 * @param bool $revisit
45 45
 	 * @return void
46 46
 	 */
47
-	public function set_revisit( $revisit = false ) {
48
-		$this->_revisit = filter_var( $revisit, FILTER_VALIDATE_BOOLEAN );
47
+	public function set_revisit($revisit = false) {
48
+		$this->_revisit = filter_var($revisit, FILTER_VALIDATE_BOOLEAN);
49 49
 	}
50 50
 
51 51
 
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 	 * @param array $info
61 61
 	 * @param bool $display_request
62 62
 	 */
63
-	protected function log( $class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false ) {
64
-		if ( WP_DEBUG && false ) {
65
-			if ( $transaction instanceof EE_Transaction ) {
63
+	protected function log($class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false) {
64
+		if (WP_DEBUG && false) {
65
+			if ($transaction instanceof EE_Transaction) {
66 66
 				// don't serialize objects
67
-				$info = EEH_Debug_Tools::strip_objects( $info );
68
-				if ( $transaction->ID() ) {
69
-					$info[ 'TXN_status' ] = $transaction->status_ID();
70
-					$info[ 'TXN_reg_steps' ] = $transaction->reg_steps();
71
-					$index = 'EE_Transaction: ' . $transaction->ID();
72
-					EEH_Debug_Tools::log( $class, $func, $line, $info, $display_request, $index );
67
+				$info = EEH_Debug_Tools::strip_objects($info);
68
+				if ($transaction->ID()) {
69
+					$info['TXN_status'] = $transaction->status_ID();
70
+					$info['TXN_reg_steps'] = $transaction->reg_steps();
71
+					$index = 'EE_Transaction: '.$transaction->ID();
72
+					EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
73 73
 				}
74 74
 			}
75 75
 		}
Please login to merge, or discard this patch.
modules/core_rest_api/EED_Core_Rest_Api.module.php 1 patch
Spacing   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 use EventEspresso\core\libraries\rest_api\Calculated_Model_Fields;
3 3
 
4
-if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 /**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public static function instance() {
37 37
 		self::$_field_calculator = new Calculated_Model_Fields();
38
-		return parent::get_instance( __CLASS__ );
38
+		return parent::get_instance(__CLASS__);
39 39
 	}
40 40
 
41 41
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 
66 66
 
67 67
 	public static function set_hooks_both() {
68
-		add_action( 'rest_api_init', array( 'EED_Core_Rest_Api', 'register_routes' ), 10 );
69
-		add_action( 'rest_api_init', array( 'EED_Core_Rest_Api', 'set_hooks_rest_api' ), 5 );
70
-		add_filter( 'rest_route_data', array( 'EED_Core_Rest_Api', 'hide_old_endpoints' ), 10, 2 );
71
-		add_filter( 'rest_index', array( 'EventEspresso\core\libraries\rest_api\controllers\model\Meta', 'filter_ee_metadata_into_index' ) );
68
+		add_action('rest_api_init', array('EED_Core_Rest_Api', 'register_routes'), 10);
69
+		add_action('rest_api_init', array('EED_Core_Rest_Api', 'set_hooks_rest_api'), 5);
70
+		add_filter('rest_route_data', array('EED_Core_Rest_Api', 'hide_old_endpoints'), 10, 2);
71
+		add_filter('rest_index', array('EventEspresso\core\libraries\rest_api\controllers\model\Meta', 'filter_ee_metadata_into_index'));
72 72
 		EED_Core_Rest_Api::invalidate_cached_route_data_on_version_change();
73 73
 	}
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * Loads all the hooks which make requests to old versions of the API
87 87
 	 * appear the same as they always did
88 88
 	 */
89
-	public static function set_hooks_for_changes(){
89
+	public static function set_hooks_for_changes() {
90 90
 		self::_set_hooks_for_changes();
91 91
 	}
92 92
 	/**
@@ -94,16 +94,16 @@  discard block
 block discarded – undo
94 94
 	 * appear the same as they always did
95 95
 	 */
96 96
 	protected static function _set_hooks_for_changes() {
97
-		$folder_contents = EEH_File::get_contents_of_folders( array( EE_LIBRARIES . 'rest_api' . DS . 'changes' ), false );
98
-		foreach( $folder_contents as $classname_in_namespace => $filepath ) {
97
+		$folder_contents = EEH_File::get_contents_of_folders(array(EE_LIBRARIES.'rest_api'.DS.'changes'), false);
98
+		foreach ($folder_contents as $classname_in_namespace => $filepath) {
99 99
 			//ignore the base parent class
100
-			if( $classname_in_namespace === 'Changes_In_Base' ) {
100
+			if ($classname_in_namespace === 'Changes_In_Base') {
101 101
 				continue;
102 102
 			}
103
-			$full_classname = 'EventEspresso\core\libraries\rest_api\changes\\' . $classname_in_namespace;
104
-			if ( class_exists( $full_classname )) {
103
+			$full_classname = 'EventEspresso\core\libraries\rest_api\changes\\'.$classname_in_namespace;
104
+			if (class_exists($full_classname)) {
105 105
 				$instance_of_class = new $full_classname;
106
-				if ( $instance_of_class instanceof EventEspresso\core\libraries\rest_api\changes\Changes_In_Base ) {
106
+				if ($instance_of_class instanceof EventEspresso\core\libraries\rest_api\changes\Changes_In_Base) {
107 107
 					$instance_of_class->set_hooks();
108 108
 				}
109 109
 			}
@@ -116,16 +116,16 @@  discard block
 block discarded – undo
116 116
 	 * so we actually prefer to only do it when an EE plugin is activated or upgraded
117 117
 	 */
118 118
 	public static function register_routes() {
119
-		foreach( EED_Core_Rest_Api::get_ee_route_data() as $namespace => $relative_urls ) {
120
-			foreach( $relative_urls as $endpoint => $routes ) {
121
-				foreach( $routes as $route ) {
119
+		foreach (EED_Core_Rest_Api::get_ee_route_data() as $namespace => $relative_urls) {
120
+			foreach ($relative_urls as $endpoint => $routes) {
121
+				foreach ($routes as $route) {
122 122
 					register_rest_route(
123 123
 						$namespace,
124 124
 						$endpoint,
125 125
 						array(
126
-							'callback' => $route[ 'callback' ],
127
-							'methods' => $route[ 'methods' ],
128
-							'args' => isset( $route[ 'args' ] ) ? $route[ 'args' ] : array(),
126
+							'callback' => $route['callback'],
127
+							'methods' => $route['methods'],
128
+							'args' => isset($route['args']) ? $route['args'] : array(),
129 129
 						)
130 130
 					);
131 131
 				}
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
 	 * next time the WP API is used
140 140
 	 */
141 141
 	public static function invalidate_cached_route_data_on_version_change() {
142
-		if( EE_System::instance()->detect_req_type() != EE_System::req_type_normal ) {
142
+		if (EE_System::instance()->detect_req_type() != EE_System::req_type_normal) {
143 143
 			EED_Core_Rest_Api::invalidate_cached_route_data();
144 144
 		}
145
-		foreach( EE_Registry::instance()->addons as $addon ){
146
-			if( $addon instanceof EE_Addon && $addon->detect_req_type() != EE_System::req_type_normal ) {
145
+		foreach (EE_Registry::instance()->addons as $addon) {
146
+			if ($addon instanceof EE_Addon && $addon->detect_req_type() != EE_System::req_type_normal) {
147 147
 				EED_Core_Rest_Api::invalidate_cached_route_data();
148 148
 			}
149 149
 		}
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public static function invalidate_cached_route_data() {
156 156
 		//delete the saved EE REST API routes
157
-		delete_option( EED_Core_Rest_Api::saved_routes_option_names );
157
+		delete_option(EED_Core_Rest_Api::saved_routes_option_names);
158 158
 	}
159 159
 
160 160
 	/**
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 	 * }
167 167
 	 */
168 168
 	public static function get_ee_route_data() {
169
-		$ee_routes = get_option( self::saved_routes_option_names, null );
170
-		if( ! $ee_routes || ( defined('EE_REST_API_DEBUG_MODE') && EE_REST_API_DEBUG_MODE )){
169
+		$ee_routes = get_option(self::saved_routes_option_names, null);
170
+		if ( ! $ee_routes || (defined('EE_REST_API_DEBUG_MODE') && EE_REST_API_DEBUG_MODE)) {
171 171
 			self::save_ee_routes();
172
-			$ee_routes = get_option( self::saved_routes_option_names, array() );
172
+			$ee_routes = get_option(self::saved_routes_option_names, array());
173 173
 		}
174 174
 		return $ee_routes;
175 175
 	}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	 * @return void
181 181
 	 */
182 182
 	public static function save_ee_routes() {
183
-		if( EE_Maintenance_Mode::instance()->models_can_query() ){
183
+		if (EE_Maintenance_Mode::instance()->models_can_query()) {
184 184
 			$instance = self::instance();
185 185
 			$routes = apply_filters(
186 186
 				'EED_Core_Rest_Api__save_ee_routes__routes',
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 					$instance->_register_rpc_routes()
192 192
 				)
193 193
 			);
194
-			update_option( self::saved_routes_option_names, $routes, true );
194
+			update_option(self::saved_routes_option_names, $routes, true);
195 195
 		}
196 196
 	}
197 197
 
@@ -208,24 +208,24 @@  discard block
 block discarded – undo
208 208
 		unset($models_to_register['Extra_Meta']);
209 209
 		unset($models_to_register['Extra_Join']);
210 210
 		$model_routes = array( );
211
-		foreach( self::versions_served() as $version => $hidden_endpoint ) {
211
+		foreach (self::versions_served() as $version => $hidden_endpoint) {
212 212
 
213
-			foreach ( $models_to_register as $model_name => $model_classname ) {
214
-				$model = \EE_Registry::instance()->load_model( $model_name );
213
+			foreach ($models_to_register as $model_name => $model_classname) {
214
+				$model = \EE_Registry::instance()->load_model($model_name);
215 215
 				//yes we could just register one route for ALL models, but then they wouldn't show up in the index
216
-				$ee_namespace = self::ee_api_namespace . $version;
217
-				$plural_model_route = EEH_Inflector::pluralize_and_lower( $model_name );
218
-				$singular_model_route = $plural_model_route . '/(?P<id>\d+)' ;
219
-				$model_routes[ $ee_namespace ][ $plural_model_route ] = array(
216
+				$ee_namespace = self::ee_api_namespace.$version;
217
+				$plural_model_route = EEH_Inflector::pluralize_and_lower($model_name);
218
+				$singular_model_route = $plural_model_route.'/(?P<id>\d+)';
219
+				$model_routes[$ee_namespace][$plural_model_route] = array(
220 220
 						array(
221 221
 							'callback' => array(
222 222
 								'EventEspresso\core\libraries\rest_api\controllers\model\Read',
223 223
 								'handle_request_get_all' ),
224 224
 							'methods' => WP_REST_Server::READABLE,
225 225
 							'hidden_endpoint' => $hidden_endpoint,
226
-							'args' => $this->_get_read_query_params( $model, $version ),
226
+							'args' => $this->_get_read_query_params($model, $version),
227 227
 							'_links' => array(
228
-								'self' => rest_url( $ee_namespace . $singular_model_route ),
228
+								'self' => rest_url($ee_namespace.$singular_model_route),
229 229
 							)
230 230
 						),
231 231
 //						array(
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
 //							'hidden_endpoint' => $hidden_endpoint
237 237
 //						)
238 238
 					);
239
-				$model_routes[ $ee_namespace ][ $singular_model_route ] = array(
239
+				$model_routes[$ee_namespace][$singular_model_route] = array(
240 240
 						array(
241 241
 							'callback' => array(
242 242
 								'EventEspresso\core\libraries\rest_api\controllers\model\Read',
243 243
 								'handle_request_get_one' ),
244 244
 							'methods' => WP_REST_Server::READABLE,
245 245
 							'hidden_endpoint' => $hidden_endpoint,
246
-							'args' => $this->_get_response_selection_query_params( $model, $version)
246
+							'args' => $this->_get_response_selection_query_params($model, $version)
247 247
 						),
248 248
 //						array(
249 249
 //							'callback' => array(
@@ -254,19 +254,19 @@  discard block
 block discarded – undo
254 254
 //							),
255 255
 				);
256 256
 				//@todo: also handle  DELETE for a single item
257
-				foreach ( $model->relation_settings() as $relation_name => $relation_obj ) {
257
+				foreach ($model->relation_settings() as $relation_name => $relation_obj) {
258 258
 					$related_model_name_endpoint_part = EventEspresso\core\libraries\rest_api\controllers\model\Read::get_related_entity_name(
259 259
 						$relation_name,
260 260
 						$relation_obj
261 261
 					);
262
-					$model_routes[ $ee_namespace ][ $singular_model_route . '/' . $related_model_name_endpoint_part ] = array(
262
+					$model_routes[$ee_namespace][$singular_model_route.'/'.$related_model_name_endpoint_part] = array(
263 263
 							array(
264 264
 								'callback' => array(
265 265
 									'EventEspresso\core\libraries\rest_api\controllers\model\Read',
266 266
 									'handle_request_get_related' ),
267 267
 								'methods' => WP_REST_Server::READABLE,
268 268
 								'hidden_endpoint' => $hidden_endpoint,
269
-								'args' => $this->_get_read_query_params( $relation_obj->get_other_model(), $version ),
269
+								'args' => $this->_get_read_query_params($relation_obj->get_other_model(), $version),
270 270
 							),
271 271
 //							array(
272 272
 //								'callback' => array(
@@ -290,11 +290,11 @@  discard block
 block discarded – undo
290 290
 	 */
291 291
 	protected function _register_rpc_routes() {
292 292
 		$routes = array();
293
-		foreach( self::versions_served() as $version => $hidden_endpoint ) {
294
-			$ee_namespace = self::ee_api_namespace . $version;
293
+		foreach (self::versions_served() as $version => $hidden_endpoint) {
294
+			$ee_namespace = self::ee_api_namespace.$version;
295 295
 			$this_versions_routes = array();
296 296
 			//checkin endpoint
297
-			$this_versions_routes[ 'registrations/(?P<REG_ID>\d+)/toggle_checkin_for_datetime/(?P<DTT_ID>\d+)' ] = array(
297
+			$this_versions_routes['registrations/(?P<REG_ID>\d+)/toggle_checkin_for_datetime/(?P<DTT_ID>\d+)'] = array(
298 298
 				array(
299 299
 					'callback' => array(
300 300
 						'EventEspresso\core\libraries\rest_api\controllers\rpc\Checkin',
@@ -305,12 +305,12 @@  discard block
 block discarded – undo
305 305
 						'force' => array(
306 306
 							'required' => false,
307 307
 							'default' => false,
308
-							'description' => __( 'Whether to force toggle checkin, or to verify the registration status and allowed ticket uses', 'event_espresso' )
308
+							'description' => __('Whether to force toggle checkin, or to verify the registration status and allowed ticket uses', 'event_espresso')
309 309
 						)
310 310
 					)
311 311
 				)
312 312
 			);
313
-			$routes[ $ee_namespace ] = apply_filters(
313
+			$routes[$ee_namespace] = apply_filters(
314 314
 				'FHEE__EED_Core_Rest_Api___register_rpc_routes__this_versions_routes',
315 315
 				$this_versions_routes,
316 316
 				$version,
@@ -326,19 +326,19 @@  discard block
 block discarded – undo
326 326
 	 * @param string $version
327 327
 	 * @return array
328 328
 	 */
329
-	protected function _get_response_selection_query_params( \EEM_Base $model, $version ) {
329
+	protected function _get_response_selection_query_params(\EEM_Base $model, $version) {
330 330
 		return apply_filters(
331 331
 			'FHEE__EED_Core_Rest_Api___get_response_selection_query_params',
332 332
 			array(
333 333
 				'include' => array(
334 334
 					'required' => false,
335 335
 					'default' => '*',
336
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#Including_Specific_Fields_and_Related_Entities_in_Results for documentation', 'event_espresso' ),
336
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#Including_Specific_Fields_and_Related_Entities_in_Results for documentation', 'event_espresso'),
337 337
 				),
338 338
 				'calculate' => array(
339 339
 					'required' => false,
340 340
 					'default' => '',
341
-					'enum' => self::$_field_calculator->retrieve_calculated_fields_for_model( $model )
341
+					'enum' => self::$_field_calculator->retrieve_calculated_fields_for_model($model)
342 342
 				)
343 343
 			),
344 344
 			$model,
@@ -356,43 +356,43 @@  discard block
 block discarded – undo
356 356
 	 * @return array    describing the args acceptable when querying this model
357 357
 	 * @throws \EE_Error
358 358
 	 */
359
-	protected function _get_read_query_params( \EEM_Base $model, $version ) {
359
+	protected function _get_read_query_params(\EEM_Base $model, $version) {
360 360
 		$default_orderby = array();
361
-		foreach( $model->get_combined_primary_key_fields() as $key_field ) {
362
-			$default_orderby[ $key_field->get_name() ] = 'ASC';
361
+		foreach ($model->get_combined_primary_key_fields() as $key_field) {
362
+			$default_orderby[$key_field->get_name()] = 'ASC';
363 363
 		}
364 364
 		return array_merge(
365
-			$this->_get_response_selection_query_params( $model, $version ),
365
+			$this->_get_response_selection_query_params($model, $version),
366 366
 			array(
367 367
 				'where' => array(
368 368
 					'required' => false,
369 369
 					'default' => array(),
370
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#where for documentation', 'event_espresso' ),
370
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#where for documentation', 'event_espresso'),
371 371
 					),
372 372
 				'limit' => array(
373 373
 					'required' => false,
374 374
 					'default' => EED_Core_Rest_Api::get_default_query_limit(),
375
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#limit for documentation', 'event_espresso' )
375
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#limit for documentation', 'event_espresso')
376 376
 				),
377 377
 				'order_by' => array(
378 378
 					'required' => false,
379 379
 					'default' => $default_orderby,
380
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#order_by for documentation', 'event_espresso' )
380
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#order_by for documentation', 'event_espresso')
381 381
 				),
382 382
 				'group_by' => array(
383 383
 					'required' => false,
384 384
 					'default' => null,
385
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#group_by for documentation', 'event_espresso' )
385
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#group_by for documentation', 'event_espresso')
386 386
 				),
387 387
 				'having' => array(
388 388
 					'required' => false,
389 389
 					'default' => null,
390
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#having for documentation', 'event_espresso' )
390
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#having for documentation', 'event_espresso')
391 391
 				),
392 392
 				'caps' => array(
393 393
 					'required' => false,
394 394
 					'default' => EEM_Base::caps_read,
395
-					'description' => __( 'See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#caps for documentation', 'event_espresso' )
395
+					'description' => __('See http://developer.eventespresso.com/docs/ee4-rest-api-reading/#caps for documentation', 'event_espresso')
396 396
 				),
397 397
 			)
398 398
 		);
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 	 */
405 405
 	protected function _register_config_routes() {
406 406
 		$config_routes = array();
407
-		foreach( self::versions_served() as $version => $hidden_endpoint ) {
408
-			$config_routes[ self::ee_api_namespace . $version ][ 'config' ] = array(
407
+		foreach (self::versions_served() as $version => $hidden_endpoint) {
408
+			$config_routes[self::ee_api_namespace.$version]['config'] = array(
409 409
 					array(
410 410
 						'callback' => array(
411 411
 							'EventEspresso\core\libraries\rest_api\controllers\config\Read',
@@ -424,8 +424,8 @@  discard block
 block discarded – undo
424 424
 	 */
425 425
 	protected function _register_meta_routes() {
426 426
 		$meta_routes = array();
427
-		foreach( self::versions_served() as $version => $hidden_endpoint ) {
428
-			$meta_routes[ self::ee_api_namespace . $version ][ '/resources' ] = array(
427
+		foreach (self::versions_served() as $version => $hidden_endpoint) {
428
+			$meta_routes[self::ee_api_namespace.$version]['/resources'] = array(
429 429
 				array(
430 430
 					'callback' => array(
431 431
 						'EventEspresso\core\libraries\rest_api\controllers\model\Meta',
@@ -446,13 +446,13 @@  discard block
 block discarded – undo
446 446
 	 * @param array $route_data
447 447
 	 * @return array
448 448
 	 */
449
-	public static function hide_old_endpoints( $route_data ) {
450
-		foreach( EED_Core_Rest_Api::get_ee_route_data() as $namespace => $relative_urls ) {
451
-			foreach( $relative_urls as $endpoint => $routes ) {
452
-				foreach( $routes as $route ) {
453
-					if( $route[ 'hidden_endpoint' ] ) {
454
-						$full_route = '/' . ltrim( $namespace, '/' ) . '/' . ltrim( $endpoint, '/' );
455
-						unset( $route_data[ $full_route ] );
449
+	public static function hide_old_endpoints($route_data) {
450
+		foreach (EED_Core_Rest_Api::get_ee_route_data() as $namespace => $relative_urls) {
451
+			foreach ($relative_urls as $endpoint => $routes) {
452
+				foreach ($routes as $route) {
453
+					if ($route['hidden_endpoint']) {
454
+						$full_route = '/'.ltrim($namespace, '/').'/'.ltrim($endpoint, '/');
455
+						unset($route_data[$full_route]);
456 456
 					}
457 457
 				}
458 458
 			}
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 	 */
492 492
 	public static function latest_rest_api_version() {
493 493
 		$versions_served = \EED_Core_Rest_Api::versions_served();
494
-		return end( array_keys( $versions_served ) );
494
+		return end(array_keys($versions_served));
495 495
 	}
496 496
 
497 497
 	/**
@@ -505,32 +505,32 @@  discard block
 block discarded – undo
505 505
 	public static function versions_served() {
506 506
 		$versions_served = array();
507 507
 		$possibly_served_versions = EED_Core_Rest_Api::version_compatibilities();
508
-		$lowest_compatible_version = end( $possibly_served_versions);
509
-		reset( $possibly_served_versions );
510
-		$versions_served_historically = array_keys( $possibly_served_versions );
511
-		$latest_version = end( $versions_served_historically );
512
-		reset( $versions_served_historically );
508
+		$lowest_compatible_version = end($possibly_served_versions);
509
+		reset($possibly_served_versions);
510
+		$versions_served_historically = array_keys($possibly_served_versions);
511
+		$latest_version = end($versions_served_historically);
512
+		reset($versions_served_historically);
513 513
 		//for each version of core we have ever served:
514
-		foreach ( $versions_served_historically as $key_versioned_endpoint ) {
514
+		foreach ($versions_served_historically as $key_versioned_endpoint) {
515 515
 			//if it's not above the current core version, and it's compatible with the current version of core
516
-			if( $key_versioned_endpoint == $latest_version ) {
516
+			if ($key_versioned_endpoint == $latest_version) {
517 517
 				//don't hide the latest version in the index
518
-				$versions_served[ $key_versioned_endpoint ] = false;
519
-			} else if(
518
+				$versions_served[$key_versioned_endpoint] = false;
519
+			} else if (
520 520
 				$key_versioned_endpoint < EED_Core_Rest_Api::core_version()
521 521
 				&& $key_versioned_endpoint >= $lowest_compatible_version
522 522
 			) {
523 523
 				//include, but hide, previous versions which are still supported
524
-				$versions_served[ $key_versioned_endpoint ] = true;
525
-			} elseif(
524
+				$versions_served[$key_versioned_endpoint] = true;
525
+			} elseif (
526 526
 				apply_filters(
527 527
 					'FHEE__EED_Core_Rest_Api__versions_served__include_incompatible_versions',
528 528
 					false,
529 529
 					$possibly_served_versions
530 530
 				)
531
-			){
531
+			) {
532 532
 				//if a version is no longer supported, don't include it in index or list of versions served
533
-				$versions_served[ $key_versioned_endpoint ] = true;
533
+				$versions_served[$key_versioned_endpoint] = true;
534 534
 			}
535 535
 		}
536 536
 		return $versions_served;
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 	 * @return string
544 544
 	 */
545 545
 	public static function core_version() {
546
-		return apply_filters( 'FHEE__EED_Core_REST_API__core_version', implode('.', array_slice( explode( '.', espresso_version() ), 0, 3 ) ) );
546
+		return apply_filters('FHEE__EED_Core_REST_API__core_version', implode('.', array_slice(explode('.', espresso_version()), 0, 3)));
547 547
 	}
548 548
 
549 549
 	/**
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 	 * @param  WP $WP
569 569
 	 * @return    void
570 570
 	 */
571
-	public function run( $WP ) {
571
+	public function run($WP) {
572 572
 
573 573
 	}
574 574
 
Please login to merge, or discard this patch.
core/services/address/formatters/MultiLineAddressFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string $CNT_ISO
29 29
 	 * @return string
30 30
 	 */
31
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
31
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
32 32
 		$address_formats = apply_filters(
33 33
 			'FHEE__EE_Inline_Address_Formatter__address_formats',
34 34
 			array(
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			)
40 40
 		);
41 41
 		// if the incoming country has a set format, use that, else use the default
42
-		$formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ]
42
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
43 43
 			: $address_formats['ZZZ'];
44 44
 		return $this->parse_formatted_address(
45 45
 			$address,
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Month_Input.input.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,21 +6,21 @@  discard block
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Month_Input extends EE_Select_Input{
9
+class EE_Month_Input extends EE_Select_Input {
10 10
 
11 11
 	/**
12 12
 	 * @param bool  $leading_zero
13 13
 	 * @param array $input_settings
14 14
 	 * @param bool $january_is_month_1 whether january should have value of 1; or it should be month 0
15 15
 	 */
16
-	function __construct( $leading_zero = false, $input_settings = array(), $january_is_month_1 = true){
16
+	function __construct($leading_zero = false, $input_settings = array(), $january_is_month_1 = true) {
17 17
 		$key_begin_range = $january_is_month_1 ? 1 : 0;
18
-		$key_range = range($key_begin_range, $key_begin_range + 11 );
19
-		if($leading_zero){
20
-			array_walk( $key_range, array( $this, '_zero_pad' ) );	
18
+		$key_range = range($key_begin_range, $key_begin_range + 11);
19
+		if ($leading_zero) {
20
+			array_walk($key_range, array($this, '_zero_pad'));	
21 21
 		}
22
-		$value_range = range( 1, 12 );
23
-		array_walk( $value_range, array( $this, '_zero_pad' ) );
22
+		$value_range = range(1, 12);
23
+		array_walk($value_range, array($this, '_zero_pad'));
24 24
 		parent::__construct(
25 25
 			array_combine( 
26 26
 				$key_range, 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param int $input
36 36
 	 * @param mixed $key
37 37
 	 */
38
-	protected function _zero_pad( &$input, $key ) {
39
-		$input = str_pad( $input, 2, '0', STR_PAD_LEFT );
38
+	protected function _zero_pad(&$input, $key) {
39
+		$input = str_pad($input, 2, '0', STR_PAD_LEFT);
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/payment_methods/EE_Offsite_Gateway.lib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * ------------------------------------------------------------------------
26 26
  */
27
-abstract class EE_Offsite_Gateway extends EE_Gateway{
27
+abstract class EE_Offsite_Gateway extends EE_Gateway {
28 28
 
29 29
 	/**
30 30
 	 * whether or not the gateway uses an IPN
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @param string     $cancel_url URL to send the user to after a cancelled payment attempt on teh payment provider's website
62 62
 	 * @return EE_Payment
63 63
 	 */
64
-	public abstract function set_redirection_info( $payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL);
64
+	public abstract function set_redirection_info($payment, $billing_info = array(), $return_url = NULL, $notify_url = NULL, $cancel_url = NULL);
65 65
 
66 66
 
67 67
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 * @param EEI_Transaction $transaction
75 75
 	 * @return EEI_Payment updated
76 76
 	 */
77
-	public abstract function handle_payment_update($update_info,$transaction);
77
+	public abstract function handle_payment_update($update_info, $transaction);
78 78
 
79 79
 
80 80
 
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
 	 * @access protected
102 102
 	 * @param boolean $uses_separate_IPN_request
103 103
 	 */
104
-	protected function set_uses_separate_IPN_request( $uses_separate_IPN_request ) {
105
-		$this->_uses_separate_IPN_request = filter_var( $uses_separate_IPN_request, FILTER_VALIDATE_BOOLEAN );
104
+	protected function set_uses_separate_IPN_request($uses_separate_IPN_request) {
105
+		$this->_uses_separate_IPN_request = filter_var($uses_separate_IPN_request, FILTER_VALIDATE_BOOLEAN);
106 106
 	}
107 107
 	
108 108
 	/**
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
 	 * @param boolean $separate_IPN_request
117 117
 	 * @return boolean
118 118
 	 */
119
-	public function handle_IPN_in_this_request( $request_data, $separate_IPN_request ) {
120
-		if( $separate_IPN_request ) {
119
+	public function handle_IPN_in_this_request($request_data, $separate_IPN_request) {
120
+		if ($separate_IPN_request) {
121 121
 			return $this->_uses_separate_IPN_request;
122 122
 		} else {
123 123
 			//it's a request where the user returned from an offsite gateway
Please login to merge, or discard this patch.