Completed
Branch BUG/11220/admin-page-routes (c5a0e9)
by
unknown
57:44 queued 46:14
created
core/libraries/batch/Helpers/JobStepResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
 	 * @param string $update_text
44 44
 	 * @param array $extra_data
45 45
 	 */
46
-	public function __construct(JobParameters $job_parameters, $update_text, $extra_data = array() ) {
47
-		$this->_job_parameters 	= $job_parameters;
46
+	public function __construct(JobParameters $job_parameters, $update_text, $extra_data = array()) {
47
+		$this->_job_parameters = $job_parameters;
48 48
 		$this->_update_text 	= $update_text;
49
-		$this->_extra_data 		= (array)$extra_data;
49
+		$this->_extra_data 		= (array) $extra_data;
50 50
 	}
51 51
 
52 52
 
Please login to merge, or discard this patch.
core/libraries/batch/JobHandlerBaseClasses/JobHandlerInterface.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 use EventEspressoBatchRequest\Helpers\JobParameters;
21 21
 use EventEspressoBatchRequest\Helpers\JobStepResponse;
22 22
 
23
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
24
-	exit( 'No direct script access allowed' );
23
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
24
+	exit('No direct script access allowed');
25 25
 }
26 26
 
27 27
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @throws BatchRequestException
36 36
 	 * @return JobStepResponse
37 37
 	 */
38
-	public function create_job( JobParameters $job_parameters );
38
+	public function create_job(JobParameters $job_parameters);
39 39
 
40 40
 	/**
41 41
 	 * Performs another step of the job
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @return JobStepResponse
45 45
 	 * @throws BatchRequestException
46 46
 	 */
47
-	public function continue_job( JobParameters $job_parameters, $batch_size = 50 );
47
+	public function continue_job(JobParameters $job_parameters, $batch_size = 50);
48 48
 
49 49
 	/**
50 50
 	 * Performs any clean-up logic when we know the job is completed
@@ -52,5 +52,5 @@  discard block
 block discarded – undo
52 52
 	 * @return JobStepResponse
53 53
 	 * @throws BatchRequestException
54 54
 	 */
55
-	public function cleanup_job( JobParameters $job_parameters );
55
+	public function cleanup_job(JobParameters $job_parameters);
56 56
 }
Please login to merge, or discard this patch.
core/helpers/EEH_Tabbed_Content.helper.php 2 patches
Spacing   +36 added lines, -36 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
 /**
@@ -46,22 +46,22 @@  discard block
 block discarded – undo
46 46
 	 * @return string the assembled html string containing the tabbed content for display.
47 47
 	 * @throws \EE_Error
48 48
 	 */
