Completed
Branch EDTR/input-labels (73d1b5)
by
unknown
11:26 queued 01:08
created
events_archive_caff/templates/admin-event-list-settings.template.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             </label>
51 51
         </th>
52 52
         <td>
53
-            <p><?php echo site_url() . '/ '
53
+            <p><?php echo site_url().'/ '
54 54
                           . EEH_Form_Fields::text(
55 55
                               'not_used',
56 56
                               EE_Registry::instance()->CFG->core->event_cpt_slug,
Please login to merge, or discard this patch.
Indentation   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@  discard block
 block discarded – undo
2 2
 add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 
4 4
 $values = EEH_Form_Fields::prep_answer_options(
5
-    array(
6
-        array('id' => 1, 'text' => __('Yes', 'event_espresso')),
7
-        array('id' => 0, 'text' => __('No', 'event_espresso')),
8
-    )
5
+	array(
6
+		array('id' => 1, 'text' => __('Yes', 'event_espresso')),
7
+		array('id' => 0, 'text' => __('No', 'event_espresso')),
8
+	)
9 9
 );
10 10
 
11 11
 $description = EEH_Form_Fields::prep_answer_options(
12
-    array(
13
-        array('id' => 0, 'text' => __('none', 'event_espresso')),
14
-        array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
15
-        array('id' => 2, 'text' => __('full description', 'event_espresso')),
16
-    )
12
+	array(
13
+		array('id' => 0, 'text' => __('none', 'event_espresso')),
14
+		array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
15
+		array('id' => 2, 'text' => __('full description', 'event_espresso')),
16
+	)
17 17
 );
18 18
 
19 19
 ?>
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         <th>
33 33
             <label for="event_listings_url">
34 34
                 <?php _e('Event Listings URL', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
35
-                    'event_listings_url_info'
36
-                ); ?>
35
+					'event_listings_url_info'
36
+				); ?>
37 37
             </label>
38 38
         </th>
39 39
         <td>
40 40
             <a id="event_listings_url" class="ee-admin-settings-hdr-lnk small-text"
41 41
                href="<?php echo EEH_Event_View::event_archive_url(); ?>"><?php
42
-                echo EEH_Event_View::event_archive_url(); ?></a>
42
+				echo EEH_Event_View::event_archive_url(); ?></a>
43 43
         </td>
44 44
     </tr>
45 45
 
@@ -51,30 +51,30 @@  discard block
 block discarded – undo
51 51
         </th>
52 52
         <td>
53 53
             <p><?php echo site_url() . '/ '
54
-                          . EEH_Form_Fields::text(
55
-                              'not_used',
56
-                              EE_Registry::instance()->CFG->core->event_cpt_slug,
57
-                              'event_cpt_slug',
58
-                              'event_cpt_slug',
59
-                              'regular'
60
-                          ); ?></p>
54
+						  . EEH_Form_Fields::text(
55
+							  'not_used',
56
+							  EE_Registry::instance()->CFG->core->event_cpt_slug,
57
+							  'event_cpt_slug',
58
+							  'event_cpt_slug',
59
+							  'regular'
60
+						  ); ?></p>
61 61
             <p class="description"><?php
62
-                _e(
63
-                    'This allows you to configure what slug is used for the url of all event pages.',
64
-                    'event_espresso'
65
-                ); ?></p>
62
+				_e(
63
+					'This allows you to configure what slug is used for the url of all event pages.',
64
+					'event_espresso'
65
+				); ?></p>
66 66
             <?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
67 67
                 <p class="important-notice">
68 68
                     <?php
69
-                    sprintf(
70
-                        __(
71
-                            'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
-                            'event_espresso'
73
-                        ),
74
-                        '<code>',
75
-                        '</code>'
76
-                    );
77
-                    ?>
69
+					sprintf(
70
+						__(
71
+							'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.',
72
+							'event_espresso'
73
+						),
74
+						'<code>',
75
+						'</code>'
76
+					);
77
+					?>
78 78
                 </p>
79 79
             <?php endif; ?>
80 80
         </td>
@@ -88,17 +88,17 @@  discard block
 block discarded – undo
88 88
         </th>
89 89
         <td>
90 90
             <?php echo EEH_Form_Fields::select(
91
-                'display_status_banner',
92
-                $display_status_banner,
93
-                $values,
94
-                'EED_Events_Archive_display_status_banner',
95
-                'EED_Events_Archive_display_status_banner'
96
-            ); ?>
91
+				'display_status_banner',
92
+				$display_status_banner,
93
+				$values,
94
+				'EED_Events_Archive_display_status_banner',
95
+				'EED_Events_Archive_display_status_banner'
96
+			); ?>
97 97
             <p class="description"><?php
98
-                _e(
99
-                    'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
-                    'event_espresso'
101
-                ); ?></p>
98
+				_e(
99
+					'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.',
100
+					'event_espresso'
101
+				); ?></p>
102 102
         </td>
103 103
     </tr>
104 104
 
@@ -106,18 +106,18 @@  discard block
 block discarded – undo
106 106
         <th>
107 107
             <label for="EED_Events_Archive_display_description">
108 108
                 <?php _e('Display Description', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
109
-                    'display_description_info'
110
-                ); ?>
109
+					'display_description_info'
110
+				); ?>
111 111
             </label>
112 112
         </th>
113 113
         <td>
114 114
             <?php echo EEH_Form_Fields::select(
115
-                'description',
116
-                $display_description,
117
-                $description,
118
-                'EED_Events_Archive_display_description',
119
-                'EED_Events_Archive_display_description'
120
-            ); ?>
115
+				'description',
116
+				$display_description,
117
+				$description,
118
+				'EED_Events_Archive_display_description',
119
+				'EED_Events_Archive_display_description'
120
+			); ?>
121 121
         </td>
122 122
     </tr>
123 123
 
@@ -125,18 +125,18 @@  discard block
 block discarded – undo
125 125
         <th>
126 126
             <label for="EED_Events_Archive_display_ticket_selector">
127 127
                 <?php _e('Display Ticket Selector', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
128
-                    'display_ticket_selector_info'
129
-                ); ?>
128
+					'display_ticket_selector_info'
129
+				); ?>
130 130
             </label>
131 131
         </th>
132 132
         <td>
133 133
             <?php echo EEH_Form_Fields::select(
134
-                'ticket_selector',
135
-                $display_ticket_selector,
136
-                $values,
137
-                'EED_Events_Archive_display_ticket_selector',
138
-                'EED_Events_Archive_display_ticket_selector'
139
-            ); ?>
134
+				'ticket_selector',
135
+				$display_ticket_selector,
136
+				$values,
137
+				'EED_Events_Archive_display_ticket_selector',
138
+				'EED_Events_Archive_display_ticket_selector'
139
+			); ?>
140 140
         </td>
