@@ -1,6 +1,6 @@ discard block |
||
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 | |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | * @param array $arguments |
36 | 36 | * @return \EE_CPT_Default_Strategy |
37 | 37 | */ |
38 | - public function __construct( $arguments = array() ) { |
|
39 | - $this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : null; |
|
38 | + public function __construct($arguments = array()) { |
|
39 | + $this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : null; |
|
40 | 40 | // $WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : null; |
41 | 41 | //EEH_Debug_Tools::printr( $this->CPT, '$this->CPT <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
42 | 42 | // add_filter( 'pre_get_posts', array( $this, 'pre_get_posts' ), 999 ); |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | * @param \WP_Query $WP_Query |
53 | 53 | * @return \WP_Query |
54 | 54 | */ |
55 | - public function pre_get_posts( WP_Query $WP_Query ) { |
|
55 | + public function pre_get_posts(WP_Query $WP_Query) { |
|
56 | 56 | //EEH_Debug_Tools::printr( $WP_Query, '$WP_Query <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); |
57 | - if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive() ) { |
|
57 | + if ( ! $WP_Query->is_main_query() && ! $WP_Query->is_archive()) { |
|
58 | 58 | return $WP_Query; |
59 | 59 | } |
60 | 60 | // $WP_Query->set( 'post_type', array( $this->CPT['post_type'] )); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * @param \WP_Query $WP_Query |
73 | 73 | * @return \WP_Post[] |
74 | 74 | */ |
75 | - public function the_posts( $posts, WP_Query $WP_Query ) { |
|
75 | + public function the_posts($posts, WP_Query $WP_Query) { |
|
76 | 76 | return $posts; |
77 | 77 | } |
78 | 78 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @param string $single |
89 | 89 | * @return mixed |
90 | 90 | */ |
91 | - public function get_EE_post_type_metadata( $meta_value = null, $post_id, $meta_key, $single ) { |
|
91 | + public function get_EE_post_type_metadata($meta_value = null, $post_id, $meta_key, $single) { |
|
92 | 92 | return $meta_value; |
93 | 93 | } |
94 | 94 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' )) { exit( 'No direct script access allowed' ); } |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); } |
|
2 | 2 | /** |
3 | 3 | * Class EE_Select_Reveal_Input |
4 | 4 | * |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @since 4.6 |
12 | 12 | * |
13 | 13 | */ |
14 | -class EE_Select_Reveal_Input extends EE_Select_Input{ |
|
14 | +class EE_Select_Reveal_Input extends EE_Select_Input { |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @param array $answer_options Array keys which match a sibling section's name |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param array $input_settings |
28 | 28 | */ |
29 | - public function __construct( $answer_options, $input_settings = array() ){ |
|
30 | - parent::__construct( $answer_options, $input_settings ); |
|
29 | + public function __construct($answer_options, $input_settings = array()) { |
|
30 | + parent::__construct($answer_options, $input_settings); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -36,17 +36,17 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function sibling_sections_controlled() { |
38 | 38 | $sibling_sections = array(); |
39 | - foreach( $this->options() as $sibling_section_name => $sibling_section ) { |
|
39 | + foreach ($this->options() as $sibling_section_name => $sibling_section) { |
|
40 | 40 | //if it's an empty string just leave it alone |
41 | - if( empty( $sibling_section_name ) ) { |
|
41 | + if (empty($sibling_section_name)) { |
|
42 | 42 | continue; |
43 | 43 | } |
44 | - $sibling_section = $this->find_section_from_path( '../' . $sibling_section_name ); |
|
45 | - if( |
|
44 | + $sibling_section = $this->find_section_from_path('../'.$sibling_section_name); |
|
45 | + if ( |
|
46 | 46 | $sibling_section instanceof EE_Form_Section_Base |
47 | - && ! empty( $sibling_section_name ) |
|
47 | + && ! empty($sibling_section_name) |
|
48 | 48 | ) { |
49 | - $sibling_sections[ $sibling_section_name ] = $sibling_section; |
|
49 | + $sibling_sections[$sibling_section_name] = $sibling_section; |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | return $sibling_sections; |
@@ -59,16 +59,16 @@ discard block |
||
59 | 59 | * @param array $form_other_js_data |
60 | 60 | * @return array |
61 | 61 | */ |
62 | - public function get_other_js_data( $form_other_js_data = array() ) { |
|
63 | - $form_other_js_data = parent::get_other_js_data( $form_other_js_data ); |
|
64 | - if( ! isset($form_other_js_data[ 'select_reveal_inputs' ] ) ) { |
|
65 | - $form_other_js_data[ 'select_reveal_inputs' ] = array(); |
|
62 | + public function get_other_js_data($form_other_js_data = array()) { |
|
63 | + $form_other_js_data = parent::get_other_js_data($form_other_js_data); |
|
64 | + if ( ! isset($form_other_js_data['select_reveal_inputs'])) { |
|
65 | + $form_other_js_data['select_reveal_inputs'] = array(); |
|
66 | 66 | } |
67 | 67 | $sibling_input_to_html_id_map = array(); |
68 | - foreach( $this->sibling_sections_controlled() as $sibling_section_path => $sibling_section ) { |
|
69 | - $sibling_input_to_html_id_map[ $sibling_section_path ] = $sibling_section->html_id(); |
|
68 | + foreach ($this->sibling_sections_controlled() as $sibling_section_path => $sibling_section) { |
|
69 | + $sibling_input_to_html_id_map[$sibling_section_path] = $sibling_section->html_id(); |
|
70 | 70 | } |
71 | - $form_other_js_data[ 'select_reveal_inputs' ][ $this->html_id() ] = $sibling_input_to_html_id_map; |
|
71 | + $form_other_js_data['select_reveal_inputs'][$this->html_id()] = $sibling_input_to_html_id_map; |
|
72 | 72 | return $form_other_js_data; |
73 | 73 | } |
74 | 74 |
@@ -84,6 +84,7 @@ |
||
84 | 84 | * |
85 | 85 | * @access public |
86 | 86 | * @param mixed |
87 | + * @param string $info |
|
87 | 88 | * @return null | object |
88 | 89 | */ |
89 | 90 | public function get_by_info( $info ) { |
@@ -1,5 +1,5 @@ discard block |
||
1 | -<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
2 | - exit( 'No direct script access allowed' ); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | 3 | } |
4 | 4 | /** |
5 | 5 | * Class EE_Object_Collection |
@@ -37,14 +37,14 @@ discard block |
||
37 | 37 | * @param mixed $info |
38 | 38 | * @return bool |
39 | 39 | */ |
40 | - public function add( $object, $info = null ) { |
|
40 | + public function add($object, $info = null) { |
|
41 | 41 | $class = $this->interface; |
42 | - if ( ! $object instanceof $class ) { |
|
42 | + if ( ! $object instanceof $class) { |
|
43 | 43 | return false; |
44 | 44 | } |
45 | - $this->attach( $object ); |
|
46 | - $this->set_info( $object, $info ); |
|
47 | - return $this->contains( $object ); |
|
45 | + $this->attach($object); |
|
46 | + $this->set_info($object, $info); |
|
47 | + return $this->contains($object); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | |
@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | * @param mixed $info |
61 | 61 | * @return bool |
62 | 62 | */ |
63 | - public function set_info( $object, $info = null ) { |
|
64 | - $info = ! empty( $info ) ? $info : spl_object_hash( $object ); |
|
63 | + public function set_info($object, $info = null) { |
|
64 | + $info = ! empty($info) ? $info : spl_object_hash($object); |
|
65 | 65 | $this->rewind(); |
66 | - while ( $this->valid() ) { |
|
67 | - if ( $object == $this->current() ) { |
|
68 | - $this->setInfo( $info ); |
|
66 | + while ($this->valid()) { |
|
67 | + if ($object == $this->current()) { |
|
68 | + $this->setInfo($info); |
|
69 | 69 | $this->rewind(); |
70 | 70 | return true; |
71 | 71 | } |
@@ -86,10 +86,10 @@ discard block |
||
86 | 86 | * @param mixed |
87 | 87 | * @return null | object |
88 | 88 | */ |
89 | - public function get_by_info( $info ) { |
|
89 | + public function get_by_info($info) { |
|
90 | 90 | $this->rewind(); |
91 | - while ( $this->valid() ) { |
|
92 | - if ( $info === $this->getInfo() ) { |
|
91 | + while ($this->valid()) { |
|
92 | + if ($info === $this->getInfo()) { |
|
93 | 93 | $object = $this->current(); |
94 | 94 | $this->rewind(); |
95 | 95 | return $object; |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | * @param object $object |
111 | 111 | * @return bool |
112 | 112 | */ |
113 | - public function has( $object ) { |
|
114 | - return $this->contains( $object ); |
|
113 | + public function has($object) { |
|
114 | + return $this->contains($object); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | * @param $object |
126 | 126 | * @return bool |
127 | 127 | */ |
128 | - public function remove( $object ) { |
|
129 | - $this->detach( $object ); |
|
128 | + public function remove($object) { |
|
129 | + $this->detach($object); |
|
130 | 130 | return true; |
131 | 131 | } |
132 | 132 | |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | * @param $object |
142 | 142 | * @return void |
143 | 143 | */ |
144 | - public function set_current( $object ) { |
|
144 | + public function set_current($object) { |
|
145 | 145 | $this->rewind(); |
146 | - while ( $this->valid() ) { |
|
147 | - if ( $this->current() === $object ) { |
|
146 | + while ($this->valid()) { |
|
147 | + if ($this->current() === $object) { |
|
148 | 148 | break; |
149 | 149 | } |
150 | 150 | $this->next(); |
@@ -162,10 +162,10 @@ discard block |
||
162 | 162 | * @param $info |
163 | 163 | * @return void |
164 | 164 | */ |
165 | - public function set_current_by_info( $info ) { |
|
165 | + public function set_current_by_info($info) { |
|
166 | 166 | $this->rewind(); |
167 | - while ( $this->valid() ) { |
|
168 | - if ( $info === $this->getInfo() ) { |
|
167 | + while ($this->valid()) { |
|
168 | + if ($info === $this->getInfo()) { |
|
169 | 169 | break; |
170 | 170 | } |
171 | 171 | $this->next(); |
@@ -1,8 +1,8 @@ discard block |
||
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 |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | __( |
@@ -25,12 +25,12 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
@@ -6,20 +6,20 @@ |
||
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 |
@@ -1,6 +1,6 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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'), |
@@ -22,7 +22,7 @@ |
||
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 | /** |