Completed
Branch welcome-vuee (6b92e2)
by
unknown
61:25 queued 50:26
created
public/Espresso_Arabica_2014/content-espresso_events.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,52 +18,52 @@
 block discarded – undo
18 18
  * and/or use any of the template tags functions found in:
19 19
  * \wp-content\plugins\event-espresso-core\public\template_tags.php
20 20
  ************************** IMPORTANT **************************/
21
-add_filter( 'FHEE__content_espresso_events__template_loaded', '__return_true' );
21
+add_filter('FHEE__content_espresso_events__template_loaded', '__return_true');
22 22
 
23 23
 //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
24 24
 
25 25
 global $post;
26
-$event_class = has_excerpt( $post->ID ) ? ' has-excerpt' : '';
27
-$event_class = apply_filters( 'FHEE__content_espresso_events__event_class', $event_class );
26
+$event_class = has_excerpt($post->ID) ? ' has-excerpt' : '';
27
+$event_class = apply_filters('FHEE__content_espresso_events__event_class', $event_class);
28 28
 ?>
29
-<?php do_action( 'AHEE_event_details_before_post', $post ); ?>
30
-<article id="post-<?php the_ID(); ?>" <?php post_class( $event_class ); ?>>
29
+<?php do_action('AHEE_event_details_before_post', $post); ?>
30
+<article id="post-<?php the_ID(); ?>" <?php post_class($event_class); ?>>
31 31
 
32
-<?php if ( is_single() ) : ?>
32
+<?php if (is_single()) : ?>
33 33
 
34
-	<div id="espresso-event-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
35
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
36
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
34
+	<div id="espresso-event-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
35
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
36
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
37 37
 	</div>
38 38
 
39 39
 	<div class="espresso-event-wrapper-dv">
40
-		<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
41
-		<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
42
-		<?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
43
-		<?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
40
+		<?php espresso_get_template_part('content', 'espresso_events-tickets'); ?>
41
+		<?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?>
42
+		<?php espresso_get_template_part('content', 'espresso_events-details'); ?>
43
+		<?php espresso_get_template_part('content', 'espresso_events-venues'); ?>
44 44
 		<footer class="event-meta">
45
-			<?php do_action( 'AHEE_event_details_footer_top', $post ); ?>
46
-			<?php do_action( 'AHEE_event_details_footer_bottom', $post ); ?>
45
+			<?php do_action('AHEE_event_details_footer_top', $post); ?>
46
+			<?php do_action('AHEE_event_details_footer_bottom', $post); ?>
47 47
 		</footer>
48 48
 	</div>
49 49
 
50
-<?php elseif ( is_archive() ) : ?>
50
+<?php elseif (is_archive()) : ?>
51 51
 
52
-	<div id="espresso-event-list-header-dv-<?php echo $post->ID;?>" class="espresso-event-header-dv">
53
-		<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
54
-		<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
52
+	<div id="espresso-event-list-header-dv-<?php echo $post->ID; ?>" class="espresso-event-header-dv">
53
+		<?php espresso_get_template_part('content', 'espresso_events-thumbnail'); ?>
54
+		<?php espresso_get_template_part('content', 'espresso_events-header'); ?>
55 55
 	</div>
56 56
 
57 57
 	<div class="espresso-event-list-wrapper-dv">
58
-		<?php espresso_get_template_part( 'content', 'espresso_events-tickets' ); ?>
59
-		<?php espresso_get_template_part( 'content', 'espresso_events-datetimes' ); ?>
60
-		<?php espresso_get_template_part( 'content', 'espresso_events-details' ); ?>
61
-		<?php espresso_get_template_part( 'content', 'espresso_events-venues' ); ?>
58
+		<?php espresso_get_template_part('content', 'espresso_events-tickets'); ?>
59
+		<?php espresso_get_template_part('content', 'espresso_events-datetimes'); ?>
60
+		<?php espresso_get_template_part('content', 'espresso_events-details'); ?>
61
+		<?php espresso_get_template_part('content', 'espresso_events-venues'); ?>
62 62
 	</div>
63 63
 
64 64
 <?php endif; ?>
65 65
 
66 66
 </article>
67 67
 <!-- #post -->
68
-<?php do_action( 'AHEE_event_details_after_post', $post );
68
+<?php do_action('AHEE_event_details_after_post', $post);
69 69
 
Please login to merge, or discard this patch.
modules/ical/EED_Ical.module.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,8 +220,8 @@
 block discarded – undo
220 220
 			//Escape spcial chars within the decription
221 221
 			$description = EED_Ical::_escape_ICal_data( $description );
222 222
 
223
-		    //Remove line breaks and output in iCal format
224
-		    $description = str_replace( array( "\r\n", "\n"), '\n', $description );
223
+			//Remove line breaks and output in iCal format
224
+			$description = str_replace( array( "\r\n", "\n"), '\n', $description );
225 225
 
226 226
 		return $description;
227 227
 	}
Please login to merge, or discard this patch.
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @return EED_Ical
33 33
 	 */
34 34
 	public static function instance() {
35
-		return parent::get_instance( __CLASS__ );
35
+		return parent::get_instance(__CLASS__);
36 36
 	}
37 37
 
38 38
 
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function set_hooks() {
47 47
 		// create download buttons
48
-		add_filter( 'FHEE__espresso_list_of_event_dates__datetime_html', array( 'EED_Ical', 'generate_add_to_iCal_button' ), 10, 2 );
48
+		add_filter('FHEE__espresso_list_of_event_dates__datetime_html', array('EED_Ical', 'generate_add_to_iCal_button'), 10, 2);
49 49
 		 // process ics download request
50
-		EE_Config::register_route( 'download_ics_file', 'EED_Ical', 'download_ics_file' );
50
+		EE_Config::register_route('download_ics_file', 'EED_Ical', 'download_ics_file');
51 51
 	}