141 141
     </tr>
142 142
 
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
         <th>
145 145
             <label for="EED_Events_Archive_display_datetimes">
146 146
                 <?php _e('Display Datetimes', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
147
-                    'display_datetimes_info'
148
-                ); ?>
147
+					'display_datetimes_info'
148
+				); ?>
149 149
             </label>
150 150
         </th>
151 151
         <td>
152 152
             <?php echo EEH_Form_Fields::select(
153
-                'venue_details',
154
-                $display_datetimes,
155
-                $values,
156
-                'EED_Events_Archive_display_datetimes',
157
-                'EED_Events_Archive_display_datetimes'
158
-            ); ?>
153
+				'venue_details',
154
+				$display_datetimes,
155
+				$values,
156
+				'EED_Events_Archive_display_datetimes',
157
+				'EED_Events_Archive_display_datetimes'
158
+			); ?>
159 159
         </td>
160 160
     </tr>
161 161
 
@@ -163,18 +163,18 @@  discard block
 block discarded – undo
163 163
         <th>
164 164
             <label for="EED_Events_Archive_display_venue">
165 165
                 <?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
166
-                    'display_venue_details_info'
167
-                ); ?>
166
+					'display_venue_details_info'
167
+				); ?>
168 168
             </label>
169 169
         </th>
170 170
         <td>
171 171
             <?php echo EEH_Form_Fields::select(
172
-                'display_venue',
173
-                $display_venue,
174
-                $values,
175
-                'EED_Events_Archive_display_venue',
176
-                'EED_Events_Archive_display_venue'
177
-            ); ?>
172
+				'display_venue',
173
+				$display_venue,
174
+				$values,
175
+				'EED_Events_Archive_display_venue',
176
+				'EED_Events_Archive_display_venue'
177
+			); ?>
178 178
         </td>
179 179
     </tr>
180 180
 
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
         <th>
183 183
             <label for="EED_Events_Archive_display_expired_events">
184 184
                 <?php _e('Display Expired Events', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link(
185
-                    'display_expired_events_info'
186
-                ); ?>
185
+					'display_expired_events_info'
186
+				); ?>
187 187
             </label>
188 188
         </th>
189 189
         <td>
190 190
             <?php echo EEH_Form_Fields::select(
191
-                'expired_events',
192
-                $display_expired_events,
193
-                $values,
194
-                'EED_Events_Archive_display_expired_events',
195
-                'EED_Events_Archive_display_expired_events'
196
-            ); ?>
191
+				'expired_events',
192
+				$display_expired_events,
193
+				$values,
194
+				'EED_Events_Archive_display_expired_events',
195
+				'EED_Events_Archive_display_expired_events'
196
+			); ?>
197 197
         </td>
198 198
     </tr>
199 199
 
@@ -201,43 +201,43 @@  discard block
 block discarded – undo
201 201
         <th>
202 202
             <label for="EED_Events_Archive_use_sortable_display_order">
203 203
                 <?php _e(
204
-                    'Use Custom Display Order?',
205
-                    'event_espresso'
206
-                ); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
204
+					'Use Custom Display Order?',
205
+					'event_espresso'
206
+				); ?><?php // echo EEH_Template::get_help_tab_link('use_sortable_display_order_info');?>
207 207
             </label>
208 208
         </th>
209 209
         <td>
210 210
             <?php echo EEH_Form_Fields::select(
211
-                'use_sortable_display_order',
212
-                $use_sortable_display_order,
213
-                $values,
214
-                'EED_Events_Archive_use_sortable_display_order',
215
-                'EED_Events_Archive_use_sortable_display_order'
216
-            ); ?>
211
+				'use_sortable_display_order',
212
+				$use_sortable_display_order,
213
+				$values,
214
+				'EED_Events_Archive_use_sortable_display_order',
215
+				'EED_Events_Archive_use_sortable_display_order'
216
+			); ?>
217 217
         </td>
218 218
     </tr>
219 219
 
220 220
     <tr>
221 221
         <th>
222 222
             <?php _e(
223
-                'Display Order',
224
-                'event_espresso'
225
-            ); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
223
+				'Display Order',
224
+				'event_espresso'
225
+			); ?><?php // echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
226 226
         </th>
227 227
         <td>
228 228
 
229 229
             <?php wp_nonce_field(
230
-                'espresso_update_event_archive_order',
231
-                'espresso_update_event_archive_order_nonce',
232
-                false
233
-            ); ?>
230
+				'espresso_update_event_archive_order',
231
+				'espresso_update_event_archive_order_nonce',
232
+				false
233
+			); ?>
234 234
             <?php echo $event_archive_display_order; ?>
235 235
 
236 236
             <p class="description"><?php
237
-                _e(
238
-                    'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
-                    'event_espresso'
240
-                ); ?></p>
237
+				_e(
238
+					'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.',
239
+					'event_espresso'
240
+				); ?></p>
241 241
 
242 242
         </td>
243 243
     </tr>
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
         </th>
251 251
         <td>
252 252
             <?php echo EEH_Form_Fields::select(
253
-                'reset_event_list_settings',
254
-                0,
255
-                $values,
256
-                'EED_Events_Archive_reset_event_list_settings',
257
-                'EED_Events_Archive_reset_event_list_settings'
258
-            ); ?>
253
+				'reset_event_list_settings',
254
+				0,
255
+				$values,
256
+				'EED_Events_Archive_reset_event_list_settings',
257
+				'EED_Events_Archive_reset_event_list_settings'
258
+			); ?>
259 259
         </td>
260 260
     </tr>
261 261
 
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/templates/recaptcha.template.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 if (! defined('EVENT_ESPRESSO_VERSION')) {
3
-    exit('No direct script access allowed');
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /** @type string $recaptcha_language */
6 6
 /** @type string $recaptcha_publickey */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /** @type string $recaptcha_language */
Please login to merge, or discard this patch.
payment_methods/Paypal_Pro/templates/paypal_pro_intro.template.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php printf(
2
-    esc_html__(
3
-        'PayPal Pro (Website Payments Pro) is an on-site payment method for accepting credit and debit cards and is available to event organizers in the United States, United Kingdom, and Canada. An account with PayPal is required to accept payments. Need a PayPal Pro account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.',
4
-        'event_espresso'
5
-    ),
6
-    '<a href="https://eventespresso.com/go/paypalpro/" target="_blank">',
7
-    '</a>'
2
+	esc_html__(
3
+		'PayPal Pro (Website Payments Pro) is an on-site payment method for accepting credit and debit cards and is available to event organizers in the United States, United Kingdom, and Canada. An account with PayPal is required to accept payments. Need a PayPal Pro account? Call 1-855-456-1338 or %1$sclick here to sign up for a merchant account%2$s.',
4
+		'event_espresso'
5
+	),
6
+	'<a href="https://eventespresso.com/go/paypalpro/" target="_blank">',
7
+	'</a>'
8 8
 );
Please login to merge, or discard this patch.
caffeinated/payment_methods/Aim/EE_PMT_Aim.pm.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 $billing_form->get_input('cvv')->set_default('123');
129 129
             }
