Completed
Branch FET/10766/extract-activation-d... (f6eee0)
by
unknown
41:53 queued 33:53
created
core/Psr4Autoloader.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * Loads the class file for a given class name.
133 133
 	 *
134 134
 	 * @param string $class The fully-qualified class name.
135
-	 * @return mixed The mapped file name on success, or boolean false on
135
+	 * @return string|false The mapped file name on success, or boolean false on
136 136
 	 * failure.
137 137
 	 */
138 138
 	public function loadClass( $class ) {
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 *
166 166
 	 * @param string $prefix The namespace prefix.
167 167
 	 * @param string $relative_class The relative class name.
168
-	 * @return mixed Boolean false if no mapped file can be loaded, or the
168
+	 * @return string|false Boolean false if no mapped file can be loaded, or the
169 169
 	 * name of the mapped file that was loaded.
170 170
 	 */
171 171
 	protected function loadMappedFile( $prefix, $relative_class ) {
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
 	 * @param string $prefix
78 78
 	 * @return array
79 79
 	 */
80
-	public function prefixes( $prefix = '' ) {
81
-		if ( ! empty( $prefix ) ) {
80
+	public function prefixes($prefix = '') {
81
+		if ( ! empty($prefix)) {
82 82
 			// are there any base directories for this namespace prefix?
83
-			return isset( $this->prefixes[ $prefix ] ) ? $this->prefixes[ $prefix ] : array();
83
+			return isset($this->prefixes[$prefix]) ? $this->prefixes[$prefix] : array();
84 84
 		}
85 85
 		return $this->prefixes;
86 86
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @return void
94 94
 	 */
95 95
 	public function register() {
96
-		spl_autoload_register( array( $this, 'loadClass' ) );
96
+		spl_autoload_register(array($this, 'loadClass'));
97 97
 	}
98 98
 
99 99
 
@@ -109,20 +109,20 @@  discard block
 block discarded – undo
109 109
 	 * than last.
110 110
 	 * @return void
111 111
 	 */
112
-	public function addNamespace( $prefix, $base_dir, $prepend = false ) {
112
+	public function addNamespace($prefix, $base_dir, $prepend = false) {
113 113
 		// normalize namespace prefix
114
-		$prefix = trim( $prefix, Psr4Autoloader::NS ) . Psr4Autoloader::NS;
114
+		$prefix = trim($prefix, Psr4Autoloader::NS).Psr4Autoloader::NS;
115 115
 		// normalize the base directory with a trailing separator
116
-		$base_dir = \EEH_File::standardise_and_end_with_directory_separator( $base_dir );
116
+		$base_dir = \EEH_File::standardise_and_end_with_directory_separator($base_dir);
117 117
 		// initialize the namespace prefix array
118
-		if ( isset( $this->prefixes[ $prefix ] ) === false ) {
119
-			$this->prefixes[ $prefix ] = array();
118
+		if (isset($this->prefixes[$prefix]) === false) {
119
+			$this->prefixes[$prefix] = array();
120 120
 		}
121 121
 		// retain the base directory for the namespace prefix
122
-		if ( $prepend ) {
123
-			array_unshift( $this->prefixes[ $prefix ], $base_dir );
122
+		if ($prepend) {
123
+			array_unshift($this->prefixes[$prefix], $base_dir);
124 124
 		} else {
125
-			$this->prefixes[ $prefix ][] = $base_dir;
125
+			$this->prefixes[$prefix][] = $base_dir;
126 126
 		}
127 127
 	}
128 128
 
@@ -135,24 +135,24 @@  discard block
 block discarded – undo
135 135
 	 * @return mixed The mapped file name on success, or boolean false on
136 136
 	 * failure.
137 137
 	 */
138
-	public function loadClass( $class ) {
138
+	public function loadClass($class) {
139 139
 		// the current namespace prefix
140 140
 		$prefix = $class;
141 141
 		// work backwards through the namespace names of the fully-qualified
142 142
 		// class name to find a mapped file name
143
-		while ( false !== $pos = strrpos( $prefix, Psr4Autoloader::NS ) ) {
143
+		while (false !== $pos = strrpos($prefix, Psr4Autoloader::NS)) {
144 144
 			// retain the trailing namespace separator in the prefix
145
-			$prefix = substr( $class, 0, $pos + 1 );
145
+			$prefix = substr($class, 0, $pos + 1);
146 146
 			// the rest is the relative class name
147
-			$relative_class = substr( $class, $pos + 1 );
147
+			$relative_class = substr($class, $pos + 1);
148 148
 			// try to load a mapped file for the prefix and relative class
149
-			$mapped_file = $this->loadMappedFile( $prefix, $relative_class );
150
-			if ( $mapped_file ) {
149
+			$mapped_file = $this->loadMappedFile($prefix, $relative_class);
150
+			if ($mapped_file) {
151 151
 				return $mapped_file;
152 152
 			}
153 153
 			// remove the trailing namespace separator for the next iteration
154 154
 			// of strrpos()
155
-			$prefix = rtrim( $prefix, Psr4Autoloader::NS );
155
+			$prefix = rtrim($prefix, Psr4Autoloader::NS);
156 156
 		}
157 157
 		// never found a mapped file
158 158
 		return false;
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
 	 * @return mixed Boolean false if no mapped file can be loaded, or the
169 169
 	 * name of the mapped file that was loaded.
170 170
 	 */
171
-	protected function loadMappedFile( $prefix, $relative_class ) {
171
+	protected function loadMappedFile($prefix, $relative_class) {
172 172
 		// look through base directories for this namespace prefix
173
-		foreach ( $this->prefixes( $prefix ) as $base_dir ) {
173
+		foreach ($this->prefixes($prefix) as $base_dir) {
174 174
 			// replace the namespace prefix with the base directory,
175 175
 			// replace namespace separators with directory separators
176 176
 			// in the relative class name, append with .php
177 177
 			$file = $base_dir
178
-				. str_replace( Psr4Autoloader::NS, DS, $relative_class )
178
+				. str_replace(Psr4Autoloader::NS, DS, $relative_class)
179 179
 				. '.php';
180 180
 			// if the mapped file exists, require it
181
-			if ( $this->requireFile( $file ) ) {
181
+			if ($this->requireFile($file)) {
182 182
 				// yes, we're done
183 183
 				return $file;
184 184
 			}
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
 	 * @param string $file The file to require.
196 196
 	 * @return bool True if the file exists, false if not.
197 197
 	 */
198
-	protected function requireFile( $file ) {
199
-		if ( file_exists( $file ) ) {
198
+	protected function requireFile($file) {
199
+		if (file_exists($file)) {
200 200
 			require $file;
201 201
 			return true;
202 202
 		}
Please login to merge, or discard this patch.
core/services/locators/LocatorInterface.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\locators;
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
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @param array|string $location
23 23
 	 * @return \FilesystemIterator
24 24
 	 */
25
-	public function locate( $location );
25
+	public function locate($location);
26 26
 
27 27
 }
28 28
 // End of file LocatorInterface.php
Please login to merge, or discard this patch.
strategies/display/EE_Compound_Input_Display_Strategy.strategy.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
 	 * @param bool   $add_pound_sign
28 28
 	 * @return string
29 29
 	 */
30
-	public function get_sub_input_id( $option_value, $add_pound_sign = false ) {
31
-		return $this->_append_chars( $this->_input->html_id( $add_pound_sign ), '-' ) . sanitize_key( $option_value );
30
+	public function get_sub_input_id($option_value, $add_pound_sign = false) {
31
+		return $this->_append_chars($this->_input->html_id($add_pound_sign), '-').sanitize_key($option_value);
32 32
 	}
33 33
 
34 34
 
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * @return array
41 41
 	 * @throws \EE_Error
42 42
 	 */
43
-	public function get_html_input_ids( $add_pound_sign = false ) {
43
+	public function get_html_input_ids($add_pound_sign = false) {
44 44
 		$html_input_ids = array();
45
-		foreach( $this->get_input()->options() as $value => $display ) {
46
-			$html_input_ids[] = $this->get_sub_input_id( $value, $add_pound_sign );
45
+		foreach ($this->get_input()->options() as $value => $display) {
46
+			$html_input_ids[] = $this->get_sub_input_id($value, $add_pound_sign);
47 47
 		}
48 48
 		return $html_input_ids;
49 49
 	}
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 * @throws \EE_Error
59 59
 	 */
60 60
 	public function get_input() {
61
-		if ( ! $this->_input instanceof EE_Form_Input_With_Options_Base ){
61
+		if ( ! $this->_input instanceof EE_Form_Input_With_Options_Base) {
62 62
 			throw new EE_Error(
63 63
 				sprintf(
64 64
 					__(
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_To_Generate_From_Queue.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 	 * @param EE_Messages_Queue $queue
26 26
 	 * @param string            $custom_subject  Used if a custom subject is desired for the generated aggregate EE_Message object
27 27
 	 */
28
-	public function __construct( $messenger_name, $message_type_name, EE_Messages_Queue $queue, $custom_subject = '' ) {
28
+	public function __construct($messenger_name, $message_type_name, EE_Messages_Queue $queue, $custom_subject = '') {
29 29
 		$this->queue = $queue;
30
-		parent::__construct( $messenger_name, $message_type_name, array(), '', false, EEM_Message::status_idle );
31
-		if ( $this->valid() ) {
32
-			$this->_message->set_content( $this->_get_content() );
33
-			$this->_message->set_subject( $this->_get_subject( $custom_subject ) );
30
+		parent::__construct($messenger_name, $message_type_name, array(), '', false, EEM_Message::status_idle);
31
+		if ($this->valid()) {
32
+			$this->_message->set_content($this->_get_content());
33
+			$this->_message->set_subject($this->_get_subject($custom_subject));
34 34
 		}
35 35
 	}
36 36
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	protected function _get_content() {
45 45
 		$content = '';
46 46
 		$this->queue->get_message_repository()->rewind();
47
-		while ( $this->queue->get_message_repository()->valid() ) {
47
+		while ($this->queue->get_message_repository()->valid()) {
48 48
 			$content .= $this->queue->get_message_repository()->current()->content();
49 49
 			$this->queue->get_message_repository()->next();
50 50
 		}
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
 	 *
59 59
 	 * @return string
60 60
 	 */
61
-	protected function _get_subject( $custom_subject = '' ) {
62
-		if ( ! empty( $custom_subject ) ) {
61
+	protected function _get_subject($custom_subject = '') {
62
+		if ( ! empty($custom_subject)) {
63 63
 			return $custom_subject;
64 64
 		}
65 65
 		$this->queue->get_message_repository()->rewind();
66 66
 		$count_of_items = $this->queue->get_message_repository()->count();
67 67
 
68 68
 		//if $count of items in queue == 1, then let's just return the subject for that item.
69
-		if ( $count_of_items === 1 ) {
69
+		if ($count_of_items === 1) {
70 70
 			return $this->queue->get_message_repository()->current()->subject();
71 71
 		}
72 72
 
Please login to merge, or discard this patch.
display_strategies/number_bubbles/number_bubbles.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * This is the template for the "Number Bubbles" Progress Steps
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 <!-- progress step display -->
15 15
 <div class="ee-progress-step-main-container">
16 16
 	<div class="progress-step-container number-bubbles-container">
17
-		<?php foreach ( $progress_steps as $progress_step ) : ?>
18
-		<div data-step-nmbr="<?php echo $progress_step->order();?>" id="progress-step-<?php echo $progress_step->id(); ?>" class="progress-step-number <?php echo $progress_step->htmlClass(); ?>">
17
+		<?php foreach ($progress_steps as $progress_step) : ?>
18
+		<div data-step-nmbr="<?php echo $progress_step->order(); ?>" id="progress-step-<?php echo $progress_step->id(); ?>" class="progress-step-number <?php echo $progress_step->htmlClass(); ?>">
19 19
 			<div class="progress-step-line"></div>
20 20
 			<div class="progress-step-bubble"><p><?php echo $progress_step->order(); ?></p></div>
21 21
 			<span class="progress-step-text"><?php echo $progress_step->text(); ?></span>
22 22
 		</div>
23
-		<?php endforeach;?>
23
+		<?php endforeach; ?>
24 24
 	</div>
25 25
 </div>
26 26
 
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Hidden_Input.input.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Hidden_Input extends EE_Form_Input_Base{
9
+class EE_Hidden_Input extends EE_Form_Input_Base {
10 10
 
11 11
 	/**
12 12
 	 * @param array $input_settings
13 13
 	 */
14
-	public function __construct($input_settings = array()){
14
+	public function __construct($input_settings = array()) {
15 15
 		//require_once('strategies/display_strategies/EE_Text_Input_Display_Strategy.strategy.php');
16 16
 		$this->_set_display_strategy(new EE_Hidden_Display_Strategy());
17
-		if ( isset( $input_settings['normalization_strategy'] ) && $input_settings['normalization_strategy'] instanceof EE_Normalization_Strategy_Base ) {
18
-			$this->_set_normalization_strategy( $input_settings['normalization_strategy'] );
17
+		if (isset($input_settings['normalization_strategy']) && $input_settings['normalization_strategy'] instanceof EE_Normalization_Strategy_Base) {
18
+			$this->_set_normalization_strategy($input_settings['normalization_strategy']);
19 19
 		} else {
20
-			$this->_set_normalization_strategy( new EE_Text_Normalization() );
20
+			$this->_set_normalization_strategy(new EE_Text_Normalization());
21 21
 		}
22
-		parent::__construct( $input_settings );
22
+		parent::__construct($input_settings);
23 23
 	}
24 24
 
25 25
 
Please login to merge, or discard this patch.
caffeinated/payment_methods/Aim/EE_PMT_Aim.pm.php 2 patches
Spacing   +50 added lines, -50 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
 /**
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @subpackage
12 12
  * @author				Mike Nelson
13 13
  */
14
-class EE_PMT_Aim extends EE_PMT_Base{
14
+class EE_PMT_Aim extends EE_PMT_Base {
15 15
 
16 16
 
17 17
 	/**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		require_once($this->file_folder().'EEG_Aim.gateway.php');
35 35
 		$this->_gateway = new EEG_Aim();
36 36
 		$this->_pretty_name = __("Authorize.net AIM", 'event_espresso');
37
-		$this->_default_description = __( 'Please provide the following billing information.', 'event_espresso' );
37
+		$this->_default_description = __('Please provide the following billing information.', 'event_espresso');
38 38
 		$this->_requires_https = true;
39 39
 	}
40 40
 
@@ -47,61 +47,61 @@  discard block
 block discarded – undo
47 47
 	 * @return EE_Billing_Info_Form
48 48
 	 * @throws \EE_Error
49 49
 	 */
50
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
51
-		$billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance,array(
50
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
51
+		$billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array(
52 52
 			'name'=>'AIM_Form',
53 53
 			'subsections'=>array(
54 54
 				'credit_card'=>new EE_Credit_Card_Input(array(
55 55
 					'required'=>true,
56
-					'html_label_text' => __( 'Card Number', 'event_espresso' )
56
+					'html_label_text' => __('Card Number', 'event_espresso')
57 57
 				)),
58 58
 				'exp_month'=>new EE_Credit_Card_Month_Input(true, array(
59 59
 					'required'=>true,
60
-					'html_label_text' => __( 'Expiry Month', 'event_espresso' )
60
+					'html_label_text' => __('Expiry Month', 'event_espresso')
61 61
 				)),
62
-				'exp_year'=>new EE_Credit_Card_Year_Input( array( 
62
+				'exp_year'=>new EE_Credit_Card_Year_Input(array( 
63 63
 					'required'=>true,
64
-					'html_label_text' => __( 'Expiry Year', 'event_espresso' ) 
64
+					'html_label_text' => __('Expiry Year', 'event_espresso') 
65 65
 				)),
66
-				'cvv'=>new EE_CVV_Input( array(
66
+				'cvv'=>new EE_CVV_Input(array(
67 67
 					'required'=>true,
68
-					'html_label_text' => __( 'CVV', 'event_espresso' ) ) ),
68
+					'html_label_text' => __('CVV', 'event_espresso') )),
69 69
 			)
70 70
 		));
71
-		$billing_form->add_subsections( array(
72
-			'company' => new EE_Text_Input( array(
71
+		$billing_form->add_subsections(array(
72
+			'company' => new EE_Text_Input(array(
73 73
 				'html_label_text' => __('Company', 'event_espresso')
74 74
 			))
75
-		), 'email', false );
75
+		), 'email', false);
76 76
 		$billing_form->add_subsections( 
77 77
 				array(
78
-					'fax' => new EE_Text_Input( array(
78
+					'fax' => new EE_Text_Input(array(
79 79
 						'html_label_text' => __('Fax', 'event_espresso')
80 80
 					))
81 81
 				), 
82 82
 				'phone', 
83 83
 				false );
84 84
 		$settings_form = $this->settings_form();
85
-		if( $settings_form->get_input( 'excluded_billing_inputs' ) instanceof EE_Checkbox_Multi_Input ) {
86
-				$billing_form->exclude( $settings_form->get_input( 'excluded_billing_inputs' )->normalized_value() );
85
+		if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
86
+				$billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value());
87 87
 		}
88
-		if( $settings_form->get_input( 'required_billing_inputs' ) instanceof EE_Checkbox_Multi_Input ) {
89
-			$required_inputs = $settings_form->get_input( 'required_billing_inputs' )->normalized_value();
88
+		if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
89
+			$required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value();
90 90
 			//only change the requirement of inputs which are allowed to be changed
91 91
 			/** @var EE_Form_Input_Base[] $inputs_to_evaluate */
92 92
 			$inputs_to_evaluate = array_intersect_key( 
93 93
 				$billing_form->inputs(), 
94 94
 				$this->billing_input_names()
95 95
 			);
96
-			foreach( $inputs_to_evaluate as $input_name => $input ) {
97
-				if( in_array( $input_name, $required_inputs ) ) {
98
-					$input->set_required( true );
96
+			foreach ($inputs_to_evaluate as $input_name => $input) {
97
+				if (in_array($input_name, $required_inputs)) {
98
+					$input->set_required(true);
99 99
 				} else {
100
-					$input->set_required( false );
100
+					$input->set_required(false);
101 101
 				}
102 102
 			}
103 103
 		}
104
-		return $this->apply_billing_form_debug_settings( $billing_form );
104
+		return $this->apply_billing_form_debug_settings($billing_form);
105 105
 	}
106 106
 
107 107
 
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 	 * @return \EE_Billing_Info_Form
115 115
 	 * @throws \EE_Error
116 116
 	 */
117
-	public function apply_billing_form_debug_settings( EE_Billing_Info_Form $billing_form ) {
117
+	public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) {
118 118
 		if (
119 119
 			$this->_pm_instance->debug_mode() 
120
-			|| $this->_pm_instance->get_extra_meta( 'test_transactions', TRUE, FALSE )
120
+			|| $this->_pm_instance->get_extra_meta('test_transactions', TRUE, FALSE)
121 121
 		) {
122
-			$billing_form->get_input( 'credit_card' )->set_default( '4007000000027' );
123
-			$billing_form->get_input( 'exp_year' )->set_default( '2020' );
124
-			if( $billing_form->get_subsection( 'cvv' ) instanceof EE_Form_Input_Base ) {
125
-				$billing_form->get_input( 'cvv' )->set_default( '123' );
122
+			$billing_form->get_input('credit_card')->set_default('4007000000027');
123
+			$billing_form->get_input('exp_year')->set_default('2020');
124
+			if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) {
125
+				$billing_form->get_input('cvv')->set_default('123');
126 126
 			}
127 127
 			$billing_form->add_subsections(
128
-				array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
128
+				array('fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html()),
129 129
 				'credit_card'
130 130
 			);
131 131
 			$billing_form->add_subsections(
@@ -153,17 +153,17 @@  discard block
 block discarded – undo
153 153
 				'extra_meta_inputs'=>array(
154 154
 					'login_id'=>new EE_Text_Input(
155 155
 						array(
156
-							'html_label_text'=>  sprintf( __("Authorize.net API Login ID %s", "event_espresso"),  $this->get_help_tab_link() ),
156
+							'html_label_text'=>  sprintf(__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()),
157 157
 							'required' => true )
158 158
 					),
159 159
 					'transaction_key'=>new EE_Text_Input(
160 160
 						array(
161
-							'html_label_text'=> sprintf( __("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link() ),
161
+							'html_label_text'=> sprintf(__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()),
162 162
 							'required' => true )
163 163
 					),
164 164
 					'test_transactions'=>new EE_Yes_No_Input(
165 165
 						array(
166
-							'html_label_text'=>  sprintf( __("Send test transactions? %s", 'event_espresso'),  $this->get_help_tab_link() ),
166
+							'html_label_text'=>  sprintf(__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()),
167 167
 							'html_help_text'=>  __("Send test transactions, even to live server", 'event_espresso'),
168 168
 							'default' => false,
169 169
 							'required' => true
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 					'excluded_billing_inputs' => new EE_Checkbox_Multi_Input( 
173 173
 							$billing_input_names,
174 174
 					array( 
175
-						'html_label_text' => sprintf( __("Excluded Payment Form Fields %s", 'event_espresso'),  $this->get_help_tab_link() ),
175
+						'html_label_text' => sprintf(__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
176 176
 						'default' => array(
177 177
 							'company',
178 178
 							'fax',
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 					'required_billing_inputs' => new EE_Checkbox_Multi_Input( 
182 182
 						$billing_input_names,
183 183
 						array(
184
-							'html_label_text' => sprintf( __("Required Payment Form Fields %s", 'event_espresso'),  $this->get_help_tab_link() ),
184
+							'html_label_text' => sprintf(__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
185 185
 							'default' => array_diff(
186
-										array_keys( $billing_input_names ),
187
-										array( 'address2', 'phone', 'company', 'fax' )
186
+										array_keys($billing_input_names),
187
+										array('address2', 'phone', 'company', 'fax')
188 188
 							),
189 189
 							'html_help_text' => __('Note: if fields are excluded they cannot be required.', 'event_espresso')
190 190
 						)
@@ -193,14 +193,14 @@  discard block
 block discarded – undo
193 193
 						apply_filters(
194 194
 							'FHEE__EE_PMT_Aim__generate_new_settings_form__server_select_input__options',
195 195
 							array(
196
-								'akamai' => __( 'Authorize.net/Akamai (default)', 'event_espresso' ),
197
-								'authorize.net' => __( 'Authorize.net (deprecated)', 'event_espresso' ),
196
+								'akamai' => __('Authorize.net/Akamai (default)', 'event_espresso'),
197
+								'authorize.net' => __('Authorize.net (deprecated)', 'event_espresso'),
198 198
 							),
199 199
 							$this
200 200
 						),
201 201
 						array(
202
-							'html_label_text' => __( 'Server', 'event_espresso' ),
203
-							'html_help_text' => __( 'The Gateway Server where payment requests will be sent', 'event_espresso' )
202
+							'html_label_text' => __('Server', 'event_espresso'),
203
+							'html_help_text' => __('The Gateway Server where payment requests will be sent', 'event_espresso')
204 204
 						)
205 205
 					)
206 206
 						
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	public function billing_input_names() {
218 218
 		return array(
219
-			'first_name' => __( 'First Name', 'event_espresso' ),
219
+			'first_name' => __('First Name', 'event_espresso'),
220 220
 			'last_name' => __('Last Name', 'event_espresso'),
221
-			'email' => __( 'Email', 'event_espresso' ),
222
-			'company' => __( 'Company', 'event_espresso' ),
221
+			'email' => __('Email', 'event_espresso'),
222
+			'company' => __('Company', 'event_espresso'),
223 223
 			'address' => __('Address', 'event_espresso'),
224 224
 			'address2' => __('Address2', 'event_espresso'),
225 225
 			'city' => __('City', 'event_espresso'),
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 			'country' => __('Country', 'event_espresso'),
228 228
 			'zip' =>  __('Zip', 'event_espresso'),
229 229
 			'phone' => __('Phone', 'event_espresso'),
230
-			'fax' => __( 'Fax', 'event_espresso' ),
230
+			'fax' => __('Fax', 'event_espresso'),
231 231
 			'cvv' => __('CVV', 'event_espresso')
232 232
 		);
233 233
 	}
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
 	 * @param EE_Billing_Info_Form $billing_form
240 240
 	 * @return array
241 241
 	 */
242
-	protected function _get_billing_values_from_form( $billing_form ){
242
+	protected function _get_billing_values_from_form($billing_form) {
243 243
 		$all_billing_values_empty = array();
244
-		foreach( array_keys( $this->billing_input_names() ) as $input_name ) {
245
-			$all_billing_values_empty[ $input_name ] = '';
244
+		foreach (array_keys($this->billing_input_names()) as $input_name) {
245
+			$all_billing_values_empty[$input_name] = '';
246 246
 		}
247 247
 		return array_merge(
248 248
 				$all_billing_values_empty,
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @see EE_PMT_Base::help_tabs_config()
258 258
 	 * @return array
259 259
 	 */
260
-	public function help_tabs_config(){
260
+	public function help_tabs_config() {
261 261
 		return array(
262 262
 			$this->get_help_tab_name() => array(
263 263
 				'title' => __('Authorize.net AIM Settings', 'event_espresso'),
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	public function __construct($pm_instance = NULL) {
23 23
 		$this->_setup_properties();
24 24
 		parent::__construct($pm_instance);
25
-        $this->_gateway->set_unsupported_character_remover(new \EventEspresso\core\services\formatters\Windows1252());
25
+		$this->_gateway->set_unsupported_character_remover(new \EventEspresso\core\services\formatters\Windows1252());
26 26
 	}
27 27
 	
28 28
 	/**
Please login to merge, or discard this patch.
core/services/progress_steps/ProgressStepManager.php 2 patches
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 use EventEspresso\core\services\collections\CollectionInterface;
11 11
 use EventEspresso\core\services\progress_steps\display_strategies\ProgressStepsDisplayInterface;
12 12
 
13
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
14
-	exit( 'No direct script access allowed' );
13
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
14
+	exit('No direct script access allowed');
15 15
 }
16 16
 
17 17
 
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
 		CollectionInterface $collection = null,
79 79
 		EE_Request $request = null
80 80
 	) {
81
-		$this->setDisplayStrategy( $display_strategy_name );
82
-		$this->setDefaultStep( $default_step );
83
-		$this->setFormStepUrlKey( $form_step_url_key );
84
-		if ( ! $collection instanceof CollectionInterface ) {
85
-			$collection = new Collection( '\EventEspresso\core\services\progress_steps\ProgressStepInterface' );
81
+		$this->setDisplayStrategy($display_strategy_name);
82
+		$this->setDefaultStep($default_step);
83
+		$this->setFormStepUrlKey($form_step_url_key);
84
+		if ( ! $collection instanceof CollectionInterface) {
85
+			$collection = new Collection('\EventEspresso\core\services\progress_steps\ProgressStepInterface');
86 86
 		}
87 87
 		$this->collection = $collection;
88
-		if ( ! $request instanceof EE_Request ) {
89
-			$request = \EE_Registry::instance()->load_core( 'Request' );
88
+		if ( ! $request instanceof EE_Request) {
89
+			$request = \EE_Registry::instance()->load_core('Request');
90 90
 		}
91 91
 		$this->request = $request;
92 92
 	}
@@ -98,28 +98,28 @@  discard block
 block discarded – undo
98 98
 	 * @throws InvalidDataTypeException
99 99
 	 * @throws InvalidClassException
100 100
 	 */
101
-	protected function setDisplayStrategy( $display_strategy_name = 'number_bubbles' ) {
102
-		if ( ! is_string( $display_strategy_name ) ) {
103
-			throw new InvalidDataTypeException( '$display_strategy_name', $display_strategy_name, 'string' );
101
+	protected function setDisplayStrategy($display_strategy_name = 'number_bubbles') {
102
+		if ( ! is_string($display_strategy_name)) {
103
+			throw new InvalidDataTypeException('$display_strategy_name', $display_strategy_name, 'string');
104 104
 		}
105 105
 		// build up FQCN from incoming display strategy folder name
106 106
 		$display_strategy_class = 'EventEspresso\core\services\progress_steps\display_strategies\\';
107
-		$display_strategy_class .= $display_strategy_name . '\\';
108
-		$display_strategy_class .= str_replace( ' ', '', ucwords( str_replace( '_', ' ', $display_strategy_name ) ) );
107
+		$display_strategy_class .= $display_strategy_name.'\\';
108
+		$display_strategy_class .= str_replace(' ', '', ucwords(str_replace('_', ' ', $display_strategy_name)));
109 109
 		$display_strategy_class .= 'ProgressStepsDisplay';
110 110
 		$display_strategy_class = apply_filters(
111 111
 			'FHEE__ProgressStepManager__setDisplayStrategy__display_strategy_class',
112 112
 			$display_strategy_class
113 113
 		);
114
-		if ( ! class_exists( $display_strategy_class ) ) {
115
-			throw new InvalidClassException( $display_strategy_class );
114
+		if ( ! class_exists($display_strategy_class)) {
115
+			throw new InvalidClassException($display_strategy_class);
116 116
 		}
117 117
 		$display_strategy = new $display_strategy_class();
118
-		if ( ! $display_strategy instanceof ProgressStepsDisplayInterface ) {
118
+		if ( ! $display_strategy instanceof ProgressStepsDisplayInterface) {
119 119
 			throw new InvalidClassException(
120 120
 				$display_strategy_class,
121 121
 				sprintf(
122
-					__( 'The "%1$s" Class needs to be an implementation of the "%1$s" Interface.', 'event_espresso' ),
122
+					__('The "%1$s" Class needs to be an implementation of the "%1$s" Interface.', 'event_espresso'),
123 123
 					$display_strategy_class,
124 124
 					'\EventEspresso\core\services\progress_steps\display_strategies\ProgressStepsDisplayInterface'
125 125
 				)
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 	 * @param string $default_step
135 135
 	 * @throws InvalidDataTypeException
136 136
 	 */
137
-	public function setDefaultStep( $default_step ) {
138
-		if ( ! is_string( $default_step ) ) {
139
-			throw new InvalidDataTypeException( '$default_step', $default_step, 'string' );
137
+	public function setDefaultStep($default_step) {
138
+		if ( ! is_string($default_step)) {
139
+			throw new InvalidDataTypeException('$default_step', $default_step, 'string');
140 140
 		}
141 141
 		$this->default_step = $default_step;
142 142
 	}
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 	 * @param string $form_step_url_key
148 148
 	 * @throws InvalidDataTypeException
149 149
 	 */
150
-	public function setFormStepUrlKey( $form_step_url_key = 'ee-form-step' ) {
151
-		if ( ! is_string( $form_step_url_key ) ) {
152
-			throw new InvalidDataTypeException( '$form_step_key', $form_step_url_key, 'string' );
150
+	public function setFormStepUrlKey($form_step_url_key = 'ee-form-step') {
151
+		if ( ! is_string($form_step_url_key)) {
152
+			throw new InvalidDataTypeException('$form_step_key', $form_step_url_key, 'string');
153 153
 		}
154
-		$this->form_step_url_key = ! empty( $form_step_url_key ) ? $form_step_url_key : 'ee-form-step';
154
+		$this->form_step_url_key = ! empty($form_step_url_key) ? $form_step_url_key : 'ee-form-step';
155 155
 	}
156 156
 
157 157
 
@@ -160,26 +160,26 @@  discard block
 block discarded – undo
160 160
 	 * @param string $step
161 161
 	 * @throws InvalidIdentifierException
162 162
 	 */
163
-	public function setCurrentStep( $step = '' ) {
163
+	public function setCurrentStep($step = '') {
164 164
 		// use incoming value if it's set, otherwise use request param if it's set, otherwise use default
165
-		$step = ! empty( $step )
165
+		$step = ! empty($step)
166 166
 			? $step
167
-			: $this->request->get( $this->form_step_url_key, $this->default_step );
167
+			: $this->request->get($this->form_step_url_key, $this->default_step);
168 168
 		// grab the step previously known as current, in case we need to revert
169 169
 		$current_current_step = $this->collection->current();
170 170
 		// verify that requested step exists
171
-		if ( ! $this->collection->has( $step ) ) {
172
-			throw new InvalidIdentifierException( $step, $this->default_step );
171
+		if ( ! $this->collection->has($step)) {
172
+			throw new InvalidIdentifierException($step, $this->default_step);
173 173
 		}
174
-		if ( $this->collection->setCurrent( $step ) ) {
174
+		if ($this->collection->setCurrent($step)) {
175 175
 			// if the old boss is the same as the new boss, then nothing changes
176
-			if ( $this->collection->current() !== $current_current_step ) {
177
-				$current_current_step->setIsCurrent( false );
176
+			if ($this->collection->current() !== $current_current_step) {
177
+				$current_current_step->setIsCurrent(false);
178 178
 			}
179 179
 			$this->collection->current()->setIsCurrent();
180 180
 		} else {
181
-			$this->collection->setCurrent( $current_current_step->id() );
182
-			$current_current_step->setIsCurrent( true );
181
+			$this->collection->setCurrent($current_current_step->id());
182
+			$current_current_step->setIsCurrent(true);
183 183
 		}
184 184
 	}
185 185
 
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
 	public function setPreviousStepsCompleted() {
192 192
 		$current_current_step = $this->collection->current();
193 193
 		$this->collection->rewind();
194
-		while ( $this->collection->valid() ) {
195
-			if ( $this->collection->current() === $current_current_step ) {
194
+		while ($this->collection->valid()) {
195
+			if ($this->collection->current() === $current_current_step) {
196 196
 				break;
197 197
 			}
198 198
 			$this->setCurrentStepCompleted();
199 199
 			$this->collection->next();
200 200
 		}
201
-		$this->collection->setCurrentUsingObject( $current_current_step );
201
+		$this->collection->setCurrentUsingObject($current_current_step);
202 202
 		return false;
203 203
 	}
204 204
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 	public function displaySteps() {
240 240
 		return \EEH_Template::display_template(
241 241
 			$this->display_strategy->getTemplate(),
242
-			array( 'progress_steps' => $this->collection ),
242
+			array('progress_steps' => $this->collection),
243 243
 			true
244 244
 		);
245 245
 	}
@@ -250,8 +250,8 @@  discard block
 block discarded – undo
250 250
 	 * @param bool $completed
251 251
 	 * @return \EventEspresso\core\services\progress_steps\ProgressStepInterface
252 252
 	 */
253
-	public function setCurrentStepCompleted( $completed = true ) {
254
-		return $this->collection->current()->setIsCompleted( $completed );
253
+	public function setCurrentStepCompleted($completed = true) {
254
+		return $this->collection->current()->setIsCompleted($completed);
255 255
 	}
256 256
 
257 257
 
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 namespace EventEspresso\core\services\progress_steps;
3 3
 
4 4
 use EE_Request;
5
-use  EventEspresso\core\exceptions\InvalidClassException;
6
-use  EventEspresso\core\exceptions\InvalidDataTypeException;
7
-use  EventEspresso\core\exceptions\InvalidIdentifierException;
8
-use  EventEspresso\core\exceptions\InvalidInterfaceException;
5
+use EventEspresso\core\exceptions\InvalidClassException;
6
+use EventEspresso\core\exceptions\InvalidDataTypeException;
7
+use EventEspresso\core\exceptions\InvalidIdentifierException;
8
+use EventEspresso\core\exceptions\InvalidInterfaceException;
9 9
 use EventEspresso\core\services\collections\Collection;
10 10
 use EventEspresso\core\services\collections\CollectionInterface;
11 11
 use EventEspresso\core\services\progress_steps\display_strategies\ProgressStepsDisplayInterface;
Please login to merge, or discard this patch.
display_strategies/number_bubbles/NumberBubblesProgressStepsDisplay.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\services\progress_steps\display_strategies\ProgressStepsDisplayInterface;
5 5
 
6
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
7
-	exit( 'No direct script access allowed' );
6
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
7
+	exit('No direct script access allowed');
8 8
 }
9 9
 
10 10
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		// core/services/progress_steps/display_strategies/number_bubbles/number_bubbles.css
30 30
 		wp_enqueue_style(
31 31
 			'ee_progress_steps_display_number_bubbles',
32
-			plugin_dir_url( __FILE__ ) . 'number_bubbles.css'
32
+			plugin_dir_url(__FILE__).'number_bubbles.css'
33 33
 		);
34 34
 	}
35 35
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public function getTemplate() {
44 44
 		// return plugin_dir_path( __FILE__ ) . 'number_bubbles.template.php';
45
-		return __DIR__ . DS .'number_bubbles.template.php';
45
+		return __DIR__.DS.'number_bubbles.template.php';
46 46
 	}
47 47
 
48 48
 }
Please login to merge, or discard this patch.