49
-	public static function display($tabs_contents, $tabs_names = array(), $small_tabs = true, $tabs_content = TRUE ) {
49
+	public static function display($tabs_contents, $tabs_names = array(), $small_tabs = true, $tabs_content = TRUE) {
50 50
 
51 51
 		//first check if $tabs_names is not empty then the count must match the count of $tabs_content otherwise we've got a problem houston
52
-		if ( !empty( $tabs_names) && ( count( (array) $tabs_names) != count( (array) $tabs_content) ) ) {
53
-			throw new EE_Error( __('The count for $tabs_names and $tabs_content does not match.', 'event_espresso') );
52
+		if ( ! empty($tabs_names) && (count((array) $tabs_names) != count((array) $tabs_content))) {
53
+			throw new EE_Error(__('The count for $tabs_names and $tabs_content does not match.', 'event_espresso'));
54 54
 		}
55 55
 
56 56
 		//make sure we've got incoming data setup properly
57
-		$tabs = !empty( $tabs_names ) ? (array) $tabs_names : array_keys( (array) $tabs_contents );
58
-		$tabs_content = !empty( $tabs_names ) ? array_combine( (array) $tabs_names, (array) $tabs_content ) : $tabs_contents;
57
+		$tabs = ! empty($tabs_names) ? (array) $tabs_names : array_keys((array) $tabs_contents);
58
+		$tabs_content = ! empty($tabs_names) ? array_combine((array) $tabs_names, (array) $tabs_content) : $tabs_contents;
59 59
 
60
-		$all_tabs = '<h2 class="nav-tab-wrapper">' . "\n";
60
+		$all_tabs = '<h2 class="nav-tab-wrapper">'."\n";
61 61
 		$all_tabs_content = '';
62 62
 
63 63
 		$index = 0;
64
-		foreach ( $tabs as $tab ) {
64
+		foreach ($tabs as $tab) {
65 65
 			$active = $index === 0 ? true : false;
66 66
 			$all_tabs .= self::tab($tab, $active);
67 67
 			$all_tabs_content .= self::tab_content($tab, $tabs_content[$tab], $active);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$tab_container_class = $small_tabs ? 'ee-nav-tabs ee-nav-tabs-small' : 'ee-nav-tabs';
80 80
 
81
-		return '<div class="'. $tab_container_class . '">' . "\n\t" . $all_tabs . $all_tabs_content . "\n" . '</div>';
81
+		return '<div class="'.$tab_container_class.'">'."\n\t".$all_tabs.$all_tabs_content."\n".'</div>';
82 82
 	}
83 83
 
84 84
 
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 	 * @throws \EE_Error
103 103
 	 */
104 104
 	public static function display_admin_nav_tabs($nav_tabs = array()) {
105
-		if ( empty($nav_tabs) )
106
-			throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) );
105
+		if (empty($nav_tabs))
106
+			throw new EE_Error(__('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso'));
107 107
 
108
-		$all_tabs = '<h2 class="nav-tab-wrapper">' . "\n";
109
-		foreach ( $nav_tabs as $slug => $tab ) {
108
+		$all_tabs = '<h2 class="nav-tab-wrapper">'."\n";
109
+		foreach ($nav_tabs as $slug => $tab) {
110 110
 			$all_tabs .= self::tab($slug, false, $tab['link_text'], $tab['url'], $tab['css_class']);
111 111
 		}
112 112
 		$all_tabs .= '</h2>';
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 	 * @param bool|string $css If string given then the generated tab will include that as the class.
123 123
 	 * @return string          html for tab
124 124
 	 */
125
-	private static function tab($name, $active = false, $nice_name = FALSE, $url = FALSE, $css = FALSE ) {
125
+	private static function tab($name, $active = false, $nice_name = FALSE, $url = FALSE, $css = FALSE) {
126 126
 		$name = str_replace(' ', '-', $name);
127 127
 		$class = $active ? 'nav-tab nav-tab-active' : 'nav-tab';
128
-		$class = $css ? $class . ' ' . $css : $class;
129
-		$nice_name = $nice_name ? $nice_name : ucwords( preg_replace('/(-|_)/', ' ', $name) );
130
-		$url = $url ? $url : '#' . $name;
131
-		$tab = '<a class="' . $class . '" rel="ee-tab-' . $name . '" href="' . $url . '">' . $nice_name . '</a>' . "\n\t";
128
+		$class = $css ? $class.' '.$css : $class;
129
+		$nice_name = $nice_name ? $nice_name : ucwords(preg_replace('/(-|_)/', ' ', $name));
130
+		$url = $url ? $url : '#'.$name;
131
+		$tab = '<a class="'.$class.'" rel="ee-tab-'.$name.'" href="'.$url.'">'.$nice_name.'</a>'."\n\t";
132 132
 		return $tab;
133 133
 	}
134 134
 
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 	 */
145 145
 	private static function tab_content($name, $tab_content, $active = false) {
146 146
 		$class = $active ? 'nav-tab-content' : 'nav-tab-content hidden';
147
-		$name = str_replace( ' ', '-', $name);
148
-		$content = "\t" . '<div class="'. $class . '" id="ee-tab-' . $name . '">' . "\n";
149
-		$content .= "\t" . $tab_content . "\n";
147
+		$name = str_replace(' ', '-', $name);
148
+		$content = "\t".'<div class="'.$class.'" id="ee-tab-'.$name.'">'."\n";
149
+		$content .= "\t".$tab_content."\n";
150 150
 		$content .= '<div style="clear:both"></div></div>';
151 151
 		return $content;
152 152
 	}
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 	 * @param string $default 			You can include a string for the item that will receive the "item_display" class for the js.
173 173
 	 * @return string                  a html snippet of of all the formatted link elements.
174 174
 	 */
175
-	public static function tab_text_links( $item_array, $container_class = '', $sep = '|', $default = '' ) {
176
-		$item_array = apply_filters( 'FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class );
177
-		if ( !is_array($item_array) || empty( $item_array ) )
175
+	public static function tab_text_links($item_array, $container_class = '', $sep = '|', $default = '') {
176
+		$item_array = apply_filters('FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class);
177
+		if ( ! is_array($item_array) || empty($item_array))
178 178
 			return false; //get out we don't have even the basic thing we need!
179 179
 
180 180
 
@@ -185,15 +185,15 @@  discard block
 block discarded – undo
185 185
 			'title' => esc_attr__('Link for Item', 'event_espresso'),
186 186
 			'slug' => 'item_slug'
187 187
 		);
188
-		$container_class = !empty($container_class) ? 'ee-text-links ' . $container_class : 'ee-text-links';
189
-		$list = '<ul class="' . $container_class . '">';
188
+		$container_class = ! empty($container_class) ? 'ee-text-links '.$container_class : 'ee-text-links';
189
+		$list = '<ul class="'.$container_class.'">';
190 190
 
191 191
 		$ci = 1;
192
-		foreach ( $item_array as $item ) {
193
-			$item = wp_parse_args( $item, $defaults );
194
-			$item['class'] = !empty($default) && $default == $item['slug'] ? 'item_display ' . $item['class'] : $item['class'];
192
+		foreach ($item_array as $item) {
193
+			$item = wp_parse_args($item, $defaults);
194
+			$item['class'] = ! empty($default) && $default == $item['slug'] ? 'item_display '.$item['class'] : $item['class'];
195 195
 			$list .= self::_text_link_item($item);
196
-			if ( !empty($sep) && $ci != count($item_array) )
196
+			if ( ! empty($sep) && $ci != count($item_array))
197 197
 				$list .= self::_text_link_item($sep);
198 198
 			$ci++;
199 199
 		}
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
 
205 205
 
206 206
 
207
-	private static function _text_link_item( $item ) {
207
+	private static function _text_link_item($item) {
208 208
 		//if this isn't an array then we're doing a separator
209
-		if ( !is_array( $item ) ) {
209
+		if ( ! is_array($item)) {
210 210
 			$label = $item;
211 211
 			$class = 'ee-text-link-sep';
212 212
 			$href = '';
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 			extract($item);
216 216
 		}
217 217
 
218
-		$class = $class != 'ee-text-link-sep'  ? 'class="ee-text-link-li ' . $class . '"' : 'class="ee-text-link-sep"';
218
+		$class = $class != 'ee-text-link-sep' ? 'class="ee-text-link-li '.$class.'"' : 'class="ee-text-link-sep"';
219 219
 
220
-		$content = '<li ' . $class . '>';
221
-		$content .= !empty($href) ? '<a class="ee-text-link" href="#' . $href . '" title="' . $title . '">' : '';
220
+		$content = '<li '.$class.'>';
221
+		$content .= ! empty($href) ? '<a class="ee-text-link" href="#'.$href.'" title="'.$title.'">' : '';
222 222
 		$content .= $label;
223
-		$content .= !empty($href) ? '</a>' : '';
223
+		$content .= ! empty($href) ? '</a>' : '';
224 224
 		$content .= '</li>';
225 225
 		return $content;
226 226
 	}
Please login to merge, or discard this patch.
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  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 6
 /**
6 7
  * Event Espresso
@@ -102,8 +103,9 @@  discard block
 block discarded – undo
102 103
 	 * @throws \EE_Error
103 104
 	 */
104 105
 	public static function display_admin_nav_tabs($nav_tabs = array()) {
105
-		if ( empty($nav_tabs) )
106
-			throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) );
106
+		if ( empty($nav_tabs) ) {
107
+					throw new EE_Error( __('Nav Tabs cannot be generated because the tab array is missing', 'event_espresso' ) );
108
+		}
107 109
 
108 110
 		$all_tabs = '<h2 class="nav-tab-wrapper">' . "\n";
109 111
 		foreach ( $nav_tabs as $slug => $tab ) {
@@ -174,8 +176,10 @@  discard block
 block discarded – undo
174 176
 	 */
175 177
 	public static function tab_text_links( $item_array, $container_class = '', $sep = '|', $default = '' ) {
176 178
 		$item_array = apply_filters( 'FHEE__EEH_Tabbed_Content__tab_text_links', $item_array, $container_class );
177
-		if ( !is_array($item_array) || empty( $item_array ) )
178
-			return false; //get out we don't have even the basic thing we need!
179
+		if ( !is_array($item_array) || empty( $item_array ) ) {
180
+					return false;
181
+		}
182
+		//get out we don't have even the basic thing we need!
179 183
 
180 184
 
181 185
 		$defaults = array(
@@ -193,8 +197,9 @@  discard block
 block discarded – undo
193 197
 			$item = wp_parse_args( $item, $defaults );
194 198
 			$item['class'] = !empty($default) && $default == $item['slug'] ? 'item_display ' . $item['class'] : $item['class'];
195 199
 			$list .= self::_text_link_item($item);
196
-			if ( !empty($sep) && $ci != count($item_array) )
197
-				$list .= self::_text_link_item($sep);
200
+			if ( !empty($sep) && $ci != count($item_array) ) {
201
+							$list .= self::_text_link_item($sep);
202
+			}
198 203
 			$ci++;
199 204
 		}
200 205
 
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/ReCaptcha/RequestMethod/Post.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -34,37 +34,37 @@
 block discarded – undo
34 34
  */
35 35
 class Post implements RequestMethod
36 36
 {
37
-    /**
38
-     * URL to which requests are POSTed.
39
-     * @const string
40
-     */
41
-    const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
37
+	/**
38
+	 * URL to which requests are POSTed.
39
+	 * @const string
40
+	 */
41
+	const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
42 42
 
43
-    /**
44
-     * Submit the POST request with the specified parameters.
45
-     *
46
-     * @param RequestParameters $params Request parameters
47
-     * @return string Body of the reCAPTCHA response
48
-     */
49
-    public function submit(RequestParameters $params)
50
-    {
51
-        /**
52
-         * PHP 5.6.0 changed the way you specify the peer name for SSL context options.
53
-         * Using "CN_name" will still work, but it will raise deprecated errors.
54
-         */
55
-        $peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
56
-        $options = array(
57
-            'http' => array(
58
-                'header' => "Content-type: application/x-www-form-urlencoded\r\n",
59
-                'method' => 'POST',
60
-                'content' => $params->toQueryString(),
61
-                // Force the peer to validate (not needed in 5.6.0+, but still works
62
-                'verify_peer' => true,
63
-                // Force the peer validation to use www.google.com
64
-                $peer_key => 'www.google.com',
65
-            ),
66
-        );
67
-        $context = stream_context_create($options);
68
-        return file_get_contents(self::SITE_VERIFY_URL, false, $context);
69
-    }
43
+	/**
44
+	 * Submit the POST request with the specified parameters.
45
+	 *
46
+	 * @param RequestParameters $params Request parameters
47
+	 * @return string Body of the reCAPTCHA response
48
+	 */
49
+	public function submit(RequestParameters $params)
50
+	{
51
+		/**
52
+		 * PHP 5.6.0 changed the way you specify the peer name for SSL context options.
53
+		 * Using "CN_name" will still work, but it will raise deprecated errors.
54
+		 */
55
+		$peer_key = version_compare(PHP_VERSION, '5.6.0', '<') ? 'CN_name' : 'peer_name';
56
+		$options = array(
57
+			'http' => array(
58
+				'header' => "Content-type: application/x-www-form-urlencoded\r\n",
59
+				'method' => 'POST',
60
+				'content' => $params->toQueryString(),
61
+				// Force the peer to validate (not needed in 5.6.0+, but still works
62
+				'verify_peer' => true,
63
+				// Force the peer validation to use www.google.com
64
+				$peer_key => 'www.google.com',
65
+			),
66
+		);
67
+		$context = stream_context_create($options);
68
+		return file_get_contents(self::SITE_VERIFY_URL, false, $context);
69
+	}
70 70
 }
Please login to merge, or discard this patch.
registrations/templates/attendee_registrations_main_meta_box.template.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
5 5
 		<table class="admin-primary-mbox-tbl">
6 6
 			<thead>
7 7
 				<tr>
8
-					<th class="jst-left"><?php esc_html_e( 'Event Name', 'event_espresso' );?></th>
9
-					<th class="jst-left"><?php esc_html_e( 'REG ID', 'event_espresso' );?></th>
10
-					<th class="jst-left"><?php esc_html_e( 'TXN ID', 'event_espresso' );?></th>
11
-					<th class="jst-left"><?php esc_html_e( 'Reg Code', 'event_espresso' );?></th>
12
-					<th class="jst-rght"><?php esc_html_e( 'Ticket Price', 'event_espresso' );?></th>
8
+					<th class="jst-left"><?php esc_html_e('Event Name', 'event_espresso'); ?></th>
9
+					<th class="jst-left"><?php esc_html_e('REG ID', 'event_espresso'); ?></th>
10
+					<th class="jst-left"><?php esc_html_e('TXN ID', 'event_espresso'); ?></th>
11
+					<th class="jst-left"><?php esc_html_e('Reg Code', 'event_espresso'); ?></th>
12
+					<th class="jst-rght"><?php esc_html_e('Ticket Price', 'event_espresso'); ?></th>
13 13
 				</tr>
14 14
 			</thead>
15 15
 			<tbody>
16
-			<?php foreach( $registrations as $registration ) : ?>
16
+			<?php foreach ($registrations as $registration) : ?>
17 17
 				<tr>
18 18
 					<td class="jst-left">
19 19
 					<?php
20
-						$event_url = add_query_arg( array( 'action' => 'edit', 'post' => $registration->event_ID() ), admin_url( 'admin.php?page=espresso_events' ));
21
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'espresso_events_edit', $registration->event_ID() ) ?  '<a href="'. $event_url .'"  title="'. esc_attr__( 'Edit Event', 'event_espresso' ) .'">' . $registration->event_name() . '</a>' : $registration->event_name();
20
+						$event_url = add_query_arg(array('action' => 'edit', 'post' => $registration->event_ID()), admin_url('admin.php?page=espresso_events'));
21
+						echo EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $registration->event_ID()) ? '<a href="'.$event_url.'"  title="'.esc_attr__('Edit Event', 'event_espresso').'">'.$registration->event_name().'</a>' : $registration->event_name();
22 22
 					?>
23 23
 					</td>
24 24
 					<td class="jst-left">
25 25
 					<?php
26
-							$reg_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration->ID() ), REG_ADMIN_URL );
27
-							echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $registration->ID() ) ? '
28
-							<a href="'.$reg_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . 
29
-								esc_html__( 'View Registration', 'event_espresso' ) .
26
+							$reg_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration->ID()), REG_ADMIN_URL);
27
+							echo EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $registration->ID()) ? '
28
+							<a href="'.$reg_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'. 
29
+								esc_html__('View Registration', 'event_espresso').
30 30
 							'</a>' : $registration->ID();
31 31
 					?>
32 32
 					</td>
33 33
 					<td class="jst-left">
34 34
 					<?php
35
-						$txn_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID() ), TXN_ADMIN_URL );
36
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ? '
37
-						<a href="'.$txn_url.'" title="' . esc_attr__( 'View Transaction Details', 'event_espresso' ) . '">' .
38
-							sprintf( esc_html__('View Transaction %d', 'event_espresso'), $registration->transaction_ID() ) .
35
+						$txn_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID()), TXN_ADMIN_URL);
36
+						echo EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '
37
+						<a href="'.$txn_url.'" title="'.esc_attr__('View Transaction Details', 'event_espresso').'">'.
38
+							sprintf(esc_html__('View Transaction %d', 'event_espresso'), $registration->transaction_ID()).
39 39
 						'</a>' : $registration->transaction_ID();