130 130
             $billing_form->add_subsections(
131
-                array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
131
+                array('fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html()),
132 132
                 'credit_card'
133 133
             );
134 134
             $billing_form->add_subsections(
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             'html_label_text' => sprintf(__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
190 190
                             'default' => array_diff(
191 191
                                 array_keys($billing_input_names),
192
-                                array( 'address2', 'phone', 'company', 'fax' )
192
+                                array('address2', 'phone', 'company', 'fax')
193 193
                             ),
194 194
                             'html_help_text' => __('Note: if fields are excluded they cannot be required.', 'event_espresso')
195 195
                         )
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     {
250 250
         $all_billing_values_empty = array();
251 251
         foreach (array_keys($this->billing_input_names()) as $input_name) {
252
-            $all_billing_values_empty[ $input_name ] = '';
252
+            $all_billing_values_empty[$input_name] = '';
253 253
         }
254 254
         return array_merge(
255 255
             $all_billing_values_empty,
Please login to merge, or discard this patch.
Indentation   +238 added lines, -238 removed lines patch added patch discarded remove patch
@@ -12,260 +12,260 @@
 block discarded – undo
12 12
 {
13 13
 
14 14
 
15
-    /**
16
-     * @param EE_Payment_Method $pm_instance
17
-     * @return EE_PMT_Aim
18
-     * @throws \EE_Error
19
-     */
20
-    public function __construct($pm_instance = null)
21
-    {
22
-        $this->_setup_properties();
23
-        parent::__construct($pm_instance);
24
-    }
15
+	/**
16
+	 * @param EE_Payment_Method $pm_instance
17
+	 * @return EE_PMT_Aim
18
+	 * @throws \EE_Error
19
+	 */
20
+	public function __construct($pm_instance = null)
21
+	{
22
+		$this->_setup_properties();
23
+		parent::__construct($pm_instance);
24
+	}
25 25
     
26
-    /**
27
-     * Sets up payment method type properties for this gateway, which is normally
28
-     * done in the constructor, but we want this to be easy for similar gateways to override
29
-     * while still calling the parent constructor.
30
-     * So children should override this method instead of __construct
31
-     */
32
-    protected function _setup_properties()
33
-    {
34
-        require_once($this->file_folder().'EEG_Aim.gateway.php');
35
-        $this->_gateway = new EEG_Aim();
36
-        $this->_pretty_name = __("Authorize.net AIM", 'event_espresso');
37
-        $this->_default_description = __('Please provide the following billing information.', 'event_espresso');
38
-        $this->_requires_https = true;
39
-    }
26
+	/**
27
+	 * Sets up payment method type properties for this gateway, which is normally
28
+	 * done in the constructor, but we want this to be easy for similar gateways to override
29
+	 * while still calling the parent constructor.
30
+	 * So children should override this method instead of __construct
31
+	 */
32
+	protected function _setup_properties()
33
+	{
34
+		require_once($this->file_folder().'EEG_Aim.gateway.php');
35
+		$this->_gateway = new EEG_Aim();
36
+		$this->_pretty_name = __("Authorize.net AIM", 'event_espresso');
37
+		$this->_default_description = __('Please provide the following billing information.', 'event_espresso');
38
+		$this->_requires_https = true;
39
+	}
40 40
 
41 41
 
42 42
 
43
-    /**
44
-     * Creates the billing form for this payment method type
45
-     *
46
-     * @param \EE_Transaction $transaction
47
-     * @return EE_Billing_Info_Form
48
-     * @throws \EE_Error
49
-     */
50
-    public function generate_new_billing_form(EE_Transaction $transaction = null)
51
-    {
52
-        $billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array(
53
-            'name'=>'AIM_Form',
54
-            'subsections'=>array(
55
-                'credit_card'=>new EE_Credit_Card_Input(array(
56
-                    'required'=>true,
57
-                    'html_label_text' => __('Card Number', 'event_espresso')
58
-                )),
59
-                'exp_month'=>new EE_Credit_Card_Month_Input(true, array(
60
-                    'required'=>true,
61
-                    'html_label_text' => __('Expiry Month', 'event_espresso')
62
-                )),
63
-                'exp_year'=>new EE_Credit_Card_Year_Input(array(
64
-                    'required'=>true,
65
-                    'html_label_text' => __('Expiry Year', 'event_espresso')
66
-                )),
67
-                'cvv'=>new EE_CVV_Input(array(
68
-                    'required'=>true,
69
-                    'html_label_text' => __('CVV', 'event_espresso') )),
70
-            )
71
-        ));
72
-        $billing_form->add_subsections(array(
73
-            'company' => new EE_Text_Input(array(
74
-                'html_label_text' => __('Company', 'event_espresso')
75
-            ))
76
-        ), 'email', false);
77
-        $billing_form->add_subsections(
78
-            array(
79
-                    'fax' => new EE_Text_Input(array(
80
-                        'html_label_text' => __('Fax', 'event_espresso')
81
-                    ))
82
-                ),
83
-            'phone',
84
-            false
85
-        );
86
-        $settings_form = $this->settings_form();
87
-        if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
88
-                $billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value());
89
-        }
90
-        if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
91
-            $required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value();
92
-            // only change the requirement of inputs which are allowed to be changed
93
-            /** @var EE_Form_Input_Base[] $inputs_to_evaluate */
94
-            $inputs_to_evaluate = array_intersect_key(
95
-                $billing_form->inputs(),
96
-                $this->billing_input_names()
97
-            );
98
-            foreach ($inputs_to_evaluate as $input_name => $input) {
99
-                if (in_array($input_name, $required_inputs)) {
100
-                    $input->set_required(true);
101
-                } else {
102
-                    $input->set_required(false);
103
-                }
104
-            }
105
-        }
106
-        return $this->apply_billing_form_debug_settings($billing_form);
107
-    }
43
+	/**
44
+	 * Creates the billing form for this payment method type
45
+	 *
46
+	 * @param \EE_Transaction $transaction
47
+	 * @return EE_Billing_Info_Form
48
+	 * @throws \EE_Error
49
+	 */
50
+	public function generate_new_billing_form(EE_Transaction $transaction = null)
51
+	{
52
+		$billing_form = new EE_Billing_Attendee_Info_Form($this->_pm_instance, array(
53
+			'name'=>'AIM_Form',
54
+			'subsections'=>array(
55
+				'credit_card'=>new EE_Credit_Card_Input(array(
56
+					'required'=>true,
57
+					'html_label_text' => __('Card Number', 'event_espresso')
58
+				)),
59
+				'exp_month'=>new EE_Credit_Card_Month_Input(true, array(
60
+					'required'=>true,
61
+					'html_label_text' => __('Expiry Month', 'event_espresso')
62
+				)),
63
+				'exp_year'=>new EE_Credit_Card_Year_Input(array(
64
+					'required'=>true,
65
+					'html_label_text' => __('Expiry Year', 'event_espresso')
66
+				)),
67
+				'cvv'=>new EE_CVV_Input(array(
68
+					'required'=>true,
69
+					'html_label_text' => __('CVV', 'event_espresso') )),
70
+			)
71
+		));
72
+		$billing_form->add_subsections(array(
73
+			'company' => new EE_Text_Input(array(
74
+				'html_label_text' => __('Company', 'event_espresso')
75
+			))
76
+		), 'email', false);
77
+		$billing_form->add_subsections(
78
+			array(
79
+					'fax' => new EE_Text_Input(array(
80
+						'html_label_text' => __('Fax', 'event_espresso')
81
+					))
82
+				),
83
+			'phone',
84
+			false
85
+		);
86
+		$settings_form = $this->settings_form();
87
+		if ($settings_form->get_input('excluded_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
88
+				$billing_form->exclude($settings_form->get_input('excluded_billing_inputs')->normalized_value());
89
+		}
90
+		if ($settings_form->get_input('required_billing_inputs') instanceof EE_Checkbox_Multi_Input) {
91
+			$required_inputs = $settings_form->get_input('required_billing_inputs')->normalized_value();
92
+			// only change the requirement of inputs which are allowed to be changed
93
+			/** @var EE_Form_Input_Base[] $inputs_to_evaluate */
94
+			$inputs_to_evaluate = array_intersect_key(
95
+				$billing_form->inputs(),
96
+				$this->billing_input_names()
97
+			);
98
+			foreach ($inputs_to_evaluate as $input_name => $input) {
99
+				if (in_array($input_name, $required_inputs)) {
100
+					$input->set_required(true);
101
+				} else {
102
+					$input->set_required(false);
103
+				}
104
+			}
105
+		}
106
+		return $this->apply_billing_form_debug_settings($billing_form);
107
+	}
108 108
 
109 109
 
110 110
 
111
-    /**
112
-     * apply_billing_form_debug_settings
113
-     * applies debug data to the form
114
-     *
115
-     * @param \EE_Billing_Info_Form $billing_form
116
-     * @return \EE_Billing_Info_Form
117
-     * @throws \EE_Error
118
-     */
119
-    public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form)
120
-    {
121
-        if ($this->_pm_instance->debug_mode()
122
-            || $this->_pm_instance->get_extra_meta('test_transactions', true, false)
123
-        ) {
124
-            $billing_form->get_input('credit_card')->set_default('4007000000027');
125
-            $billing_form->get_input('exp_year')->set_default('2020');
126
-            if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) {
127
-                $billing_form->get_input('cvv')->set_default('123');
128
-            }
129
-            $billing_form->add_subsections(
130
-                array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
131
-                'credit_card'
132
-            );
133
-            $billing_form->add_subsections(
134
-                array(
135
-                    'debug_content' => new EE_Form_Section_HTML_From_Template(
136
-                        __DIR__.'/templates/authorize_net_aim_debug_info.template.php'
137
-                    )
138
-                ),
139
-                'first_name'
140
-            );
141
-        }
142
-        return $billing_form;
143
-    }
111
+	/**
112
+	 * apply_billing_form_debug_settings
113
+	 * applies debug data to the form
114
+	 *
115
+	 * @param \EE_Billing_Info_Form $billing_form
116
+	 * @return \EE_Billing_Info_Form
117
+	 * @throws \EE_Error
118
+	 */
119
+	public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form)
120
+	{
121
+		if ($this->_pm_instance->debug_mode()
122
+			|| $this->_pm_instance->get_extra_meta('test_transactions', true, false)
123
+		) {
124
+			$billing_form->get_input('credit_card')->set_default('4007000000027');
125
+			$billing_form->get_input('exp_year')->set_default('2020');
126
+			if ($billing_form->get_subsection('cvv') instanceof EE_Form_Input_Base) {
127
+				$billing_form->get_input('cvv')->set_default('123');
128
+			}
129
+			$billing_form->add_subsections(
130
+				array( 'fyi_about_autofill' => $billing_form->payment_fields_autofilled_notice_html() ),
131
+				'credit_card'
132
+			);
133
+			$billing_form->add_subsections(
134
+				array(
135
+					'debug_content' => new EE_Form_Section_HTML_From_Template(
136
+						__DIR__.'/templates/authorize_net_aim_debug_info.template.php'
137
+					)
138
+				),
139
+				'first_name'
140
+			);
141
+		}
142
+		return $billing_form;
143
+	}
144 144
 
