@@ -10,98 +10,98 @@ |
||
10 | 10 | */ |
11 | 11 | class EED_Certificate extends EED_Module |
12 | 12 | { |
13 | - /** |
|
14 | - * @return EED_Module|EED_Certificate |
|
15 | - * @throws EE_Error |
|
16 | - * @throws ReflectionException |
|
17 | - */ |
|
18 | - public static function instance() |
|
19 | - { |
|
20 | - return parent::get_instance(__CLASS__); |
|
21 | - } |
|
13 | + /** |
|
14 | + * @return EED_Module|EED_Certificate |
|
15 | + * @throws EE_Error |
|
16 | + * @throws ReflectionException |
|
17 | + */ |
|
18 | + public static function instance() |
|
19 | + { |
|
20 | + return parent::get_instance(__CLASS__); |
|
21 | + } |
|
22 | 22 | |
23 | 23 | |
24 | - /** |
|
25 | - * set_hooks - for hooking into EE Core, other modules, etc |
|
26 | - * |
|
27 | - * @access public |
|
28 | - * @return void |
|
29 | - */ |
|
30 | - public static function set_hooks() |
|
31 | - { |
|
32 | - } |
|
24 | + /** |
|
25 | + * set_hooks - for hooking into EE Core, other modules, etc |
|
26 | + * |
|
27 | + * @access public |
|
28 | + * @return void |
|
29 | + */ |
|
30 | + public static function set_hooks() |
|
31 | + { |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
36 | - * |
|
37 | - * @access public |
|
38 | - * @return void |
|
39 | - */ |
|
40 | - public static function set_hooks_admin() |
|
41 | - { |
|
42 | - } |
|
34 | + /** |
|
35 | + * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
36 | + * |
|
37 | + * @access public |
|
38 | + * @return void |
|
39 | + */ |
|
40 | + public static function set_hooks_admin() |
|
41 | + { |
|
42 | + } |
|
43 | 43 | |
44 | 44 | |
45 | - /** |
|
46 | - * run - initial module setup |
|
47 | - * |
|
48 | - * @access public |
|
49 | - * @return void |
|
50 | - */ |
|
51 | - public function run($WP) |
|
52 | - { |
|
53 | - } |
|
45 | + /** |
|
46 | + * run - initial module setup |
|
47 | + * |
|
48 | + * @access public |
|
49 | + * @return void |
|
50 | + */ |
|
51 | + public function run($WP) |
|
52 | + { |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - /** |
|
57 | - * certificate_launch |
|
58 | - * |
|
59 | - * @access public |
|
60 | - * @return void |
|
61 | - */ |
|
62 | - public function certificate_launch() |
|
63 | - { |
|
64 | - $request = self::getRequest(); |
|
65 | - if ($request->requestParamIsSet('id') && $request->requestParamIsSet('r_id')) { |
|
66 | - echo espresso_certificate_launch( |
|
67 | - $request->getRequestParam('id'), |
|
68 | - $request->getRequestParam('r_id') |
|
69 | - ); |
|
70 | - } |
|
71 | - } |
|
56 | + /** |
|
57 | + * certificate_launch |
|
58 | + * |
|
59 | + * @access public |
|
60 | + * @return void |
|
61 | + */ |
|
62 | + public function certificate_launch() |
|
63 | + { |
|
64 | + $request = self::getRequest(); |
|
65 | + if ($request->requestParamIsSet('id') && $request->requestParamIsSet('r_id')) { |
|
66 | + echo espresso_certificate_launch( |
|
67 | + $request->getRequestParam('id'), |
|
68 | + $request->getRequestParam('r_id') |
|
69 | + ); |
|
70 | + } |
|
71 | + } |
|
72 | 72 | |
73 | 73 | |
74 | - /** |
|
75 | - * wp_loaded |
|
76 | - * |
|
77 | - * @access public |
|
78 | - * @return void |
|
79 | - */ |
|
80 | - public function wp_loaded() |
|
81 | - { |
|
82 | - } |
|
74 | + /** |
|
75 | + * wp_loaded |
|
76 | + * |
|
77 | + * @access public |
|
78 | + * @return void |
|
79 | + */ |
|
80 | + public function wp_loaded() |
|
81 | + { |
|
82 | + } |
|
83 | 83 | |
84 | 84 | |
85 | - /** |
|
86 | - * wp |
|
87 | - * |
|
88 | - * @access public |
|
89 | - * @return void |
|
90 | - */ |
|
91 | - public function wp() |
|
92 | - { |
|
93 | - } |
|
85 | + /** |
|
86 | + * wp |
|
87 | + * |
|
88 | + * @access public |
|
89 | + * @return void |
|
90 | + */ |
|
91 | + public function wp() |
|
92 | + { |
|
93 | + } |
|
94 | 94 | |
95 | 95 | |
96 | - /** |
|
97 | - * the_content |
|
98 | - * |
|
99 | - * @access public |
|
100 | - * @return string |
|
101 | - */ |
|
102 | - public function the_content($content) |
|
103 | - { |
|
104 | - $content .= $this->ouput; |
|
105 | - return $content; |
|
106 | - } |
|
96 | + /** |
|
97 | + * the_content |
|
98 | + * |
|
99 | + * @access public |
|
100 | + * @return string |
|
101 | + */ |
|
102 | + public function the_content($content) |
|
103 | + { |
|
104 | + $content .= $this->ouput; |
|
105 | + return $content; |
|
106 | + } |
|
107 | 107 | } |
@@ -11,69 +11,69 @@ |
||
11 | 11 | */ |
12 | 12 | class EED_Csv extends EED_Module |
13 | 13 | { |
14 | - /** |
|
15 | - * @return EED_Csv |
|
16 | - */ |
|
17 | - public static function instance() |
|
18 | - { |
|
19 | - return parent::get_instance(__CLASS__); |
|
20 | - } |
|
14 | + /** |
|
15 | + * @return EED_Csv |
|
16 | + */ |
|
17 | + public static function instance() |
|
18 | + { |
|
19 | + return parent::get_instance(__CLASS__); |
|
20 | + } |
|
21 | 21 | |
22 | 22 | |
23 | - /** |
|
24 | - * set_hooks - for hooking into EE Core, other modules, etc |
|
25 | - * |
|
26 | - * @access public |
|
27 | - * @return void |
|
28 | - */ |
|
29 | - public static function set_hooks() |
|
30 | - { |
|
31 | - } |
|
23 | + /** |
|
24 | + * set_hooks - for hooking into EE Core, other modules, etc |
|
25 | + * |
|
26 | + * @access public |
|
27 | + * @return void |
|
28 | + */ |
|
29 | + public static function set_hooks() |
|
30 | + { |
|
31 | + } |
|
32 | 32 | |
33 | - /** |
|
34 | - * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
35 | - * |
|
36 | - * @access public |
|
37 | - * @return void |
|
38 | - */ |
|
39 | - public static function set_hooks_admin() |
|
40 | - { |
|
41 | - } |
|
33 | + /** |
|
34 | + * set_hooks_admin - for hooking into EE Admin Core, other modules, etc |
|
35 | + * |
|
36 | + * @access public |
|
37 | + * @return void |
|
38 | + */ |
|
39 | + public static function set_hooks_admin() |
|
40 | + { |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | - /** |
|
45 | - * run - initial module setup |
|
46 | - * |
|
47 | - * @access public |
|
48 | - * @return void |
|
49 | - */ |
|
50 | - public function run($WP) |
|
51 | - { |
|
52 | - } |
|
44 | + /** |
|
45 | + * run - initial module setup |
|
46 | + * |
|
47 | + * @access public |
|
48 | + * @return void |
|
49 | + */ |
|
50 | + public function run($WP) |
|
51 | + { |
|
52 | + } |
|
53 | 53 | |
54 | 54 | |
55 | - /** |
|
56 | - * export |
|
57 | - * |
|
58 | - * @access public |
|
59 | - * @return void |
|
60 | - */ |
|
61 | - public function export() |
|
62 | - { |
|
63 | - $Export = EE_Registry::instance()->load_class('Export'); |
|
64 | - $Export->export(); |
|
65 | - } |
|
55 | + /** |
|
56 | + * export |
|
57 | + * |
|
58 | + * @access public |
|
59 | + * @return void |
|
60 | + */ |
|
61 | + public function export() |
|
62 | + { |
|
63 | + $Export = EE_Registry::instance()->load_class('Export'); |
|
64 | + $Export->export(); |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - /** |
|
69 | - * import |
|
70 | - * |
|
71 | - * @access public |
|
72 | - * @return void |
|
73 | - */ |
|
74 | - public function import() |
|
75 | - { |
|
76 | - $Import = EE_Registry::instance()->load_class('Import'); |
|
77 | - $Import->import(); |
|
78 | - } |
|
68 | + /** |
|
69 | + * import |
|
70 | + * |
|
71 | + * @access public |
|
72 | + * @return void |
|
73 | + */ |
|
74 | + public function import() |
|
75 | + { |
|
76 | + $Import = EE_Registry::instance()->load_class('Import'); |
|
77 | + $Import->import(); |
|
78 | + } |
|
79 | 79 | } |
@@ -8,57 +8,57 @@ |
||
8 | 8 | */ |
9 | 9 | class ChangesIn40833 extends ChangesInBase |
10 | 10 | { |
11 | - /** |
|
12 | - * Adds hooks so requests to 4.8.29 don't have the checkin endpoints |
|
13 | - */ |
|
14 | - public function setHooks() |
|
15 | - { |
|
16 | - // set a hook to remove the checkout/checkout endpoints if the request |
|
17 | - // is for lower than 4.8.33 |
|
18 | - add_filter( |
|
19 | - 'FHEE__EED_Core_Rest_Api___register_rpc_routes__this_versions_routes', |
|
20 | - array($this, 'removeCheckinRoutesEarlierThan4833'), |
|
21 | - 10, |
|
22 | - 2 |
|
23 | - ); |
|
24 | - add_filter( |
|
25 | - 'FHEE__EventEspresso\core\libraries\rest_api\controllers\Base___get_headers_from_ee_notices__return', |
|
26 | - array($this, 'dontAddHeadersFromEeNotices'), |
|
27 | - 10, |
|
28 | - 2 |
|
29 | - ); |
|
30 | - } |
|
11 | + /** |
|
12 | + * Adds hooks so requests to 4.8.29 don't have the checkin endpoints |
|
13 | + */ |
|
14 | + public function setHooks() |
|
15 | + { |
|
16 | + // set a hook to remove the checkout/checkout endpoints if the request |
|
17 | + // is for lower than 4.8.33 |
|
18 | + add_filter( |
|
19 | + 'FHEE__EED_Core_Rest_Api___register_rpc_routes__this_versions_routes', |
|
20 | + array($this, 'removeCheckinRoutesEarlierThan4833'), |
|
21 | + 10, |
|
22 | + 2 |
|
23 | + ); |
|
24 | + add_filter( |
|
25 | + 'FHEE__EventEspresso\core\libraries\rest_api\controllers\Base___get_headers_from_ee_notices__return', |
|
26 | + array($this, 'dontAddHeadersFromEeNotices'), |
|
27 | + 10, |
|
28 | + 2 |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * Removes the checkin and checkout endpoints from the index for requests |
|
35 | - * to api versions lowers than 4.8.33 |
|
36 | - * |
|
37 | - * @param array $routes_on_this_version |
|
38 | - * @param string $version |
|
39 | - * @return array like $routes_on_this_version |
|
40 | - */ |
|
41 | - public function removeCheckinRoutesEarlierThan4833($routes_on_this_version, $version) |
|
42 | - { |
|
43 | - if ($this->appliesToVersion($version)) { |
|
44 | - unset($routes_on_this_version['registrations/(?P<REG_ID>\d+)/toggle_checkin_for_datetime/(?P<DTT_ID>\d+)']); |
|
45 | - } |
|
46 | - return $routes_on_this_version; |
|
47 | - } |
|
33 | + /** |
|
34 | + * Removes the checkin and checkout endpoints from the index for requests |
|
35 | + * to api versions lowers than 4.8.33 |
|
36 | + * |
|
37 | + * @param array $routes_on_this_version |
|
38 | + * @param string $version |
|
39 | + * @return array like $routes_on_this_version |
|
40 | + */ |
|
41 | + public function removeCheckinRoutesEarlierThan4833($routes_on_this_version, $version) |
|
42 | + { |
|
43 | + if ($this->appliesToVersion($version)) { |
|
44 | + unset($routes_on_this_version['registrations/(?P<REG_ID>\d+)/toggle_checkin_for_datetime/(?P<DTT_ID>\d+)']); |
|
45 | + } |
|
46 | + return $routes_on_this_version; |
|
47 | + } |
|
48 | 48 | |
49 | 49 | |
50 | - /** |
|
51 | - * We just added headers for notices in this version |
|
52 | - * |
|
53 | - * @param array $headers_from_ee_notices |
|
54 | - * @param string $requested_version |
|
55 | - * @return array |
|
56 | - */ |
|
57 | - public function dontAddHeadersFromEeNotices($headers_from_ee_notices, $requested_version) |
|
58 | - { |
|
59 | - if ($this->appliesToVersion($requested_version)) { |
|
60 | - return array(); |
|
61 | - } |
|
62 | - return $headers_from_ee_notices; |
|
63 | - } |
|
50 | + /** |
|
51 | + * We just added headers for notices in this version |
|
52 | + * |
|
53 | + * @param array $headers_from_ee_notices |
|
54 | + * @param string $requested_version |
|
55 | + * @return array |
|
56 | + */ |
|
57 | + public function dontAddHeadersFromEeNotices($headers_from_ee_notices, $requested_version) |
|
58 | + { |
|
59 | + if ($this->appliesToVersion($requested_version)) { |
|
60 | + return array(); |
|
61 | + } |
|
62 | + return $headers_from_ee_notices; |
|
63 | + } |
|
64 | 64 | } |
@@ -16,43 +16,43 @@ |
||
16 | 16 | */ |
17 | 17 | class Attendee extends AttendeeCalculationsBase |
18 | 18 | { |
19 | - /** |
|
20 | - * @param array $wpdb_row |
|
21 | - * @param WP_REST_Request $request |
|
22 | - * @param AttendeeControllerBase $controller |
|
23 | - * @since 4.9.66.p |
|
24 | - * @return string |
|
25 | - */ |
|
26 | - public function userAvatar(array $wpdb_row, WP_REST_Request $request, AttendeeControllerBase $controller) |
|
27 | - { |
|
28 | - if (is_array($wpdb_row) && isset($wpdb_row['Attendee_Meta.ATT_email'])) { |
|
29 | - $email_address = $wpdb_row['Attendee_Meta.ATT_email']; |
|
30 | - } |
|
31 | - if (empty($email_address)) { |
|
32 | - return get_avatar_url('', array('force_default' => true)); |
|
33 | - } |
|
34 | - $avatar = get_avatar_url($email_address); |
|
35 | - return $avatar ? $avatar : ''; |
|
36 | - } |
|
19 | + /** |
|
20 | + * @param array $wpdb_row |
|
21 | + * @param WP_REST_Request $request |
|
22 | + * @param AttendeeControllerBase $controller |
|
23 | + * @since 4.9.66.p |
|
24 | + * @return string |
|
25 | + */ |
|
26 | + public function userAvatar(array $wpdb_row, WP_REST_Request $request, AttendeeControllerBase $controller) |
|
27 | + { |
|
28 | + if (is_array($wpdb_row) && isset($wpdb_row['Attendee_Meta.ATT_email'])) { |
|
29 | + $email_address = $wpdb_row['Attendee_Meta.ATT_email']; |
|
30 | + } |
|
31 | + if (empty($email_address)) { |
|
32 | + return get_avatar_url('', array('force_default' => true)); |
|
33 | + } |
|
34 | + $avatar = get_avatar_url($email_address); |
|
35 | + return $avatar ? $avatar : ''; |
|
36 | + } |
|
37 | 37 | |
38 | 38 | |
39 | - /** |
|
40 | - * Provides an array for all the calculations possible that outlines a json schema for those calculations. |
|
41 | - * Array is indexed by calculation (snake case) and value is the schema for that calculation. |
|
42 | - * |
|
43 | - * @since 4.9.68.p |
|
44 | - * @return array |
|
45 | - */ |
|
46 | - public function schemaForCalculations() |
|
47 | - { |
|
48 | - return array( |
|
49 | - 'user_avatar' => array( |
|
50 | - 'description' => esc_html__( |
|
51 | - 'The avatar url for the attendee (if available).', |
|
52 | - 'event_espresso' |
|
53 | - ), |
|
54 | - 'type' => 'string', |
|
55 | - ), |
|
56 | - ); |
|
57 | - } |
|
39 | + /** |
|
40 | + * Provides an array for all the calculations possible that outlines a json schema for those calculations. |
|
41 | + * Array is indexed by calculation (snake case) and value is the schema for that calculation. |
|
42 | + * |
|
43 | + * @since 4.9.68.p |
|
44 | + * @return array |
|
45 | + */ |
|
46 | + public function schemaForCalculations() |
|
47 | + { |
|
48 | + return array( |
|
49 | + 'user_avatar' => array( |
|
50 | + 'description' => esc_html__( |
|
51 | + 'The avatar url for the attendee (if available).', |
|
52 | + 'event_espresso' |
|
53 | + ), |
|
54 | + 'type' => 'string', |
|
55 | + ), |
|
56 | + ); |
|
57 | + } |
|
58 | 58 | } |
@@ -14,63 +14,63 @@ |
||
14 | 14 | */ |
15 | 15 | class EE_Line_Item_Display |
16 | 16 | { |
17 | - private $strategy = null; |
|
17 | + private $strategy = null; |
|
18 | 18 | |
19 | 19 | |
20 | - /** |
|
21 | - * @param string $context - where/how the line items are being displayed |
|
22 | - * @param string $other_line_item_display_strategy |
|
23 | - */ |
|
24 | - public function __construct($context = '', $other_line_item_display_strategy = '') |
|
25 | - { |
|
26 | - $context = strtolower($context); |
|
27 | - switch ($context) { |
|
28 | - case 'invoice': |
|
29 | - $this->strategy = new EE_Invoice_Line_Item_Display_Strategy(); |
|
30 | - break; |
|
31 | - case 'receipt': |
|
32 | - $this->strategy = new EE_Receipt_Line_Item_Display_Strategy(); |
|
33 | - break; |
|
34 | - case 'spco': |
|
35 | - $this->strategy = new EE_SPCO_Line_Item_Display_Strategy(); |
|
36 | - break; |
|
37 | - default: |
|
38 | - if ( |
|
39 | - ! empty($other_line_item_display_strategy) && |
|
40 | - class_exists($other_line_item_display_strategy) |
|
41 | - ) { |
|
42 | - $this->strategy = new $other_line_item_display_strategy(); |
|
43 | - } else { |
|
44 | - $this->strategy = new EE_Default_Line_Item_Display_Strategy(); |
|
45 | - } |
|
46 | - } |
|
47 | - } |
|
20 | + /** |
|
21 | + * @param string $context - where/how the line items are being displayed |
|
22 | + * @param string $other_line_item_display_strategy |
|
23 | + */ |
|
24 | + public function __construct($context = '', $other_line_item_display_strategy = '') |
|
25 | + { |
|
26 | + $context = strtolower($context); |
|
27 | + switch ($context) { |
|
28 | + case 'invoice': |
|
29 | + $this->strategy = new EE_Invoice_Line_Item_Display_Strategy(); |
|
30 | + break; |
|
31 | + case 'receipt': |
|
32 | + $this->strategy = new EE_Receipt_Line_Item_Display_Strategy(); |
|
33 | + break; |
|
34 | + case 'spco': |
|
35 | + $this->strategy = new EE_SPCO_Line_Item_Display_Strategy(); |
|
36 | + break; |
|
37 | + default: |
|
38 | + if ( |
|
39 | + ! empty($other_line_item_display_strategy) && |
|
40 | + class_exists($other_line_item_display_strategy) |
|
41 | + ) { |
|
42 | + $this->strategy = new $other_line_item_display_strategy(); |
|
43 | + } else { |
|
44 | + $this->strategy = new EE_Default_Line_Item_Display_Strategy(); |
|
45 | + } |
|
46 | + } |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param EE_Line_Item $line_item |
|
51 | - * @param array $options |
|
52 | - * @return mixed |
|
53 | - */ |
|
54 | - public function display_line_item(EE_Line_Item $line_item, $options = array()) |
|
55 | - { |
|
56 | - return $this->strategy->display_line_item($line_item, $options); |
|
57 | - } |
|
49 | + /** |
|
50 | + * @param EE_Line_Item $line_item |
|
51 | + * @param array $options |
|
52 | + * @return mixed |
|
53 | + */ |
|
54 | + public function display_line_item(EE_Line_Item $line_item, $options = array()) |
|
55 | + { |
|
56 | + return $this->strategy->display_line_item($line_item, $options); |
|
57 | + } |
|
58 | 58 | |
59 | 59 | |
60 | - /** |
|
61 | - * @return float |
|
62 | - */ |
|
63 | - public function grand_total() |
|
64 | - { |
|
65 | - return $this->strategy->grand_total(); |
|
66 | - } |
|
60 | + /** |
|
61 | + * @return float |
|
62 | + */ |
|
63 | + public function grand_total() |
|
64 | + { |
|
65 | + return $this->strategy->grand_total(); |
|
66 | + } |
|
67 | 67 | |
68 | 68 | |
69 | - /** |
|
70 | - * @return float |
|
71 | - */ |
|
72 | - public function total_items() |
|
73 | - { |
|
74 | - return $this->strategy->total_items(); |
|
75 | - } |
|
69 | + /** |
|
70 | + * @return float |
|
71 | + */ |
|
72 | + public function total_items() |
|
73 | + { |
|
74 | + return $this->strategy->total_items(); |
|
75 | + } |
|
76 | 76 | } |
@@ -15,55 +15,55 @@ |
||
15 | 15 | */ |
16 | 16 | interface SequentialStepFormInterface extends FormHandlerInterface |
17 | 17 | { |
18 | - /** |
|
19 | - * @return int |
|
20 | - */ |
|
21 | - public function order(); |
|
18 | + /** |
|
19 | + * @return int |
|
20 | + */ |
|
21 | + public function order(); |
|
22 | 22 | |
23 | 23 | |
24 | 24 | |
25 | - /** |
|
26 | - * @param int $order |
|
27 | - * @throws InvalidArgumentException |
|
28 | - */ |
|
29 | - public function setOrder($order); |
|
25 | + /** |
|
26 | + * @param int $order |
|
27 | + * @throws InvalidArgumentException |
|
28 | + */ |
|
29 | + public function setOrder($order); |
|
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * @return string |
|
35 | - */ |
|
36 | - public function redirectUrl(); |
|
33 | + /** |
|
34 | + * @return string |
|
35 | + */ |
|
36 | + public function redirectUrl(); |
|
37 | 37 | |
38 | 38 | |
39 | 39 | |
40 | - /** |
|
41 | - * @param string $redirect_url |
|
42 | - * @throws InvalidDataTypeException |
|
43 | - * @throws InvalidArgumentException |
|
44 | - */ |
|
45 | - public function setRedirectUrl($redirect_url); |
|
40 | + /** |
|
41 | + * @param string $redirect_url |
|
42 | + * @throws InvalidDataTypeException |
|
43 | + * @throws InvalidArgumentException |
|
44 | + */ |
|
45 | + public function setRedirectUrl($redirect_url); |
|
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | - /** |
|
50 | - * @param array $redirect_args |
|
51 | - * @throws InvalidDataTypeException |
|
52 | - * @throws InvalidArgumentException |
|
53 | - */ |
|
54 | - public function addRedirectArgs($redirect_args = array()); |
|
49 | + /** |
|
50 | + * @param array $redirect_args |
|
51 | + * @throws InvalidDataTypeException |
|
52 | + * @throws InvalidArgumentException |
|
53 | + */ |
|
54 | + public function addRedirectArgs($redirect_args = array()); |
|
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | - /** |
|
59 | - * @return string |
|
60 | - */ |
|
61 | - public function redirectTo(); |
|
58 | + /** |
|
59 | + * @return string |
|
60 | + */ |
|
61 | + public function redirectTo(); |
|
62 | 62 | |
63 | 63 | |
64 | 64 | |
65 | - /** |
|
66 | - * @param string $redirect_to |
|
67 | - */ |
|
68 | - public function setRedirectTo($redirect_to); |
|
65 | + /** |
|
66 | + * @param string $redirect_to |
|
67 | + */ |
|
68 | + public function setRedirectTo($redirect_to); |
|
69 | 69 | } |
@@ -12,25 +12,25 @@ |
||
12 | 12 | */ |
13 | 13 | class InvalidFormHandlerException extends \UnexpectedValueException |
14 | 14 | { |
15 | - /** |
|
16 | - * InvalidFormHandlerException constructor. |
|
17 | - * |
|
18 | - * @param string $actual the FormHandler object that was received |
|
19 | - * @param string $message |
|
20 | - * @param int $code |
|
21 | - * @param \Exception $previous |
|
22 | - */ |
|
23 | - public function __construct($actual, $message = '', $code = 0, \Exception $previous = null) |
|
24 | - { |
|
25 | - if (empty($message)) { |
|
26 | - $message = sprintf( |
|
27 | - esc_html__( |
|
28 | - 'A valid Form Handler was expected but instead "%1$s" was received.', |
|
29 | - 'event_espresso' |
|
30 | - ), |
|
31 | - $actual |
|
32 | - ); |
|
33 | - } |
|
34 | - parent::__construct($message, $code, $previous); |
|
35 | - } |
|
15 | + /** |
|
16 | + * InvalidFormHandlerException constructor. |
|
17 | + * |
|
18 | + * @param string $actual the FormHandler object that was received |
|
19 | + * @param string $message |
|
20 | + * @param int $code |
|
21 | + * @param \Exception $previous |
|
22 | + */ |
|
23 | + public function __construct($actual, $message = '', $code = 0, \Exception $previous = null) |
|
24 | + { |
|
25 | + if (empty($message)) { |
|
26 | + $message = sprintf( |
|
27 | + esc_html__( |
|
28 | + 'A valid Form Handler was expected but instead "%1$s" was received.', |
|
29 | + 'event_espresso' |
|
30 | + ), |
|
31 | + $actual |
|
32 | + ); |
|
33 | + } |
|
34 | + parent::__construct($message, $code, $previous); |
|
35 | + } |
|
36 | 36 | } |
@@ -11,68 +11,68 @@ |
||
11 | 11 | */ |
12 | 12 | class EE_Text_Area_Input extends EE_Form_Input_Base |
13 | 13 | { |
14 | - protected $_rows = 2; |
|
15 | - protected $_cols = 20; |
|
14 | + protected $_rows = 2; |
|
15 | + protected $_cols = 20; |
|
16 | 16 | |
17 | - /** |
|
18 | - * sets the rows property on this input |
|
19 | - * @param int $rows |
|
20 | - */ |
|
21 | - public function set_rows($rows) |
|
22 | - { |
|
23 | - $this->_rows = $rows; |
|
24 | - } |
|
25 | - /** |
|
26 | - * sets the cols html property on this input |
|
27 | - * @param int $cols |
|
28 | - */ |
|
29 | - public function set_cols($cols) |
|
30 | - { |
|
31 | - $this->_cols = $cols; |
|
32 | - } |
|
33 | - /** |
|
34 | - * |
|
35 | - * @return int |
|
36 | - */ |
|
37 | - public function get_rows() |
|
38 | - { |
|
39 | - return $this->_rows; |
|
40 | - } |
|
41 | - /** |
|
42 | - * |
|
43 | - * @return int |
|
44 | - */ |
|
45 | - public function get_cols() |
|
46 | - { |
|
47 | - return $this->_cols; |
|
48 | - } |
|
17 | + /** |
|
18 | + * sets the rows property on this input |
|
19 | + * @param int $rows |
|
20 | + */ |
|
21 | + public function set_rows($rows) |
|
22 | + { |
|
23 | + $this->_rows = $rows; |
|
24 | + } |
|
25 | + /** |
|
26 | + * sets the cols html property on this input |
|
27 | + * @param int $cols |
|
28 | + */ |
|
29 | + public function set_cols($cols) |
|
30 | + { |
|
31 | + $this->_cols = $cols; |
|
32 | + } |
|
33 | + /** |
|
34 | + * |
|
35 | + * @return int |
|
36 | + */ |
|
37 | + public function get_rows() |
|
38 | + { |
|
39 | + return $this->_rows; |
|
40 | + } |
|
41 | + /** |
|
42 | + * |
|
43 | + * @return int |
|
44 | + */ |
|
45 | + public function get_cols() |
|
46 | + { |
|
47 | + return $this->_cols; |
|
48 | + } |
|
49 | 49 | |
50 | 50 | |
51 | 51 | |
52 | - /** |
|
53 | - * @param array $options_array |
|
54 | - */ |
|
55 | - public function __construct($options_array = array()) |
|
56 | - { |
|
57 | - $this->_set_display_strategy(new EE_Text_Area_Display_Strategy()); |
|
58 | - $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
52 | + /** |
|
53 | + * @param array $options_array |
|
54 | + */ |
|
55 | + public function __construct($options_array = array()) |
|
56 | + { |
|
57 | + $this->_set_display_strategy(new EE_Text_Area_Display_Strategy()); |
|
58 | + $this->_set_normalization_strategy(new EE_Text_Normalization()); |
|
59 | 59 | |
60 | 60 | |
61 | - parent::__construct($options_array); |
|
61 | + parent::__construct($options_array); |
|
62 | 62 | |
63 | - // if the input hasn't specifically mentioned a more lenient validation strategy, |
|
64 | - // apply plaintext validation strategy |
|
65 | - if ( |
|
66 | - ! $this->has_validation_strategy( |
|
67 | - array( |
|
68 | - 'EE_Full_HTML_Validation_Strategy', |
|
69 | - 'EE_Simple_HTML_Validation_Strategy' |
|
70 | - ) |
|
71 | - ) |
|
72 | - ) { |
|
73 | - // by default we use the plaintext validation. If you want something else, |
|
74 | - // just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
|
75 | - $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
76 | - } |
|
77 | - } |
|
63 | + // if the input hasn't specifically mentioned a more lenient validation strategy, |
|
64 | + // apply plaintext validation strategy |
|
65 | + if ( |
|
66 | + ! $this->has_validation_strategy( |
|
67 | + array( |
|
68 | + 'EE_Full_HTML_Validation_Strategy', |
|
69 | + 'EE_Simple_HTML_Validation_Strategy' |
|
70 | + ) |
|
71 | + ) |
|
72 | + ) { |
|
73 | + // by default we use the plaintext validation. If you want something else, |
|
74 | + // just remove it after the input is constructed :P using EE_Form_Input_Base::remove_validation_strategy() |
|
75 | + $this->_add_validation_strategy(new EE_Plaintext_Validation_Strategy()); |
|
76 | + } |
|
77 | + } |
|
78 | 78 | } |
@@ -11,21 +11,21 @@ |
||
11 | 11 | */ |
12 | 12 | class EE_Credit_Card_Month_Input extends EE_Month_Input |
13 | 13 | { |
14 | - /** |
|
15 | - * @param bool $leading_zero |
|
16 | - * @param array $input_settings |
|
17 | - * @param bool $january_is_month_1 |
|
18 | - */ |
|
19 | - public function __construct( |
|
20 | - $leading_zero = false, |
|
21 | - $input_settings = array(), |
|
22 | - $january_is_month_1 = true |
|
23 | - ) { |
|
24 | - $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
25 | - parent::__construct( |
|
26 | - $leading_zero, |
|
27 | - $input_settings, |
|
28 | - $january_is_month_1 |
|
29 | - ); |
|
30 | - } |
|
14 | + /** |
|
15 | + * @param bool $leading_zero |
|
16 | + * @param array $input_settings |
|
17 | + * @param bool $january_is_month_1 |
|
18 | + */ |
|
19 | + public function __construct( |
|
20 | + $leading_zero = false, |
|
21 | + $input_settings = array(), |
|
22 | + $january_is_month_1 = true |
|
23 | + ) { |
|
24 | + $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal()); |
|
25 | + parent::__construct( |
|
26 | + $leading_zero, |
|
27 | + $input_settings, |
|
28 | + $january_is_month_1 |
|
29 | + ); |
|
30 | + } |
|
31 | 31 | } |