40 40
 					?>
41 41
 					</td>
42
-					<td class="jst-left"><?php echo $registration->reg_code();?></td>
43
-					<td class="jst-rght"><?php echo EEH_Template::format_currency( $registration->final_price() );?></td>
42
+					<td class="jst-left"><?php echo $registration->reg_code(); ?></td>
43
+					<td class="jst-rght"><?php echo EEH_Template::format_currency($registration->final_price()); ?></td>
44 44
 				</tr>
45 45
 			<?php endforeach; ?>
46 46
 			</tbody>
Please login to merge, or discard this patch.
strategies/validation/EE_Max_Length_Validation_Strategy.strategy.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,36 +8,36 @@
 block discarded – undo
8 8
  * @subpackage	Expression package is undefined on line 19, column 19 in Templates/Scripting/PHPClass.php.
9 9
  * @author				Mike Nelson
10 10
  */
11
-class EE_Max_Length_Validation_Strategy extends EE_Validation_Strategy_Base{
11
+class EE_Max_Length_Validation_Strategy extends EE_Validation_Strategy_Base {
12 12
 
13 13
 	protected $_max_length;
14 14
 
15
-	public function __construct( $validation_error_message = NULL, $max_length = EE_INF ) {
15
+	public function __construct($validation_error_message = NULL, $max_length = EE_INF) {
16 16
 		$this->_max_length = $max_length;
17
-		if( $validation_error_message === null ) {
18
-			$validation_error_message = sprintf( __( 'Input is too long. Maximum number of characters is %1$s', 'event_espresso' ), $max_length );
17
+		if ($validation_error_message === null) {
18
+			$validation_error_message = sprintf(__('Input is too long. Maximum number of characters is %1$s', 'event_espresso'), $max_length);
19 19
 		}
20
-		parent::__construct( $validation_error_message );
20
+		parent::__construct($validation_error_message);
21 21
 	}
22 22
 
23 23
 	/**
24 24
 	 * @param $normalized_value
25 25
 	 */
26 26
 	public function validate($normalized_value) {
27
-		if( $this->_max_length !== EE_INF &&
27
+		if ($this->_max_length !== EE_INF &&
28 28
 				$normalized_value &&
29
-				is_string( $normalized_value ) &&
30
-				 strlen( $normalized_value ) > $this->_max_length){
31
-			throw new EE_Validation_Error( $this->get_validation_error_message(), 'maxlength' );
29
+				is_string($normalized_value) &&
30
+				 strlen($normalized_value) > $this->_max_length) {
31
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'maxlength');
32 32
 		}
33 33
 	}
34 34
 
35 35
 	/**
36 36
 	 * @return array
37 37
 	 */
38
-	function get_jquery_validation_rule_array(){
39
-		if( $this->_max_length !== EE_INF ) {
40
-			return array( 'maxlength'=> $this->_max_length, 'messages' => array( 'maxlength' => $this->get_validation_error_message() ) );
38
+	function get_jquery_validation_rule_array() {
39
+		if ($this->_max_length !== EE_INF) {
40
+			return array('maxlength'=> $this->_max_length, 'messages' => array('maxlength' => $this->get_validation_error_message()));
41 41
 		} else {
42 42
 			return array();
43 43
 		}
Please login to merge, or discard this patch.
core/db_models/EEM_Extra_Join.model.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,26 +21,26 @@
 block discarded – undo
21 21
  * @since		 	   $VID:$
22 22
  *
23 23
  */
24
-if (!defined('EVENT_ESPRESSO_VERSION')) {
24
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
25 25
 	exit('No direct script access allowed');
26 26
 }
27 27
 
28
-class EEM_Extra_Join extends EEM_Base{
28
+class EEM_Extra_Join extends EEM_Base {
29 29
 	// private instance of the Extra Join object
30 30
 	protected static $_instance = NULL;
31 31
 	
32 32
 	public function __construct($timezone = NULL) {
33
-		$models_this_can_join = array_keys( EE_Registry::instance()->non_abstract_db_models );
33
+		$models_this_can_join = array_keys(EE_Registry::instance()->non_abstract_db_models);
34 34
 		$this->_tables = array(
35
-			'Extra_Join' => new EE_Primary_Table( 'esp_extra_join', 'EXJ_ID' ),
35
+			'Extra_Join' => new EE_Primary_Table('esp_extra_join', 'EXJ_ID'),
36 36
 		);
37 37
 		$this->_fields = array(
38 38
 			'Extra_Join' => array(
39
-				'EXJ_ID' => new EE_Primary_Key_Int_Field( 'EXJ_ID', __( 'Extra Join ID', 'event_espresso' ) ),
40
-				'EXJ_first_model_ID' => new EE_Foreign_Key_String_Field( 'EXJ_first_model_ID', __( 'First Model ID', 'event_espresso' ), true, 0, $models_this_can_join ),
41
-				'EXJ_first_model_name' => new EE_Any_Foreign_Model_Name_Field( 'EXJ_first_model_name', __( 'First Model Name', 'event_espresso'), true, '', $models_this_can_join ),
42
-				'EXJ_second_model_ID' => new EE_Foreign_Key_String_Field( 'EXJ_second_model_ID', __( 'Second Model ID', 'event_espresso' ), true, 0, $models_this_can_join ),
43
-				'EXJ_second_model_name' => new EE_Any_Foreign_Model_Name_Field( 'EXJ_second_model_name', __( 'Second Model Name', 'event_espresso'), true, '', $models_this_can_join ),
39
+				'EXJ_ID' => new EE_Primary_Key_Int_Field('EXJ_ID', __('Extra Join ID', 'event_espresso')),
40
+				'EXJ_first_model_ID' => new EE_Foreign_Key_String_Field('EXJ_first_model_ID', __('First Model ID', 'event_espresso'), true, 0, $models_this_can_join),
41
+				'EXJ_first_model_name' => new EE_Any_Foreign_Model_Name_Field('EXJ_first_model_name', __('First Model Name', 'event_espresso'), true, '', $models_this_can_join),
42
+				'EXJ_second_model_ID' => new EE_Foreign_Key_String_Field('EXJ_second_model_ID', __('Second Model ID', 'event_espresso'), true, 0, $models_this_can_join),
43
+				'EXJ_second_model_name' => new EE_Any_Foreign_Model_Name_Field('EXJ_second_model_name', __('Second Model Name', 'event_espresso'), true, '', $models_this_can_join),
44 44
 				
45 45
 			)
46 46
 		);
Please login to merge, or discard this patch.
4_9_0_stages/EE_DMS_4_9_0_Answers_With_No_Registration.dmsstage.php 1 patch
Spacing   +6 added lines, -6 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
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  * @author				Brent Christensen
15 15
  *
16 16
  */
17
-class EE_DMS_4_9_0_Answers_With_No_Registration extends EE_Data_Migration_Script_Stage{
17
+class EE_DMS_4_9_0_Answers_With_No_Registration extends EE_Data_Migration_Script_Stage {
18 18
 
19 19
 
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	 * @return EE_DMS_4_9_0_Answers_With_No_Registration
25 25
 	 */
26 26
 	public function __construct() {
27
-		$this->_pretty_name = __( 'Answer Cleanup', 'event_espresso' );
27
+		$this->_pretty_name = __('Answer Cleanup', 'event_espresso');
28 28
 		parent::__construct();
29 29
 	}
30 30
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	protected function _migration_step($num_items_to_migrate = 50) {
49 49
 		global $wpdb;
50 50
 		$wpdb->delete(
51
-			$wpdb->prefix . 'esp_answer',
52
-			array( 'REG_ID' => 0 ),
53
-			array( '%d' )
51
+			$wpdb->prefix.'esp_answer',
52
+			array('REG_ID' => 0),
53
+			array('%d')
54 54
 		);
55 55
 		$this->set_completed();
56 56
 		return 1;
Please login to merge, or discard this patch.
core/db_models/EEM_Extra_Meta.model.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
  *
27 27
  * ------------------------------------------------------------------------
28 28
  */
29
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
29
+require_once (EE_MODELS.'EEM_Base.model.php');
30 30
 
31 31
 class EEM_Extra_Meta extends EEM_Base {
32 32
 
33 33
   	// private instance of the Attendee object
34 34
 	protected static $_instance = NULL;
35 35
 
36
-	protected function __construct( $timezone = NULL ) {
37
-		$this->singular_item = __('Extra Meta','event_espresso');
38
-		$this->plural_item = __('Extra Metas','event_espresso');
36
+	protected function __construct($timezone = NULL) {
37
+		$this->singular_item = __('Extra Meta', 'event_espresso');
38
+		$this->plural_item = __('Extra Metas', 'event_espresso');
39 39
 		$this->_tables = array(
40 40
 			'Extra_Meta'=> new EE_Primary_Table('esp_extra_meta', 'EXM_ID')
41 41
 		);
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 
51 51
 			));
52 52
 		$this->_model_relations = array();
53
-		foreach($models_this_can_attach_to as $model){
53
+		foreach ($models_this_can_attach_to as $model) {
54 54
 			$this->_model_relations[$model] = new EE_Belongs_To_Any_Relation();
55 55
 		}
56
-		foreach( $this->cap_contexts_to_cap_action_map() as $cap_context => $action ) {
57
-			$this->_cap_restriction_generators[ $cap_context ] = new EE_Restriction_Generator_Meta( 'EXM_key', 'EXM_value' );
56
+		foreach ($this->cap_contexts_to_cap_action_map() as $cap_context => $action) {
57
+			$this->_cap_restriction_generators[$cap_context] = new EE_Restriction_Generator_Meta('EXM_key', 'EXM_value');
58 58
 		}
59
-		parent::__construct( $timezone );
59
+		parent::__construct($timezone);
60 60
 	}
61 61
 
62 62
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.