145 145
 
146 146
 
147
-    /**
148
-     * Gets the form for all the settings related to this payment method type
149
-     * @return EE_Payment_Method_Form
150
-     */
151
-    public function generate_new_settings_form()
152
-    {
153
-        $billing_input_names = $this->billing_input_names();
154
-        return new EE_Payment_Method_Form(
155
-            array(
156
-                'extra_meta_inputs'=>array(
157
-                    'login_id'=>new EE_Text_Input(
158
-                        array(
159
-                            'html_label_text'=>  sprintf(__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()),
160
-                            'required' => true )
161
-                    ),
162
-                    'transaction_key'=>new EE_Text_Input(
163
-                        array(
164
-                            'html_label_text'=> sprintf(__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()),
165
-                            'required' => true )
166
-                    ),
167
-                    'test_transactions'=>new EE_Yes_No_Input(
168
-                        array(
169
-                            'html_label_text'=>  sprintf(__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()),
170
-                            'html_help_text'=>  __("Send test transactions, even to live server", 'event_espresso'),
171
-                            'default' => false,
172
-                            'required' => true
173
-                        )
174
-                    ),
175
-                    'excluded_billing_inputs' => new EE_Checkbox_Multi_Input(
176
-                        $billing_input_names,
177
-                        array(
178
-                        'html_label_text' => sprintf(__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
179
-                        'default' => array(
180
-                            'company',
181
-                            'fax',
182
-                        )
183
-                        )
184
-                    ),
185
-                    'required_billing_inputs' => new EE_Checkbox_Multi_Input(
186
-                        $billing_input_names,
187
-                        array(
188
-                            'html_label_text' => sprintf(__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
189
-                            'default' => array_diff(
190
-                                array_keys($billing_input_names),
191
-                                array( 'address2', 'phone', 'company', 'fax' )
192
-                            ),
193
-                            'html_help_text' => __('Note: if fields are excluded they cannot be required.', 'event_espresso')
194
-                        )
195
-                    ),
196
-                )
197
-            )
198
-        );
199
-    }
147
+	/**
148
+	 * Gets the form for all the settings related to this payment method type
149
+	 * @return EE_Payment_Method_Form
150
+	 */
151
+	public function generate_new_settings_form()
152
+	{
153
+		$billing_input_names = $this->billing_input_names();
154
+		return new EE_Payment_Method_Form(
155
+			array(
156
+				'extra_meta_inputs'=>array(
157
+					'login_id'=>new EE_Text_Input(
158
+						array(
159
+							'html_label_text'=>  sprintf(__("Authorize.net API Login ID %s", "event_espresso"), $this->get_help_tab_link()),
160
+							'required' => true )
161
+					),
162
+					'transaction_key'=>new EE_Text_Input(
163
+						array(
164
+							'html_label_text'=> sprintf(__("Authorize.net Transaction Key %s", "event_espresso"), $this->get_help_tab_link()),
165
+							'required' => true )
166
+					),
167
+					'test_transactions'=>new EE_Yes_No_Input(
168
+						array(
169
+							'html_label_text'=>  sprintf(__("Send test transactions? %s", 'event_espresso'), $this->get_help_tab_link()),
170
+							'html_help_text'=>  __("Send test transactions, even to live server", 'event_espresso'),
171
+							'default' => false,
172
+							'required' => true
173
+						)
174
+					),
175
+					'excluded_billing_inputs' => new EE_Checkbox_Multi_Input(
176
+						$billing_input_names,
177
+						array(
178
+						'html_label_text' => sprintf(__("Excluded Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
179
+						'default' => array(
180
+							'company',
181
+							'fax',
182
+						)
183
+						)
184
+					),
185
+					'required_billing_inputs' => new EE_Checkbox_Multi_Input(
186
+						$billing_input_names,
187
+						array(
188
+							'html_label_text' => sprintf(__("Required Payment Form Fields %s", 'event_espresso'), $this->get_help_tab_link()),
189
+							'default' => array_diff(
190
+								array_keys($billing_input_names),
191
+								array( 'address2', 'phone', 'company', 'fax' )
192
+							),
193
+							'html_help_text' => __('Note: if fields are excluded they cannot be required.', 'event_espresso')
194
+						)
195
+					),
196
+				)
197
+			)
198
+		);
199
+	}
200 200
     
201
-    /**
202
-     * Returns an array where keys are the slugs for billing inputs, and values
203
-     * are their i18n names
204
-     * @return array
205
-     */
206
-    public function billing_input_names()
207
-    {
208
-        return array(
209
-            'first_name' => __('First Name', 'event_espresso'),
210
-            'last_name' => __('Last Name', 'event_espresso'),
211
-            'email' => __('Email', 'event_espresso'),
212
-            'company' => __('Company', 'event_espresso'),
213
-            'address' => __('Address', 'event_espresso'),
214
-            'address2' => __('Address2', 'event_espresso'),
215
-            'city' => __('City', 'event_espresso'),
216
-            'state' => __('State', 'event_espresso'),
217
-            'country' => __('Country', 'event_espresso'),
218
-            'zip' =>  __('Zip', 'event_espresso'),
219
-            'phone' => __('Phone', 'event_espresso'),
220
-            'fax' => __('Fax', 'event_espresso'),
221
-            'cvv' => __('CVV', 'event_espresso')
222
-        );
223
-    }
201
+	/**
202
+	 * Returns an array where keys are the slugs for billing inputs, and values
203
+	 * are their i18n names
204
+	 * @return array
205
+	 */
206
+	public function billing_input_names()
207
+	{
208
+		return array(
209
+			'first_name' => __('First Name', 'event_espresso'),
210
+			'last_name' => __('Last Name', 'event_espresso'),
211
+			'email' => __('Email', 'event_espresso'),
212
+			'company' => __('Company', 'event_espresso'),
213
+			'address' => __('Address', 'event_espresso'),
214
+			'address2' => __('Address2', 'event_espresso'),
215
+			'city' => __('City', 'event_espresso'),
216
+			'state' => __('State', 'event_espresso'),
217
+			'country' => __('Country', 'event_espresso'),
218
+			'zip' =>  __('Zip', 'event_espresso'),
219
+			'phone' => __('Phone', 'event_espresso'),
220
+			'fax' => __('Fax', 'event_espresso'),
221
+			'cvv' => __('CVV', 'event_espresso')
222
+		);
223
+	}
224 224
     
225
-    /**
226
-     * Overrides parent so we always have all billing inputs in the returned array,
227
-     * not just the ones included at the time. This helps simplify the gateway code
228
-     *
229
-     * @param EE_Billing_Info_Form $billing_form
230
-     * @return array
231
-     */
232
-    protected function _get_billing_values_from_form($billing_form)
233
-    {
234
-        $all_billing_values_empty = array();
235
-        foreach (array_keys($this->billing_input_names()) as $input_name) {
236
-            $all_billing_values_empty[ $input_name ] = '';
237
-        }
238
-        return array_merge(
239
-            $all_billing_values_empty,
240
-            parent::_get_billing_values_from_form($billing_form)
241
-        );
242
-    }
225
+	/**
226
+	 * Overrides parent so we always have all billing inputs in the returned array,
227
+	 * not just the ones included at the time. This helps simplify the gateway code
228
+	 *
229
+	 * @param EE_Billing_Info_Form $billing_form
230
+	 * @return array
231
+	 */
232
+	protected function _get_billing_values_from_form($billing_form)
233
+	{
234
+		$all_billing_values_empty = array();
235
+		foreach (array_keys($this->billing_input_names()) as $input_name) {
236
+			$all_billing_values_empty[ $input_name ] = '';
237
+		}
238
+		return array_merge(
239
+			$all_billing_values_empty,
240
+			parent::_get_billing_values_from_form($billing_form)
241
+		);
242
+	}
243 243
 
244 244
 
245 245
 
246
-    /**
247
-     * Adds the help tab
248
-     * @see EE_PMT_Base::help_tabs_config()
249
-     * @return array
250
-     */
251
-    public function help_tabs_config()
252
-    {
253
-        return array(
254
-            $this->get_help_tab_name() => array(
255
-                'title' => __('Authorize.net AIM Settings', 'event_espresso'),
256
-                'filename' => 'payment_methods_overview_aim'
257
-            ),
258
-        );
259
-    }
246
+	/**
247
+	 * Adds the help tab
248
+	 * @see EE_PMT_Base::help_tabs_config()
249
+	 * @return array
250
+	 */
251
+	public function help_tabs_config()
252
+	{
253
+		return array(
254
+			$this->get_help_tab_name() => array(
255
+				'title' => __('Authorize.net AIM Settings', 'event_espresso'),
256
+				'filename' => 'payment_methods_overview_aim'
257
+			),
258
+		);
259
+	}
260 260
 
261 261
 
262 262
 
263
-    /**
264
-     * Gets a list of instructions and/or information regarding how the payment is to be completed
265
-     * @return string
266
-     */
267
-    public function payment_information()
268
-    {
269
-        // TODO: Implement payment_information() method.
270
-    }
263
+	/**
264
+	 * Gets a list of instructions and/or information regarding how the payment is to be completed
265
+	 * @return string
266
+	 */
267
+	public function payment_information()
268
+	{
269
+		// TODO: Implement payment_information() method.
270
+	}
271 271
 }
Please login to merge, or discard this patch.
payment_methods/Aim/templates/authorize_net_aim_debug_info.template.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
 
18 18
         <p>
19 19
             <?php _e(
20
-                'Test Mode allows you to submit test transactions to the payment gateway. Transactions that are submitted while Test Mode is ON are NOT actually processed. The result of a transaction depends on the card number submitted, and the invoice amount. If you want a transaction to be approved, use one of the following card numbers.',
21
-                'event_espresso'
22
-            ); ?>
20
+				'Test Mode allows you to submit test transactions to the payment gateway. Transactions that are submitted while Test Mode is ON are NOT actually processed. The result of a transaction depends on the card number submitted, and the invoice amount. If you want a transaction to be approved, use one of the following card numbers.',
21
+				'event_espresso'
22
+			); ?>
23 23
         </p>
24 24
 
25 25
         <p>
Please login to merge, or discard this patch.
caffeinated/payment_methods/Aim/templates/aim_intro.template.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php printf(
2
-    esc_html__(
3
-        'Authorize.Net AIM is an on-site payment method for accepting credit and debit card payments and is available to event organizers in the United States, Canada, United Kingdom, and Australia. An account with Authorize.Net is required to accept payments. Need an Authorize.Net account? %1$sClick here to sign up for a merchant account%2$s.',
4
-        'event_espresso'
5
-    ),
6
-    '<a href="https://eventespresso.com/go/authorizenetaim/" target="_blank">',
7
-    '</a>'
2
+	esc_html__(
3
+		'Authorize.Net AIM is an on-site payment method for accepting credit and debit card payments and is available to event organizers in the United States, Canada, United Kingdom, and Australia. An account with Authorize.Net is required to accept payments. Need an Authorize.Net account? %1$sClick here to sign up for a merchant account%2$s.',
4
+		'event_espresso'
5
+	),
6
+	'<a href="https://eventespresso.com/go/authorizenetaim/" target="_blank">',
7
+	'</a>'
8 8
 );
Please login to merge, or discard this patch.
messages/defaults/default/html_receipt_ticket_line_item_pms.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <tr class="item">
7 7
     <td>[LINE_ITEM_NAME][LINE_ITEM_TAXABLE_*]</td>
8 8
     <td colspan="2">[LINE_ITEM_DESCRIPTION]
9
-        <p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), '[TKT_USES_* schema=' . __('any', 'event_espresso') . ']'); ?></p>
9
+        <p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), '[TKT_USES_* schema='.__('any', 'event_espresso').']'); ?></p>
10 10
     </td>
