Completed
Branch FET-9643-checkin-system-docume... (5f5a9c)
by
unknown
200:04 queued 188:44
created
core/libraries/form_sections/inputs/EE_Radio_Button_Input.input.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  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')) { exit('No direct script access allowed'); }
2 2
 /**
3 3
  *
4 4
  * Class EE_Radio_Button_Input
@@ -11,17 +11,17 @@  discard block
 block discarded – undo
11 11
  * @since 				$VID:$
12 12
  *
13 13
  */
14
-class EE_Radio_Button_Input extends EE_Form_Input_With_Options_Base{
14
+class EE_Radio_Button_Input extends EE_Form_Input_With_Options_Base {
15 15
 
16 16
 	/**
17 17
 	 * @param array $answer_options
18 18
 	 * @param array $input_settings
19 19
 	 */
20
-	function __construct( $answer_options, $input_settings = array() ){
21
-		$this->_set_display_strategy( new EE_Radio_Button_Display_Strategy() );
22
-		$this->_add_validation_strategy( new EE_Enum_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) );
20
+	function __construct($answer_options, $input_settings = array()) {
21
+		$this->_set_display_strategy(new EE_Radio_Button_Display_Strategy());
22
+		$this->_add_validation_strategy(new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL));
23 23
 		$this->_multiple_selections = FALSE;
24
-		parent::__construct( $answer_options, $input_settings );
24
+		parent::__construct($answer_options, $input_settings);
25 25
 	}
26 26
 
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Select_Input.input.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  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')) { exit('No direct script access allowed'); }
2 2
 /**
3 3
  * Class EE_Select_Input
4 4
  *
@@ -10,16 +10,16 @@  discard block
 block discarded – undo
10 10
  * @since 				4.6
11 11
  *
12 12
  */
13
-class EE_Select_Input extends EE_Form_Input_With_Options_Base{
13
+class EE_Select_Input extends EE_Form_Input_With_Options_Base {
14 14
 
15 15
 	/**
16 16
 	 * @param array $answer_options
17 17
 	 * @param array $input_settings
18 18
 	 */
19
-	function __construct( $answer_options, $input_settings = array() ){
20
-		$this->_set_display_strategy( new EE_Select_Display_Strategy( $answer_options ));
21
-		$this->_add_validation_strategy( new EE_Enum_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) );
22
-		parent::__construct( $answer_options, $input_settings );
19
+	function __construct($answer_options, $input_settings = array()) {
20
+		$this->_set_display_strategy(new EE_Select_Display_Strategy($answer_options));
21
+		$this->_add_validation_strategy(new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL));
22
+		parent::__construct($answer_options, $input_settings);
23 23
 	}
24 24
 
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Select_Multi_Model_Input.input.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * @subpackage
9 9
  * @author				Mike Nelson
10 10
  */
11
-class EE_Select_Multi_Model_Input extends EE_Select_Multiple_Input{
11
+class EE_Select_Multi_Model_Input extends EE_Select_Multiple_Input {
12 12
 
13 13
 
14 14
 	protected $_naming_method;
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 	 *     example: 	if the class were an EE_Event, this could be slug(), description(), name() (default)
25 25
 	 * }
26 26
 	 */
27
-	public function __construct( $answer_options = array(), $input_settings = array() ) {
28
-		if( isset( $input_settings['naming_method'] )){
29
-			$this->set_option_naming_method( $input_settings['naming_method'] );
27
+	public function __construct($answer_options = array(), $input_settings = array()) {
28
+		if (isset($input_settings['naming_method'])) {
29
+			$this->set_option_naming_method($input_settings['naming_method']);
30 30
 		}
31
-		parent::__construct( $answer_options, $input_settings );
31
+		parent::__construct($answer_options, $input_settings);
32 32
 	}
33 33
 
34 34
 	/**
35 35
 	 * Sets the method name which will be called when outputting the options list
36 36
 	 * @param string $method
37 37
 	 */
38
-	public function set_option_naming_method($method){
38
+	public function set_option_naming_method($method) {
39 39
 		$this->_naming_method = $method;
40 40
 	}
41 41
 
@@ -46,16 +46,16 @@  discard block
 block discarded – undo
46 46
 	 * @param EE_Base_Class[] $answer_options
47 47
 	 * @return null|void
48 48
 	 */
49
-	public function set_select_options( $answer_options = array() ) {
49
+	public function set_select_options($answer_options = array()) {
50 50
 		//convert the model objects to select from into normal select options
51 51
 		$select_options = array();
52
-		foreach( $answer_options as $model_obj ){
53
-			if( $this->_naming_method ){
54
-				$display_value = call_user_func( array( $model_obj, $this->_naming_method ));
55
-			}else{
52
+		foreach ($answer_options as $model_obj) {
53
+			if ($this->_naming_method) {
54
+				$display_value = call_user_func(array($model_obj, $this->_naming_method));
55
+			} else {
56 56
 				$display_value = $model_obj->name();
57 57
 			}
58
-			$select_options[ $model_obj->ID() ] = $display_value;
58
+			$select_options[$model_obj->ID()] = $display_value;
59 59
 		}
60 60
 		parent::set_select_options($select_options);
61 61
 	}
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 	 * into the format EE_Select_Multiple expects
68 68
 	 * @param EE_Base_Class[]|array $values
69 69
 	 */
70
-	public function set_default($values){
70
+	public function set_default($values) {
71 71
 		$defaults_as_simple_ids = array();
72
-		foreach($values as $key => $value){
73
-			if($value instanceof EE_Base_Class){
72
+		foreach ($values as $key => $value) {
73
+			if ($value instanceof EE_Base_Class) {
74 74
 				$defaults_as_simple_ids[] = $value->ID();
75
-			}else{
75
+			} else {
76 76
 				$defaults_as_simple_ids[] = $value;
77 77
 			}
78 78
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		foreach( $answer_options as $model_obj ){
53 53
 			if( $this->_naming_method ){
54 54
 				$display_value = call_user_func( array( $model_obj, $this->_naming_method ));
55
-			}else{
55
+			} else{
56 56
 				$display_value = $model_obj->name();
57 57
 			}
58 58
 			$select_options[ $model_obj->ID() ] = $display_value;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		foreach($values as $key => $value){
73 73
 			if($value instanceof EE_Base_Class){
74 74
 				$defaults_as_simple_ids[] = $value->ID();
75
-			}else{
75
+			} else{
76 76
 				$defaults_as_simple_ids[] = $value;
77 77
 			}
78 78
 		}
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Select_Multiple_Input.input.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Select_Multiple_Input extends EE_Form_Input_With_Options_Base{
9
+class EE_Select_Multiple_Input extends EE_Form_Input_With_Options_Base {
10 10
 
11 11
 	/**
12 12
 	 * @param array | EE_Question_Option[] $answer_options
13 13
 	 * @param array $input_settings
14 14
 	 */
15
-	public function __construct( $answer_options, $input_settings = array() ) {
16
-		$this->_set_display_strategy( new EE_Select_Multiple_Display_Strategy() );
17
-		$this->_add_validation_strategy( new EE_Many_Valued_Validation_Strategy( array( new EE_Enum_Validation_Strategy( isset( $input_settings[ 'validation_error_message' ] ) ? $input_settings[ 'validation_error_message' ] : NULL ) )));
15
+	public function __construct($answer_options, $input_settings = array()) {
16
+		$this->_set_display_strategy(new EE_Select_Multiple_Display_Strategy());
17
+		$this->_add_validation_strategy(new EE_Many_Valued_Validation_Strategy(array(new EE_Enum_Validation_Strategy(isset($input_settings['validation_error_message']) ? $input_settings['validation_error_message'] : NULL))));
18 18
 		$this->_multiple_selections = TRUE;
19
-		parent::__construct( $answer_options, $input_settings );
19
+		parent::__construct($answer_options, $input_settings);
20 20
 	}
21 21
 
22 22
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_State_Select_Input.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@  discard block
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_State_Select_Input extends EE_Select_Input{
9
+class EE_State_Select_Input extends EE_Select_Input {
10 10
 
11 11
 	/**
12 12
 	 * @param array $state_options
13 13
 	 * @param array $input_settings
14 14
 	 */
15
-	function __construct( $state_options, $input_settings = array() ){
15
+	function __construct($state_options, $input_settings = array()) {
16 16
 		$state_options = apply_filters(
17 17
 			'FHEE__EE_State_Select_Input____construct__state_options',
18
-			$this->get_state_answer_options( $state_options ),
18
+			$this->get_state_answer_options($state_options),
19 19
 			$this
20 20
 		);
21
-		parent::__construct( $state_options, $input_settings );
21
+		parent::__construct($state_options, $input_settings);
22 22
 	}
23 23
 
24 24
 
@@ -29,17 +29,17 @@  discard block
 block discarded – undo
29 29
 	 * @param array $state_options
30 30
 	 * @return array
31 31
 	 */
32
-	public function get_state_answer_options( $state_options = NULL ){
32
+	public function get_state_answer_options($state_options = NULL) {
33 33
 		// if passed something that is NOT an array
34
-		if ( ! is_array( $state_options )) {
34
+		if ( ! is_array($state_options)) {
35 35
 			// get possibly cached list of states
36 36
 			$states = EEM_State::instance()->get_all_active_states();
37
-			if ( ! empty( $states )) {
37
+			if ( ! empty($states)) {
38 38
 				//set the default
39 39
 				$state_options[''][''] = '';
40
-				foreach( $states as $state ){
41
-					if ( $state instanceof EE_State ) {
42
-						$state_options[ $state->country()->name() ][ $state->ID() ] = $state->name();
40
+				foreach ($states as $state) {
41
+					if ($state instanceof EE_State) {
42
+						$state_options[$state->country()->name()][$state->ID()] = $state->name();
43 43
 					}
44 44
 				}
45 45
 			} else {
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Submit_Input.input.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@
 block discarded – undo
8 8
  *
9 9
  * This input has a default validation strategy of plaintext (which can be removed after construction)
10 10
  */
11
-class EE_Submit_Input extends EE_Form_Input_Base{
11
+class EE_Submit_Input extends EE_Form_Input_Base {
12 12
 
13 13
 	/**
14 14
 	 * @param array $options
15 15
 	 */
16
-	function __construct($options = array()){
16
+	function __construct($options = array()) {
17 17
 		$this->_set_display_strategy(new EE_Submit_Input_Display_Strategy());
18 18
 		$this->_set_normalization_strategy(new EE_Text_Normalization());
19
-		$this->_add_validation_strategy( new EE_Plaintext_Validation_Strategy() );
19
+		$this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy());
20 20
 		parent::__construct($options);
21 21
 	}
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Year_Input.input.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
 /**
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * ------------------------------------------------------------------------
26 26
  */
27
-class EE_Year_Input extends EE_Select_Input{
27
+class EE_Year_Input extends EE_Select_Input {
28 28
 
29
-	function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 1, $years_ahead = 15 ){
30
-		if($four_digit_year){
29
+	function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 1, $years_ahead = 15) {
30
+		if ($four_digit_year) {
31 31
 			$current_year_int = intval(date('Y'));
32
-		}else{
32
+		} else {
33 33
 			$current_year_int = intval(date('y'));
34 34
 		}
35 35
 		$answer_options = array();
36
-		for( $start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++){
36
+		for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) {
37 37
 			$answer_options[$start] = $start;
38 38
 		}
39
-		parent::__construct( $answer_options, $input_settings );
39
+		parent::__construct($answer_options, $input_settings);
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if (!defined('EVENT_ESPRESSO_VERSION')) {
3 3
 	exit('No direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
@@ -29,7 +30,7 @@  discard block
 block discarded – undo
29 30
 	function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 1, $years_ahead = 15 ){
30 31
 		if($four_digit_year){
31 32
 			$current_year_int = intval(date('Y'));
32
-		}else{
33
+		} else{
33 34
 			$current_year_int = intval(date('y'));
34 35
 		}
35 36
 		$answer_options = array();
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Yes_No_Input.input.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Yes_No_Input extends EE_Select_Input{
9
+class EE_Yes_No_Input extends EE_Select_Input {
10 10
 
11 11
 	/**
12 12
 	 * @param array $options
13 13
 	 */
14
-	function __construct( $options = array()){
15
-		$select_options = array(true=>  __("Yes", "event_espresso"),false=>  __("No", "event_espresso"));
14
+	function __construct($options = array()) {
15
+		$select_options = array(true=>  __("Yes", "event_espresso"), false=>  __("No", "event_espresso"));
16 16
 
17
-		parent::__construct($select_options,$options);
17
+		parent::__construct($select_options, $options);
18 18
 	}
19 19
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/payment_methods/EE_Billing_Info_Form.form.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  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')) { exit('No direct script access allowed'); }
2 2
 /**
3 3
  *
4 4
  * EE_Billing_Info_Form
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author				Mike Nelson
12 12
  *
13 13
  */
14
-class EE_Billing_Info_Form extends EE_Form_Section_Proper{
14
+class EE_Billing_Info_Form extends EE_Form_Section_Proper {
15 15
 
16 16
 	/**
17 17
 	 * The payment method this billing form is for
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	 * @param EE_Payment_Method $payment_method
27 27
 	 * @param array $options_array @see EE_Form_Section_Proper::__construct()
28 28
 	 */
29
-	public function __construct( EE_Payment_Method $payment_method, $options_array= array()){
29
+	public function __construct(EE_Payment_Method $payment_method, $options_array = array()) {
30 30
 		$this->_pm_instance = $payment_method;
31 31
 		$this->_layout_strategy = new EE_Div_Per_Section_Layout();
32
-		parent::__construct( $options_array );
32
+		parent::__construct($options_array);
33 33
 
34 34
 	}
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @param EE_Payment_Method $payment_method
41 41
 	 * @return void
42 42
 	 */
43
-	public function set_payment_method( EE_Payment_Method $payment_method ){
43
+	public function set_payment_method(EE_Payment_Method $payment_method) {
44 44
 		$this->_pm_instance = $payment_method;
45 45
 	}
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * Returns the instance of the payment method this billing form is for
51 51
 	 * @return EE_Payment_Method
52 52
 	 */
53
-	public function payment_method(){
53
+	public function payment_method() {
54 54
 		return $this->_pm_instance;
55 55
 	}
56 56
 
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 	 * payment_fields_autofilled_notice_html
61 61
 	 * @return string
62 62
 	 */
63
-	public function payment_fields_autofilled_notice_html(){
64
-		EE_Registry::instance()->load_helper( 'HTML' );
63
+	public function payment_fields_autofilled_notice_html() {
64
+		EE_Registry::instance()->load_helper('HTML');
65 65
 		return  new EE_Form_Section_HTML(
66 66
 			EEH_HTML::p(
67
-				apply_filters( 'FHEE__EE_Billing_Info_Form__payment_fields_autofilled_notice_html_text', __( 'Payment fields have been autofilled because you are in debug mode', 'event_espresso' )),
67
+				apply_filters('FHEE__EE_Billing_Info_Form__payment_fields_autofilled_notice_html_text', __('Payment fields have been autofilled because you are in debug mode', 'event_espresso')),
68 68
 				'',
69 69
 				'important-notice'
70 70
 			)
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	/**
77 77
 	 * @return string
78 78
 	 */
79
-	public function html_class(){
80
-		return ! empty( $this->_html_class ) ? $this->_html_class . ' ee-billing-form' : 'ee-billing-form';
79
+	public function html_class() {
80
+		return ! empty($this->_html_class) ? $this->_html_class.' ee-billing-form' : 'ee-billing-form';
81 81
 	}
82 82
 
83 83
 
Please login to merge, or discard this patch.