52 52
 
53 53
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @param    WP $WP
71 71
 	 * @return    void
72 72
 	 */
73
-	public function run( $WP ) {}
73
+	public function run($WP) {}
74 74
 
75 75
 
76 76
 
@@ -82,30 +82,30 @@  discard block
 block discarded – undo
82 82
 	 * @param $datetime
83 83
 	 * @return    string
84 84
 	 */
85
-	public static function generate_add_to_iCal_button( $html, $datetime ) {
85
+	public static function generate_add_to_iCal_button($html, $datetime) {
86 86
 		// first verify a proper datetime object has been received
87
-		if ( $datetime instanceof EE_Datetime ) {
87
+		if ($datetime instanceof EE_Datetime) {
88 88
 			// set whether a link or submit button is shown
89
-			$iCal_type = apply_filters( 'FHEE__EED_Ical__generate_add_to_iCal_button__iCal_type', 'submit' );
89
+			$iCal_type = apply_filters('FHEE__EED_Ical__generate_add_to_iCal_button__iCal_type', 'submit');
90 90
 			// generate a link to the route we registered in set_hooks()
91
-			$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $datetime->ID() ), site_url() );
91
+			$URL = add_query_arg(array('ee' => 'download_ics_file', 'ics_id' => $datetime->ID()), site_url());
92 92
 			// what type ?
93
-			switch ( $iCal_type ) {
93
+			switch ($iCal_type) {
94 94
 				// submit buttons appear as buttons and are very compatible with a theme's style
95 95
 				case 'submit' :
96
-					$html .= '<form id="download-iCal-frm-' . $datetime->ID() . '" class="download-iCal-frm" action="' . $URL . '" method="post" >';
97
-					$html .= '<input type="submit" class="ee-ical-sbmt" value="&#xf145;" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '"/>';
96
+					$html .= '<form id="download-iCal-frm-'.$datetime->ID().'" class="download-iCal-frm" action="'.$URL.'" method="post" >';
97
+					$html .= '<input type="submit" class="ee-ical-sbmt" value="&#xf145;" title="'.__('Add to iCal Calendar', 'event_espresso').'"/>';
98 98
 					$html .= '</form>';
99 99
 					break;
100 100
 				// buttons are just links that have been styled to appear as buttons, but may not be blend with a theme as well as submit buttons
101 101
 				case 'button' :
102
-					$html .= '<a class="ee-ical-btn small ee-button ee-roundish" href="' . $URL . '" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '">';
102
+					$html .= '<a class="ee-ical-btn small ee-button ee-roundish" href="'.$URL.'" title="'.__('Add to iCal Calendar', 'event_espresso').'">';
103 103
 					$html .= ' <span class="dashicons dashicons-calendar"></span>';
104 104
 					$html .= '</a>';
105 105
 					break;
106 106
 				// links are just links that use the calendar dashicon
107 107
 				case 'icon' :
108
-					$html .= '<a class="ee-ical-lnk" href="' . $URL . '" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '">';
108
+					$html .= '<a class="ee-ical-lnk" href="'.$URL.'" title="'.__('Add to iCal Calendar', 'event_espresso').'">';
109 109
 					$html .= ' <span class="dashicons dashicons-calendar"></span>';
110 110
 					$html .= '</a>';
111 111
 					break;
@@ -123,72 +123,72 @@  discard block
 block discarded – undo
123 123
 	 *  @return 	void
124 124
 	 */
125 125
 	public static function download_ics_file() {
126
-		if ( EE_Registry::instance()->REQ->is_set( 'ics_id' )) {
127
-			$DTT_ID = absint( EE_Registry::instance()->REQ->get( 'ics_id' ));
128
-			$datetime = EE_Registry::instance()->load_model( 'Datetime' )->get_one_by_ID( $DTT_ID );
129
-			if ( $datetime instanceof EE_Datetime ) {
126
+		if (EE_Registry::instance()->REQ->is_set('ics_id')) {
127
+			$DTT_ID = absint(EE_Registry::instance()->REQ->get('ics_id'));
128
+			$datetime = EE_Registry::instance()->load_model('Datetime')->get_one_by_ID($DTT_ID);
129
+			if ($datetime instanceof EE_Datetime) {
130 130
 				// get related event, venues, and event categories
131 131
 				$event = $datetime->event();
132 132
 				// get related category Term object and it's name
133 133
 				$category = $event->first_event_category();
134
-				if ( $category instanceof EE_Term ) {
134
+				if ($category instanceof EE_Term) {
135 135
 					$category = $category->name();
136 136
 				}
137 137
 				$location = '';
138 138
 				// get first related venue and convert to CSV string
139
-				$venue = $event->venues(array( 'limit'=>1 ));
140
-				if ( is_array( $venue ) && ! empty( $venue )) {
141
-					$venue = array_shift( $venue );
142
-					if ( $venue instanceof EE_Venue ) {
143
-						$location = espresso_venue_raw_address( 'inline', $venue->ID(), FALSE );
139
+				$venue = $event->venues(array('limit'=>1));
140
+				if (is_array($venue) && ! empty($venue)) {
141
+					$venue = array_shift($venue);
142
+					if ($venue instanceof EE_Venue) {
143
+						$location = espresso_venue_raw_address('inline', $venue->ID(), FALSE);
144 144
 					}
145 145
 				}
146 146
 				// set variables, escape strings, convert timestamps to ics format, etc
147
-				$filename = $event->slug() . '-' . $datetime->start_date( 'Y-m-d' ) . '.ics';
148
-				$organizer = EED_Ical::_escape_ICal_data( EE_Registry::instance()->CFG->organization->name );
149
-				$UID = EED_Ical::_escape_ICal_data( md5( $event->name() . $event->ID() . $datetime->ID() ));
150
-				$org_email = EED_Ical::_escape_ICal_data( $datetime->ID() );
151
-				$timestamp = date( EED_Ical::iCal_datetime_format );
152
-				$location = EED_Ical::_escape_ICal_data( $location );
153
-				$summary = EED_Ical::_escape_ICal_data( $event->name() );
154
-				$description = EED_Ical::_escape_ICal_description( wp_strip_all_tags( $event->description() ));
147
+				$filename = $event->slug().'-'.$datetime->start_date('Y-m-d').'.ics';
148
+				$organizer = EED_Ical::_escape_ICal_data(EE_Registry::instance()->CFG->organization->name);
149
+				$UID = EED_Ical::_escape_ICal_data(md5($event->name().$event->ID().$datetime->ID()));
150
+				$org_email = EED_Ical::_escape_ICal_data($datetime->ID());
151
+				$timestamp = date(EED_Ical::iCal_datetime_format);
152
+				$location = EED_Ical::_escape_ICal_data($location);
153
+				$summary = EED_Ical::_escape_ICal_data($event->name());
154
+				$description = EED_Ical::_escape_ICal_description(wp_strip_all_tags($event->description()));
155 155
 				$status = $datetime->get_active_status();
156 156
 				$status = $status == EE_Datetime::cancelled ? 'Cancelled' : 'Confirmed';
157
-				$status = EED_Ical::_escape_ICal_data( $status );
158
-				$categories = EED_Ical::_escape_ICal_data( $category );
159
-				$url = EED_Ical::_escape_ICal_data( get_permalink( $event->ID() ));
160
-				$dtt_start = EED_Ical::_escape_ICal_data( date( EED_Ical::iCal_datetime_format, $datetime->start() ));
161
-				$dtt_end = EED_Ical::_escape_ICal_data( date( EED_Ical::iCal_datetime_format, $datetime->end() ));
157
+				$status = EED_Ical::_escape_ICal_data($status);
158
+				$categories = EED_Ical::_escape_ICal_data($category);
159
+				$url = EED_Ical::_escape_ICal_data(get_permalink($event->ID()));
160
+				$dtt_start = EED_Ical::_escape_ICal_data(date(EED_Ical::iCal_datetime_format, $datetime->start()));
161
+				$dtt_end = EED_Ical::_escape_ICal_data(date(EED_Ical::iCal_datetime_format, $datetime->end()));
162 162
 				// set headers
163
-				header( 'Content-type: text/calendar; charset=utf-8' );
164
-				header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
165
-				header( 'Cache-Control: private, max-age=0, must-revalidate' );
166
-				header( 'Pragma: public' );
167
-				header( 'Content-Type: application/octet-stream' );
168
-				header( 'Content-Type: application/force-download' );
169
-				header( 'Cache-Control: no-cache, must-revalidate' );
170
-				header( 'Content-Transfer-Encoding: binary' );
171
-				header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); // past date
172
-				ini_set( 'zlib.output_compression', '0' );
163
+				header('Content-type: text/calendar; charset=utf-8');
164
+				header('Content-Disposition: attachment; filename="'.$filename.'"');
165
+				header('Cache-Control: private, max-age=0, must-revalidate');
166
+				header('Pragma: public');
167
+				header('Content-Type: application/octet-stream');
168
+				header('Content-Type: application/force-download');
169
+				header('Cache-Control: no-cache, must-revalidate');
170
+				header('Content-Transfer-Encoding: binary');
171
+				header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // past date
172
+				ini_set('zlib.output_compression', '0');
173 173
 				// echo the output
174
-				echo "BEGIN:VCALENDAR" . PHP_EOL;
175
-				echo "VERSION:2.0" . PHP_EOL;
176
-				echo "PRODID:-//{$organizer}//NONSGML PDA Calendar Version 1.0//EN" . PHP_EOL;
177
-				echo "CALSCALE:GREGORIAN" . PHP_EOL;
178
-				echo "BEGIN:VEVENT" . PHP_EOL;
179
-				echo "UID:{$UID}" . PHP_EOL;
180
-				echo "ORGANIZER:MAILTO:{$org_email}" . PHP_EOL;
181
-				echo "DTSTAMP:{$timestamp}" . PHP_EOL;
182
-				echo "LOCATION:{$location}" . PHP_EOL;
183
-				echo "SUMMARY:{$summary}" . PHP_EOL;
184
-				echo "DESCRIPTION:{$description}" . PHP_EOL;
185
-				echo "STATUS:{$status}" . PHP_EOL;
186
-				echo "CATEGORIES:{$categories}" . PHP_EOL;
187
-				echo "URL;VALUE=URI:{$url}" . PHP_EOL;
188
-				echo "DTSTART:{$dtt_start}" . PHP_EOL;
189
-				echo "DTEND:{$dtt_end}" . PHP_EOL;
190
-				echo "END:VEVENT" . PHP_EOL;
191
-				echo "END:VCALENDAR" . PHP_EOL;
174
+				echo "BEGIN:VCALENDAR".PHP_EOL;
175
+				echo "VERSION:2.0".PHP_EOL;
176
+				echo "PRODID:-//{$organizer}//NONSGML PDA Calendar Version 1.0//EN".PHP_EOL;
177
+				echo "CALSCALE:GREGORIAN".PHP_EOL;
178
+				echo "BEGIN:VEVENT".PHP_EOL;
179
+				echo "UID:{$UID}".PHP_EOL;
180
+				echo "ORGANIZER:MAILTO:{$org_email}".PHP_EOL;
181
+				echo "DTSTAMP:{$timestamp}".PHP_EOL;
182
+				echo "LOCATION:{$location}".PHP_EOL;
183
+				echo "SUMMARY:{$summary}".PHP_EOL;
184
+				echo "DESCRIPTION:{$description}".PHP_EOL;
185
+				echo "STATUS:{$status}".PHP_EOL;
186
+				echo "CATEGORIES:{$categories}".PHP_EOL;
187
+				echo "URL;VALUE=URI:{$url}".PHP_EOL;
188
+				echo "DTSTART:{$dtt_start}".PHP_EOL;
189
+				echo "DTEND:{$dtt_end}".PHP_EOL;
190
+				echo "END:VEVENT".PHP_EOL;
191
+				echo "END:VCALENDAR".PHP_EOL;
192 192
 			}
193 193
 		}
194 194
 		die();
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 	 *  	@param	string $string
204 204
 	 *  	@return	string
205 205
 	 */
206
-	private static function _escape_ICal_data( $string = '' ) {
207
-		return preg_replace( '/([\,;])/', '\\\$1', $string );
206
+	private static function _escape_ICal_data($string = '') {
207
+		return preg_replace('/([\,;])/', '\\\$1', $string);
208 208
 	}
209 209
 
210 210
 	/**
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
 	 *  	@param	string $description
215 215
 	 *  	@return	string
216 216
 	 */
217
-	private static function _escape_ICal_description( $description = '' ) {
217
+	private static function _escape_ICal_description($description = '') {
218 218
 			
219 219
 			//Escape spcial chars within the decription
220
-			$description = EED_Ical::_escape_ICal_data( $description );
220
+			$description = EED_Ical::_escape_ICal_data($description);
221 221
 
222 222
 		    //Remove line breaks and output in iCal format
223
-		    $description = str_replace( array( "\r\n", "\n"), '\n', $description );
223
+		    $description = str_replace(array("\r\n", "\n"), '\n', $description);
224 224
 
225 225
 		return $description;
226 226
 	}
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.
admin_pages/support/Support_Admin_Page_Init.core.php 2 patches
Spacing   +7 added lines, -7 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
 /**
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		//define some help/support page related constants
35
-		define( 'EE_SUPPORT_PG_SLUG', 'espresso_support' );
36
-		define( 'EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page=' . EE_SUPPORT_PG_SLUG ));
37
-		define( 'EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES . 'support/templates/');
38
-		define( 'EE_SUPPORT_ADMIN', EE_ADMIN_PAGES . 'support/' );
39
-		define( 'EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL . 'support/assets/' );
35
+		define('EE_SUPPORT_PG_SLUG', 'espresso_support');
36
+		define('EE_SUPPORT_ADMIN_URL', admin_url('admin.php?page='.EE_SUPPORT_PG_SLUG));
37
+		define('EE_SUPPORT_ADMIN_TEMPLATE_PATH', EE_ADMIN_PAGES.'support/templates/');
38
+		define('EE_SUPPORT_ADMIN', EE_ADMIN_PAGES.'support/');
39
+		define('EE_SUPPORT_ASSETS_URL', EE_ADMIN_PAGES_URL.'support/assets/');
40 40
 		parent::__construct();
41 41
 	}
42 42
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	protected function _set_menu_map() {
48
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
48
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
49 49
 			'menu_group' => 'extras',
50 50
 			'menu_order' => 30,
51 51
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_AND_NETWORK_ADMIN,
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.
admin/extend/registrations/Extend_EE_Attendee_Contact_List_Table.class.php 2 patches
Spacing   +2 added lines, -2 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
 /**
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 				'route' => 'contact_list_report',
37 37
 				'extra_request' =>  
38 38
 						array( 
39
-							'return_url' => urlencode( "//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" ) ) 
39
+							'return_url' => urlencode("//{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}") ) 
40 40
 			),
41 41
 //			'contact_list_export'=> array(
42 42
 //				'route' => 'contact_list_export'
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/helpers/EEH_Export.helper.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -87,13 +87,13 @@
 block discarded – undo
87 87
 
88 88
 	 /**
89 89
 	  *
90
-	 *	Writes a row to the csv file
91
-	 *	@param array $row - individual row of csv data
92
-	 *	@param string $delimiter - csv delimiter
93
-	 *	@param string $enclosure - csv enclosure
94
-	 *	@param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value
95
-	 *	@return string of text for teh csv file
96
-	 */
90
+	  *	Writes a row to the csv file
91
+	  *	@param array $row - individual row of csv data
92
+	  *	@param string $delimiter - csv delimiter
93
+	  *	@param string $enclosure - csv enclosure
94
+	  *	@param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value
95
+	  *	@return string of text for teh csv file
96
+	  */
97 97
 	public static function get_csv_row ( array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false ) {
98 98
 		//Allow user to filter the csv delimiter and enclosure for other countries csv standards
99 99
 		$delimiter = apply_filters( 'FHEE__EE_CSV__fputcsv2__delimiter', $delimiter );
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 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
  *
@@ -77,7 +79,7 @@  discard block
 block discarded – undo
77 79
 				$new_file_contents .= EEH_Export::get_csv_row( $data_row);
78 80
 			}
79 81
 			return EEH_File::write_to_file( $filepath, EEH_File::get_file_contents( $filepath ) . $new_file_contents );
80
-		}else{
82
+		} else{
81 83
 			//no data TO write... so we can assume that's a success
82 84
 			return true;
83 85
 		}
@@ -138,9 +140,9 @@  discard block
 block discarded – undo
138 140
 		}
139 141
 		if( $pretty_schema === true){
140 142
 			return $field_obj->prepare_for_pretty_echoing( $value_on_model_obj );
141
-		}elseif( is_string( $pretty_schema ) ) {
143
+		} elseif( is_string( $pretty_schema ) ) {
142 144
 			return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema );
143
-		}else{
145
+		} else{
144 146
 			return $field_obj->prepare_for_get( $value_on_model_obj );
145 147
 		}
146 148
 	}
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @param EE_Model_Field_Base $field
31 31
 	 * @return string
32 32
 	 */
33
-	public static function get_column_name_for_field(EE_Model_Field_Base $field){
33
+	public static function get_column_name_for_field(EE_Model_Field_Base $field) {
34 34
 		return $field->get_nicename()."[".$field->get_name()."]";
35 35
 	}
36 36
 
@@ -52,31 +52,31 @@  discard block
 block discarded – undo
52 52
 	 * 						we consider that a success (because we wrote everything there was...nothing)
53 53
 	 * @throws EE_Error
54 54
 	 */
55
-	public static function write_data_array_to_csv( $filepath, $data, $write_column_headers = true ){
55
+	public static function write_data_array_to_csv($filepath, $data, $write_column_headers = true) {
56 56
 
57 57
 		$new_file_contents = '';
58 58
 		//determine if $data is actually a 2d array
59
-		if ( $data && is_array($data) && is_array(EEH_Array::get_one_item_from_array($data))){
59
+		if ($data && is_array($data) && is_array(EEH_Array::get_one_item_from_array($data))) {
60 60
 			//make sure top level is numerically indexed,
61 61
 
62
-			if( EEH_Array::is_associative_array($data)){
63
-				throw new EE_Error(sprintf(__("top-level array must be numerically indexed. Does these look like numbers to you? %s","event_espresso"),implode(",",array_keys($data))));
62
+			if (EEH_Array::is_associative_array($data)) {
63
+				throw new EE_Error(sprintf(__("top-level array must be numerically indexed. Does these look like numbers to you? %s", "event_espresso"), implode(",", array_keys($data))));
64 64
 			}
65 65
 			$item_in_top_level_array = EEH_Array::get_one_item_from_array($data);
66 66
 			//now, is the last item in the top-level array of $data an associative or numeric array?
67
-			if( $write_column_headers &&
68
-					EEH_Array::is_associative_array($item_in_top_level_array)){
67
+			if ($write_column_headers &&
68
+					EEH_Array::is_associative_array($item_in_top_level_array)) {
69 69
 				//its associative, so we want to output its keys as column headers
70 70
 				$keys = array_keys($item_in_top_level_array);
71
-				$new_file_contents .=  EEH_Export::get_csv_row( $keys );
71
+				$new_file_contents .= EEH_Export::get_csv_row($keys);
72 72
 
73 73
 			}
74 74
 			//start writing data
75
-			foreach($data as $data_row){
76
-				$new_file_contents .= EEH_Export::get_csv_row( $data_row);
75
+			foreach ($data as $data_row) {
76
+				$new_file_contents .= EEH_Export::get_csv_row($data_row);
77 77
 			}
78
-			return EEH_File::write_to_file( $filepath, EEH_File::get_file_contents( $filepath ) . $new_file_contents );
79
-		}else{
78
+			return EEH_File::write_to_file($filepath, EEH_File::get_file_contents($filepath).$new_file_contents);
79
+		} else {
80 80
 			//no data TO write... so we can assume that's a success
81 81
 			return true;
82 82
 		}
@@ -93,29 +93,29 @@  discard block
 block discarded – undo
93 93
 	 *	@param bool $mysql_null - allows php NULL to be overridden with MySQl's insertable NULL value
94 94
 	 *	@return string of text for teh csv file
95 95
 	 */
96
-	public static function get_csv_row ( array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false ) {
96
+	public static function get_csv_row(array $row, $delimiter = ',', $enclosure = '"', $mysql_null = false) {
97 97
 		//Allow user to filter the csv delimiter and enclosure for other countries csv standards
98
-		$delimiter = apply_filters( 'FHEE__EE_CSV__fputcsv2__delimiter', $delimiter );
99
-		$enclosure = apply_filters( 'FHEE__EE_CSV__fputcsv2__enclosure', $enclosure );
98
+		$delimiter = apply_filters('FHEE__EE_CSV__fputcsv2__delimiter', $delimiter);
99
+		$enclosure = apply_filters('FHEE__EE_CSV__fputcsv2__enclosure', $enclosure);
100 100
 
101 101
 		$delimiter_esc = preg_quote($delimiter, '/');
102 102
 		$enclosure_esc = preg_quote($enclosure, '/');
103 103
 
104 104
 		$output = array();
105 105
 		foreach ($row as $field_value) {
106
-			if(is_object($field_value) || is_array($field_value)){
106
+			if (is_object($field_value) || is_array($field_value)) {
107 107
 				$field_value = serialize($field_value);
108 108
 			}
109
-			if ($field_value === null && $mysql_null ) {
109
+			if ($field_value === null && $mysql_null) {
110 110
 				$output[] = 'NULL';
111 111
 				continue;
112 112
 			}
113 113
 
114 114
 			$output[] = preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field_value) ?
115
-				( $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field_value) . $enclosure ) : $field_value;
115
+				($enclosure.str_replace($enclosure, $enclosure.$enclosure, $field_value).$enclosure) : $field_value;
116 116
 		}
117 117
 
118
-		return  implode($delimiter, $output) . PHP_EOL;
118
+		return  implode($delimiter, $output).PHP_EOL;
119 119
 	}
120 120
 
121 121
 
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
 	 * @param boolean|string $pretty_schema true to display pretty, a string to use a specific "Schema", or false to NOT display pretty
129 129
 	 * @return string
130 130
 	 */
131
-	public static function prepare_value_from_db_for_display( $model, $field_name,  $raw_db_value, $pretty_schema = true ) {
132
-		$field_obj = $model->field_settings_for( $field_name );
133
-		$value_on_model_obj = $field_obj->prepare_for_set_from_db( $raw_db_value );
134
-		if( $field_obj instanceof EE_Datetime_Field ) {
135
-			$field_obj->set_date_format( EEH_Export::get_date_format_for_export( $field_obj->get_date_format( $pretty_schema ) ), $pretty_schema );
136
-			$field_obj->set_time_format( EEH_Export::get_time_format_for_export( $field_obj->get_time_format( $pretty_schema ) ), $pretty_schema );
131
+	public static function prepare_value_from_db_for_display($model, $field_name, $raw_db_value, $pretty_schema = true) {
132
+		$field_obj = $model->field_settings_for($field_name);
133
+		$value_on_model_obj = $field_obj->prepare_for_set_from_db($raw_db_value);
134
+		if ($field_obj instanceof EE_Datetime_Field) {
135
+			$field_obj->set_date_format(EEH_Export::get_date_format_for_export($field_obj->get_date_format($pretty_schema)), $pretty_schema);
136
+			$field_obj->set_time_format(EEH_Export::get_time_format_for_export($field_obj->get_time_format($pretty_schema)), $pretty_schema);
137 137
 		}
138
-		if( $pretty_schema === true){
139
-			return $field_obj->prepare_for_pretty_echoing( $value_on_model_obj );
140
-		}elseif( is_string( $pretty_schema ) ) {
141
-			return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema );
142
-		}else{
143
-			return $field_obj->prepare_for_get( $value_on_model_obj );
138
+		if ($pretty_schema === true) {
139
+			return $field_obj->prepare_for_pretty_echoing($value_on_model_obj);
140
+		}elseif (is_string($pretty_schema)) {
141
+			return $field_obj->prepare_for_pretty_echoing($value_on_model_obj, $pretty_schema);
142
+		} else {
143
+			return $field_obj->prepare_for_get($value_on_model_obj);
144 144
 		}
145 145
 	}
146 146
 
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
 	 * @param string $current_format
152 152
 	 * @return string
153 153
 	 */
154
-	public static function get_date_format_for_export( $current_format = null ) {
155
-		return apply_filters( 'FHEE__EE_CSV__get_date_format_for_csv__format', 'Y-m-d', $current_format );
154
+	public static function get_date_format_for_export($current_format = null) {
155
+		return apply_filters('FHEE__EE_CSV__get_date_format_for_csv__format', 'Y-m-d', $current_format);
156 156
 	}
157 157
 
158 158
 
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
 	 * @param string $current_format
163 163
 	 * @return string
164 164
 	 */
165
-	public static function get_time_format_for_export( $current_format = null ) {
166
-		return apply_filters( 'FHEE__EE_CSV__get_time_format_for_csv__format', 'H:i:s', $current_format );
165
+	public static function get_time_format_for_export($current_format = null) {
166
+		return apply_filters('FHEE__EE_CSV__get_time_format_for_csv__format', 'H:i:s', $current_format);
167 167
 	}
168 168
 
169 169
 
Please login to merge, or discard this patch.
core/libraries/batch/BatchRequestProcessor.php 2 patches
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 use EventEspressoBatchRequest\Helpers\JobParameters;
24 24
 use EventEspressoBatchRequest\Helpers\JobStepResponse;
25 25
 
26
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
27
-	exit( 'No direct script access allowed' );
26
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
27
+	exit('No direct script access allowed');
28 28
 }
29 29
 
30 30
 
@@ -50,32 +50,32 @@  discard block
 block discarded – undo
50 50
 	 * @param array $request_data to be used by the batch job handler
51 51
 	 * @return JobStepResponse
52 52
 	 */
53
-	public function create_job( $batch_job_handler_class, $request_data ) {
53
+	public function create_job($batch_job_handler_class, $request_data) {
54 54
 		try {
55
-			$this->_job_id = wp_generate_password( 15, false );
56
-			$obj = $this->instantiate_batch_job_handler_from_classname( $batch_job_handler_class );
57
-			$this->_job_parameters = new JobParameters( $this->_job_id, $batch_job_handler_class, $request_data );
58
-			$response = $obj->create_job( $this->_job_parameters );
59
-			if( ! $response instanceof JobStepResponse ) {
55
+			$this->_job_id = wp_generate_password(15, false);
56
+			$obj = $this->instantiate_batch_job_handler_from_classname($batch_job_handler_class);
57
+			$this->_job_parameters = new JobParameters($this->_job_id, $batch_job_handler_class, $request_data);
58
+			$response = $obj->create_job($this->_job_parameters);
59
+			if ( ! $response instanceof JobStepResponse) {
60 60
 				throw new BatchRequestException(
61 61
 					sprintf(
62
-						__( 'The class implementing JobHandlerInterface did not return a JobStepResponse when create_job was called with %1$s. It needs to return one or throw an Exception', 'event_espresso' ),
63
-						wp_json_encode( $request_data )
62
+						__('The class implementing JobHandlerInterface did not return a JobStepResponse when create_job was called with %1$s. It needs to return one or throw an Exception', 'event_espresso'),
63
+						wp_json_encode($request_data)
64 64
 					)
65 65
 				);
66 66
 			}
67
-			$success = $this->_job_parameters->save( true );
68
-			if( ! $success ) {
67
+			$success = $this->_job_parameters->save(true);
68
+			if ( ! $success) {
69 69
 				throw new BatchRequestException(
70 70
 					sprintf(
71 71
 						__('Could not save job %1$s to the Wordpress Options table. These were the arguments used: %2$s', 'event_espresso'),
72 72
 						$this->_job_id,
73
-						wp_json_encode( $request_data )
73
+						wp_json_encode($request_data)
74 74
 					)
75 75
 				);
76 76
 			}
77
-		} catch( \Exception $e ) {
78
-			$response = $this->_get_error_response( $e, 'create_job' );
77
+		} catch (\Exception $e) {
78
+			$response = $this->_get_error_response($e, 'create_job');
79 79
 		}
80 80
 		return $response;
81 81
 	}
@@ -88,26 +88,26 @@  discard block
 block discarded – undo
88 88
 	 * @param int $batch_size
89 89
 	 * @return JobStepResponse
90 90
 	 */
91
-	public function continue_job( $job_id, $batch_size = 50 ) {
91
+	public function continue_job($job_id, $batch_size = 50) {
92 92
 		try {
93 93
 			$this->_job_id = $job_id;
94
-			$batch_size = defined( 'EE_BATCHRUNNER_BATCH_SIZE' ) ? EE_BATCHRUNNER_BATCH_SIZE : $batch_size;
94
+			$batch_size = defined('EE_BATCHRUNNER_BATCH_SIZE') ? EE_BATCHRUNNER_BATCH_SIZE : $batch_size;
95 95
 			//get the corresponding WordPress option for the job
96
-			$this->_job_parameters = JobParameters::load( $this->_job_id );
97
-			$handler_obj = $this->instantiate_batch_job_handler_from_classname( $this->_job_parameters->classname() );
96
+			$this->_job_parameters = JobParameters::load($this->_job_id);
97
+			$handler_obj = $this->instantiate_batch_job_handler_from_classname($this->_job_parameters->classname());
98 98
 			//continue it
99
-			$response = $handler_obj->continue_job( $this->_job_parameters, $batch_size );
100
-			if( ! $response instanceof JobStepResponse ) {
99
+			$response = $handler_obj->continue_job($this->_job_parameters, $batch_size);
100
+			if ( ! $response instanceof JobStepResponse) {
101 101
 				throw new BatchRequestException(
102 102
 					sprintf(
103
-						__( 'The class implementing JobHandlerInterface did not return a JobStepResponse when continue_job was called with job %1$s. It needs to return one or throw an Exception', 'event_espresso' ),
103
+						__('The class implementing JobHandlerInterface did not return a JobStepResponse when continue_job was called with job %1$s. It needs to return one or throw an Exception', 'event_espresso'),
104 104
 						$this->_job_id
105 105
 					)
106 106
 				);
107 107
 			}
108 108
 			$this->_job_parameters->save();
109
-		} catch( \Exception $e ) {
110
-			$response = $this->_get_error_response( $e, 'continue_job' );
109
+		} catch (\Exception $e) {
110
+			$response = $this->_get_error_response($e, 'continue_job');
111 111
 		}
112 112
 		return $response;
113 113
 	}
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 	 * @return JobHandlerInterface
123 123
 	 * @throws BatchRequestException
124 124
 	 */
125
-	public function instantiate_batch_job_handler_from_classname( $classname ) {
126
-		if( ! class_exists( $classname ) ) {
125
+	public function instantiate_batch_job_handler_from_classname($classname) {
126
+		if ( ! class_exists($classname)) {
127 127
 			throw new BatchRequestException(
128 128
 				sprintf(
129 129
 					__('The class %1$s does not exist, and so could not be used for running a job. It should implement JobHandlerInterface.', 'event_espresso'),
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			);
133 133
 		}
134 134
 		$obj = new $classname;
135
-		if( ! $obj instanceof JobHandlerInterface ) {
135
+		if ( ! $obj instanceof JobHandlerInterface) {
136 136
 			throw new BatchRequestException(
137 137
 				sprintf(
138 138
 					__('The class %1$s does not implement JobHandlerInterface and so could not be used for running a job', 'event_espresso'),
@@ -152,26 +152,26 @@  discard block
 block discarded – undo
152 152
 	 * @return JobStepResponse
153 153
 	 * @throws BatchRequestException
154 154
 	 */
155
-	public function cleanup_job( $job_id ) {
156
-		try{
155
+	public function cleanup_job($job_id) {
156
+		try {
157 157
 			$this->_job_id = $job_id;
158
-			$job_parameters = JobParameters::load( $this->_job_id );
159
-			$handler_obj = $this->instantiate_batch_job_handler_from_classname( $job_parameters->classname() );
158
+			$job_parameters = JobParameters::load($this->_job_id);
159
+			$handler_obj = $this->instantiate_batch_job_handler_from_classname($job_parameters->classname());
160 160
 			//continue it
161
-			$response = $handler_obj->cleanup_job( $job_parameters );
162
-			if( ! $response instanceof JobStepResponse ) {
161
+			$response = $handler_obj->cleanup_job($job_parameters);
162
+			if ( ! $response instanceof JobStepResponse) {
163 163
 				throw new BatchRequestException(
164 164
 					sprintf(
165
-						__( 'The class implementing JobHandlerInterface did not return a JobStepResponse when cleanup_job was called with job %1$s. It needs to return one or throw an Exception', 'event_espresso' ),
165
+						__('The class implementing JobHandlerInterface did not return a JobStepResponse when cleanup_job was called with job %1$s. It needs to return one or throw an Exception', 'event_espresso'),
166 166
 						$this->_job_id
167 167
 					)
168 168
 				);
169 169
 			}
170
-			$job_parameters->set_status( JobParameters::status_cleaned_up );
170
+			$job_parameters->set_status(JobParameters::status_cleaned_up);
171 171
 			$job_parameters->delete();
172 172
 			return $response;
173
-		} catch( \Exception $e ) {
174
-			$response = $this->_get_error_response( $e, 'cleanup_job' );
173
+		} catch (\Exception $e) {
174
+			$response = $this->_get_error_response($e, 'cleanup_job');
175 175
 		}
176 176
 		return $response;
177 177
 	}
@@ -184,17 +184,17 @@  discard block
 block discarded – undo
184 184
 	 * @param string $method_name
185 185
 	 * @return JobStepResponse
186 186
 	 */
187
-	protected function _get_error_response( \Exception $exception, $method_name ) {
188
-		if( ! $this->_job_parameters instanceof JobParameters ) {
189
-			$this->_job_parameters = new JobParameters( $this->_job_id, __( '__Unknown__', 'event_espresso' ), array() );
187
+	protected function _get_error_response(\Exception $exception, $method_name) {
188
+		if ( ! $this->_job_parameters instanceof JobParameters) {
189
+			$this->_job_parameters = new JobParameters($this->_job_id, __('__Unknown__', 'event_espresso'), array());
190 190
 		}
191
-		$this->_job_parameters->set_status( JobParameters::status_error );
191
+		$this->_job_parameters->set_status(JobParameters::status_error);
192 192
 		return new JobStepResponse(
193 193
 			$this->_job_parameters,
194 194
 			sprintf(
195 195
 				__('An exception of type %1$s occurred while running %2$s. Its message was %3$s and had trace %4$s', 'event_espresso'),
196
-				get_class( $exception ),
197
-				'BatchRunner::' . $method_name . '()',
196
+				get_class($exception),
197
+				'BatchRunner::'.$method_name.'()',
198 198
 				$exception->getMessage(),
199 199
 				$exception->getTraceAsString()
200 200
 			)
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
  /**
3
- *
4
- * Class BatchRequetProcessor
3
+  *
4
+  * Class BatchRequetProcessor
5 5
   * 
6
- * Responsible for receiving a request to start a job and assign it a job Id.
7
- * Then when subsequent requests come in to continue that job, dispatches
8
- * the request to the appropriate JobHandler, which processes a step of the batch,
9
- * and then returns the job's new status.
10
- * This class is used by controller code, and the controller code is sent HTTP
11
- * requests from the batch_runner.js library
12
- *
13
- * @package         Event Espresso
14
- * @subpackage    batch
15
- * @author				Mike Nelson
16
- * @since		 	   4.8.26
17
- *
18
- */
6
+  * Responsible for receiving a request to start a job and assign it a job Id.
7
+  * Then when subsequent requests come in to continue that job, dispatches
8
+  * the request to the appropriate JobHandler, which processes a step of the batch,
9
+  * and then returns the job's new status.
10
+  * This class is used by controller code, and the controller code is sent HTTP
11
+  * requests from the batch_runner.js library
12
+  *
13
+  * @package         Event Espresso
14
+  * @subpackage    batch
15
+  * @author				Mike Nelson
16
+  * @since		 	   4.8.26
17
+  *
18
+  */
19 19
 namespace EventEspressoBatchRequest;
20 20
 
21 21
 use EventEspressoBatchRequest\JobHandlerBaseClasses\JobHandlerInterface;
Please login to merge, or discard this patch.
core/libraries/batch/Helpers/BatchRequestException.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 namespace EventEspressoBatchRequest\Helpers;
16 16
 if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
17 17
 
18
-class BatchRequestException extends \Exception{
18
+class BatchRequestException extends \Exception {
19 19
 	//so far the same as exception
20 20
 }
21 21
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <?php 
2 2
  /**
3
- *
4
- * Class BatchRequestException
5
- *
6
- * Exception class for whenever we have trouble running start, continuing, or finishing
7
- * a batch job.
8
- *
9
- * @package         Event Espresso
10
- * @subpackage    batch
11
- * @author				Mike Nelson
12
- * @since		 	   4.8.26
13
- *
14
- */
3
+  *
4
+  * Class BatchRequestException
5
+  *
6
+  * Exception class for whenever we have trouble running start, continuing, or finishing
7
+  * a batch job.
8
+  *
9
+  * @package         Event Espresso
10
+  * @subpackage    batch
11
+  * @author				Mike Nelson
12
+  * @since		 	   4.8.26
13
+  *
14
+  */
15 15
 namespace EventEspressoBatchRequest\Helpers;
16 16
 if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
17 17
 
Please login to merge, or discard this patch.
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.