11 11
     <td class="item_c">[LINE_ITEM_QUANTITY]</td>
12 12
     <td class="item_c">[LINE_ITEM_AMOUNT]</td>
Please login to merge, or discard this patch.
core/services/collections/CollectionInterface.php 1 patch
Indentation   +155 added lines, -155 removed lines patch added patch discarded remove patch
@@ -16,159 +16,159 @@
 block discarded – undo
16 16
 interface CollectionInterface extends Countable, Iterator, Serializable, ArrayAccess
17 17
 {
18 18
 
19
-    /**
20
-     * add
21
-     * attaches an object to the Collection
22
-     * and sets any supplied data associated with the current iterator entry
23
-     * by calling EE_Object_Collection::set_identifier()
24
-     *
25
-     * @access public
26
-     * @param        $object
27
-     * @param  mixed $identifier
28
-     * @return bool
29
-     */
30
-    public function add($object, $identifier = null);
31
-
32
-    /**
33
-     * setIdentifier
34
-     * Sets the data associated with an object in the Collection
35
-     * if no $identifier is supplied, then the spl_object_hash() is used
36
-     *
37
-     * @access public
38
-     * @param        $object
39
-     * @param  mixed $identifier
40
-     * @return bool
41
-     */
42
-    public function setIdentifier($object, $identifier = null);
43
-
44
-    /**
45
-     * get
46
-     * finds and returns an object in the Collection based on the identifier that was set using addObject()
47
-     * PLZ NOTE: the pointer is reset to the beginning of the collection before returning
48
-     *
49
-     * @access public
50
-     * @param mixed $identifier
51
-     * @return mixed
52
-     */
53
-    public function get($identifier);
54
-
55
-    /**
56
-     * has
57
-     * returns TRUE or FALSE
58
-     * depending on whether the object is within the Collection
59
-     * based on the supplied $identifier
60
-     *
61
-     * @access public
62
-     * @param  mixed $identifier
63
-     * @return bool
64
-     */
65
-    public function has($identifier);
66
-
67
-    /**
68
-     * hasObject
69
-     * returns TRUE or FALSE depending on whether the supplied object is within the Collection
70
-     *
71
-     * @access public
72
-     * @param $object
73
-     * @return bool
74
-     */
75
-    public function hasObject($object);
76
-
77
-    /**
78
-     * remove
79
-     * detaches an object from the Collection
80
-     *
81
-     * @access public
82
-     * @param $object
83
-     * @return bool
84
-     */
85
-    public function remove($object);
86
-
87
-    /**
88
-     * setCurrent
89
-     * advances pointer to the object whose identifier matches that which was provided
90
-     *
91
-     * @access public
92
-     * @param mixed $identifier
93
-     * @return boolean
94
-     */
95
-    public function setCurrent($identifier);
96
-
97
-    /**
98
-     * setCurrentUsingObject
99
-     * advances pointer to the provided object
100
-     *
101
-     * @access public
102
-     * @param $object
103
-     * @return boolean
104
-     */
105
-    public function setCurrentUsingObject($object);
106
-
107
-    /**
108
-     * Returns the object occupying the index before the current object,
109
-     * unless this is already the first object, in which case it just returns the first object
110
-     *
111
-     * @return mixed
112
-     */
113
-    public function previous();
114
-
115
-        /**
116
-     * Returns the index of a given object, or false if not found
117
-     *
118
-     * @see http://stackoverflow.com/a/8736013
119
-     * @param $object
120
-     * @return boolean|int|string
121
-     */
122
-    public function indexOf($object);
123
-
124
-
125
-    /**
126
-     * Returns the object at the given index
127
-     *
128
-     * @see http://stackoverflow.com/a/8736013
129
-     * @param $index
130
-     * @return mixed
131
-     */
132
-    public function objectAtIndex($index);
133
-
134
-    /**
135
-     * Returns the sequence of objects as specified by the offset and length
136
-     *
137
-     * @see http://stackoverflow.com/a/8736013
138
-     * @param int $offset
139
-     * @param int $length
140
-     * @return array
141
-     */
142
-    public function slice($offset, $length);
143
-
144
-    /**
145
-     * Inserts an object (or an array of objects) at a certain point
146
-     *
147
-     * @see http://stackoverflow.com/a/8736013
148
-     * @param mixed   $objects A single object or an array of objects
149
-     * @param integer $index
150
-     */
151
-    public function insertAt($objects, $index);
152
-
153
-    /**
154
-     * Removes the object at the given index
155
-     *
156
-     * @see http://stackoverflow.com/a/8736013
157
-     * @param integer $index
158
-     */
159
-    public function removeAt($index);
160
-
161
-
162
-
163
-    /**
164
-     * detaches ALL objects from the Collection
165
-     */
166
-    public function detachAll();
167
-
168
-
169
-
170
-    /**
171
-     * unsets and detaches ALL objects from the Collection
172
-     */
173
-    public function trashAndDetachAll();
19
+	/**
20
+	 * add
21
+	 * attaches an object to the Collection
22
+	 * and sets any supplied data associated with the current iterator entry
23
+	 * by calling EE_Object_Collection::set_identifier()
24
+	 *
25
+	 * @access public
26
+	 * @param        $object
27
+	 * @param  mixed $identifier
28
+	 * @return bool
29
+	 */
30
+	public function add($object, $identifier = null);
31
+
32
+	/**
33
+	 * setIdentifier
34
+	 * Sets the data associated with an object in the Collection
35
+	 * if no $identifier is supplied, then the spl_object_hash() is used
36
+	 *
37
+	 * @access public
38
+	 * @param        $object
39
+	 * @param  mixed $identifier
40
+	 * @return bool
41
+	 */
42
+	public function setIdentifier($object, $identifier = null);
43
+
44
+	/**
45
+	 * get
46
+	 * finds and returns an object in the Collection based on the identifier that was set using addObject()
47
+	 * PLZ NOTE: the pointer is reset to the beginning of the collection before returning
48
+	 *
49
+	 * @access public
50
+	 * @param mixed $identifier
51
+	 * @return mixed
52
+	 */
53
+	public function get($identifier);
54
+
55
+	/**
56
+	 * has
57
+	 * returns TRUE or FALSE
58
+	 * depending on whether the object is within the Collection
59
+	 * based on the supplied $identifier
60
+	 *
61
+	 * @access public
62
+	 * @param  mixed $identifier
63
+	 * @return bool
64
+	 */
65
+	public function has($identifier);
66
+
67
+	/**
68
+	 * hasObject
69
+	 * returns TRUE or FALSE depending on whether the supplied object is within the Collection
70
+	 *
71
+	 * @access public
72
+	 * @param $object
73
+	 * @return bool
74
+	 */
75
+	public function hasObject($object);
76
+
77
+	/**
78
+	 * remove
79
+	 * detaches an object from the Collection
80
+	 *
81
+	 * @access public
82
+	 * @param $object
83
+	 * @return bool
84
+	 */
85
+	public function remove($object);
86
+
87
+	/**
88
+	 * setCurrent
89
+	 * advances pointer to the object whose identifier matches that which was provided
90
+	 *
91
+	 * @access public
92
+	 * @param mixed $identifier
93
+	 * @return boolean
94
+	 */
95
+	public function setCurrent($identifier);
96
+
97
+	/**
98
+	 * setCurrentUsingObject
99
+	 * advances pointer to the provided object
100
+	 *
101
+	 * @access public
102
+	 * @param $object
103
+	 * @return boolean
104
+	 */
105
+	public function setCurrentUsingObject($object);
106
+
107
+	/**
108
+	 * Returns the object occupying the index before the current object,
109
+	 * unless this is already the first object, in which case it just returns the first object
110
+	 *
111
+	 * @return mixed
112
+	 */
113
+	public function previous();
114
+
115
+		/**
116
+		 * Returns the index of a given object, or false if not found
117
+		 *
118
+		 * @see http://stackoverflow.com/a/8736013
119
+		 * @param $object
120
+		 * @return boolean|int|string
121
+		 */
122
+	public function indexOf($object);
123
+
124
+
125
+	/**
126
+	 * Returns the object at the given index
127
+	 *
128
+	 * @see http://stackoverflow.com/a/8736013
129
+	 * @param $index
130
+	 * @return mixed
131
+	 */
132
+	public function objectAtIndex($index);
133
+
134
+	/**
135
+	 * Returns the sequence of objects as specified by the offset and length
136
+	 *
137
+	 * @see http://stackoverflow.com/a/8736013
138
+	 * @param int $offset
139
+	 * @param int $length
140
+	 * @return array
141
+	 */
142
+	public function slice($offset, $length);
143
+
144
+	/**
145
+	 * Inserts an object (or an array of objects) at a certain point
146
+	 *
147
+	 * @see http://stackoverflow.com/a/8736013
148
+	 * @param mixed   $objects A single object or an array of objects
149
+	 * @param integer $index
150
+	 */
151
+	public function insertAt($objects, $index);
152
+
153
+	/**
154
+	 * Removes the object at the given index
155
+	 *
156
+	 * @see http://stackoverflow.com/a/8736013
157
+	 * @param integer $index
158
+	 */
159
+	public function removeAt($index);
160
+
161
+
162
+
163
+	/**
164
+	 * detaches ALL objects from the Collection
165
+	 */
166
+	public function detachAll();
167
+
168
+
169
+
170
+	/**
171
+	 * unsets and detaches ALL objects from the Collection
172
+	 */
173
+	public function trashAndDetachAll();
174 174
 }
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/policy/PrivacyPolicy.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         }
74 74
         $session_lifespan_in_hours = round($this->session_lifespan->inSeconds() / HOUR_IN_SECONDS);
75 75
         return (string) EEH_Template::display_template(
76
-            __DIR__ . '/privacy_policy.template.php',
76
+            __DIR__.'/privacy_policy.template.php',
77 77
             array(
78 78
                 'active_onsite_payment_methods' => $active_onsite_pms,
79 79
                 'active_offsite_payment_methods' => $active_offsite_pms,
Please login to merge, or discard this patch.
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -20,80 +20,80 @@
 block discarded – undo
20 20
 class PrivacyPolicy implements PrivacyPolicyInterface
21 21
 {
22 22
 
23
-    /**
24
-     * @var EEM_Payment_Method
25
-     */
26
-    protected $payment_method_model;
23
+	/**
24
+	 * @var EEM_Payment_Method
25
+	 */
26
+	protected $payment_method_model;
27 27
 
28
-    /**
29
-     * @var SessionLifespan
30
-     */
31
-    protected $session_lifespan;
28
+	/**
29
+	 * @var SessionLifespan
30
+	 */
31
+	protected $session_lifespan;
32 32
 
33
-    /**
34
-     * PrivacyPolicy constructor.
35
-     *
36
-     * @param EEM_Payment_Method $payment_method_model
37
-     * @param SessionLifespan    $session_lifespan
38
-     */
39
-    public function __construct(EEM_Payment_Method $payment_method_model, SessionLifespan $session_lifespan)
40
-    {
41
-        $this->payment_method_model = $payment_method_model;
42
-        $this->session_lifespan = $session_lifespan;
43
-    }
33
+	/**
34
+	 * PrivacyPolicy constructor.
35
+	 *
36
+	 * @param EEM_Payment_Method $payment_method_model
37
+	 * @param SessionLifespan    $session_lifespan
38
+	 */
39
+	public function __construct(EEM_Payment_Method $payment_method_model, SessionLifespan $session_lifespan)
40
+	{
41
+		$this->payment_method_model = $payment_method_model;
42
+		$this->session_lifespan = $session_lifespan;
43
+	}
44 44
 
45 45
 
46
-    /**
47
-     * Returns the name of the plugin and will be shown in the privacy policy's postbox header
48
-     *
49
-     * @return string
50
-     */
51
-    public function getName()
52
-    {
53
-        return esc_html__('Event Espresso', 'event_espresso');
54
-    }
46
+	/**
47
+	 * Returns the name of the plugin and will be shown in the privacy policy's postbox header
48
+	 *
49
+	 * @return string
50
+	 */
51
+	public function getName()
52
+	{
53
+		return esc_html__('Event Espresso', 'event_espresso');
54
+	}
55 55
 
56 56
 
57
-    /**
58
-     * Gets the HTML for the privacy policy. May be dynamic
59
-     *
60
-     * @return string
61
-     */
62
-    public function getContent()
63
-    {
64
-        // do they have any offsite payment methods? or onsite payment methods?
65
-        $active_payment_methods = $this->payment_method_model->get_all_active(EEM_Payment_Method::scope_cart);
66
-        $active_onsite_pms = array();
67
-        $active_offsite_pms = array();
68
-        foreach ($active_payment_methods as $payment_method) {
69
-            if ($payment_method->type_obj() instanceof \EE_PMT_Base) {
70
-                if ($payment_method->type_obj()->get_gateway() instanceof EE_Onsite_Gateway) {
71
-                    $active_onsite_pms[] = $payment_method->name();
72
-                } elseif ($payment_method->type_obj()->get_gateway() instanceof EE_Offsite_Gateway) {
73
-                    $active_offsite_pms[] = $payment_method->name();
74
-                }
75
-            }
76
-        }
77
-        $session_lifespan_in_hours = round($this->session_lifespan->inSeconds() / HOUR_IN_SECONDS);
78
-        return (string) EEH_Template::display_template(
79
-            __DIR__ . '/privacy_policy.template.php',
80
-            array(
81
-                'active_onsite_payment_methods' => $active_onsite_pms,
82
-                'active_offsite_payment_methods' => $active_offsite_pms,
83
-                'session_lifespan' => sprintf(
84
-                    _nx(
85
-                        '%1$s hour',
86
-                        '%1$s hours',
87
-                        $session_lifespan_in_hours,
88
-                        '2 hours',
89
-                        'event_espresso'
90
-                    ),
91
-                    $session_lifespan_in_hours
92
-                )
93
-            ),
94
-            true
95
-        );
96
-    }
57
+	/**
58
+	 * Gets the HTML for the privacy policy. May be dynamic
59
+	 *
60
+	 * @return string
61
+	 */
62
+	public function getContent()
63
+	{
64
+		// do they have any offsite payment methods? or onsite payment methods?
65
+		$active_payment_methods = $this->payment_method_model->get_all_active(EEM_Payment_Method::scope_cart);
66
+		$active_onsite_pms = array();
67
+		$active_offsite_pms = array();
68
+		foreach ($active_payment_methods as $payment_method) {
69
+			if ($payment_method->type_obj() instanceof \EE_PMT_Base) {
70
+				if ($payment_method->type_obj()->get_gateway() instanceof EE_Onsite_Gateway) {
71
+					$active_onsite_pms[] = $payment_method->name();
72
+				} elseif ($payment_method->type_obj()->get_gateway() instanceof EE_Offsite_Gateway) {
73
+					$active_offsite_pms[] = $payment_method->name();
74
+				}
75
+			}
76
+		}
77
+		$session_lifespan_in_hours = round($this->session_lifespan->inSeconds() / HOUR_IN_SECONDS);
78
+		return (string) EEH_Template::display_template(
79
+			__DIR__ . '/privacy_policy.template.php',
80
+			array(
81
+				'active_onsite_payment_methods' => $active_onsite_pms,
82
+				'active_offsite_payment_methods' => $active_offsite_pms,
83
+				'session_lifespan' => sprintf(
84
+					_nx(
85
+						'%1$s hour',
86
+						'%1$s hours',
87
+						$session_lifespan_in_hours,
88
+						'2 hours',
89
+						'event_espresso'
90
+					),
91
+					$session_lifespan_in_hours
92
+				)
93
+			),
94
+			true
95
+		);
96
+	}
97 97
 }
98 98
 // End of file PrivacyPolicy.php
99 99
 // Location: EventEspresso\core\domain\services\admin\privacy\policy\PrivacyPolicy.php
Please login to merge, or discard this patch.