Completed
Branch TASK/skeleton-addon-missing-fi... (568b78)
by
unknown
104:24 queued 89:25
created
acceptance_tests/Helpers/MessagesAdmin.php 1 patch
Indentation   +290 added lines, -290 removed lines patch added patch discarded remove patch
@@ -10,294 +10,294 @@
 block discarded – undo
10 10
  */
11 11
 trait MessagesAdmin
12 12
 {
13
-    /**
14
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
15
-     *                                  a string.
16
-     */
17
-    public function amOnMessagesActivityListTablePage($additional_params = '')
18
-    {
19
-        $this->actor()->amOnAdminPage(MessagesPage::messageActivityListTableUrl($additional_params));
20
-    }
21
-
22
-    /**
23
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
24
-     *                                  a string.
25
-     */
26
-    public function amOnDefaultMessageTemplateListTablePage($additional_params = '')
27
-    {
28
-        $this->actor()->amOnAdminPage(MessagesPage::defaultMessageTemplateListTableUrl($additional_params));
29
-    }
30
-
31
-
32
-    /**
33
-     * @param string $additional_params Any additional request parameters for the generated url should be included as
34
-     *                                  a string.
35
-     */
36
-    public function amOnCustomMessageTemplateListTablePage($additional_params = '')
37
-    {
38
-        $this->actor()->amOnAdminPage(MessagesPage::customMessageTemplateListTableUrl($additional_params));
39
-    }
40
-
41
-
42
-    /**
43
-     * Directs to message settings page
44
-     */
45
-    public function amOnMessageSettingsPage()
46
-    {
47
-        $this->actor()->amOnAdminPage(MessagesPage::messageSettingsUrl());
48
-    }
49
-
50
-
51
-    public function activateMessageTypeForMessenger($message_type_slug, $messenger_slug = 'email')
52
-    {
53
-        $this->actor()->dragAndDrop(
54
-            MessagesPage::draggableSettingsBoxSelectorForMessageTypeAndMessenger($message_type_slug, $messenger_slug),
55
-            MessagesPage::MESSAGES_SETTINGS_ACTIVE_MESSAGE_TYPES_CONTAINER_SELECTOR
56
-        );
57
-    }
58
-
59
-
60
-    /**
61
-     * Assumes you are already on the list table page that has the ui for editing the template.
62
-     * @param string $message_type_slug
63
-     * @param string $context [optional] if you want to click directly to the given context in the editor
64
-     */
65
-    public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '')
66
-    {
67
-        $this->actor()->click(MessagesPage::editMessageTemplateClassByMessageType($message_type_slug, $context));
68
-    }
69
-
70
-
71
-    /**
72
-     * Use this action to verify that the count for the given text in the specified field is as expected.  For example
73
-     * filling the condition of, "There should only be 1 instance of `[email protected]` in all the 'to' column.
74
-     *
75
-     * @param int    $expected_occurence_count
76
-     * @param string $text_to_check_for
77
-     * @param string $field
78
-     * @param string $message_type_label
79
-     * @param string $message_status
80
-     * @param string $messenger
81
-     * @param string $context
82
-     */
83
-    public function verifyMatchingCountofTextInMessageActivityListTableFor(
84
-        $expected_occurence_count,
85
-        $text_to_check_for,
86
-        $field,
87
-        $message_type_label,
88
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
89
-        $messenger = 'Email',
90
-        $context = 'Event Admin'
91
-    ) {
92
-        $elements = $this->actor()->grabMultiple(MessagesPage::messagesActivityListTableCellSelectorFor(
93
-            $field,
94
-            $message_type_label,
95
-            $message_status,
96
-            $messenger,
97
-            $context,
98
-            $text_to_check_for,
99
-            0
100
-        ));
101
-        $actual_count = count($elements);
102
-        $this->actor()->assertEquals(
103
-            $expected_occurence_count,
104
-            $actual_count,
105
-            sprintf(
106
-                'Expected %s of the %s text for the %s field but there were actually %s counted.',
107
-                $expected_occurence_count,
108
-                $text_to_check_for,
109
-                $field,
110
-                $actual_count
111
-            )
112
-        );
113
-    }
114
-
115
-
116
-    /**
117
-     * This will create a custom message template for the given messenger and message type from the context of the
118
-     * default (global) message template list table.
119
-     * Also takes care of verifying the template was created.
120
-     * @param string $message_type_label
121
-     * @param string $messenger_label
122
-     */
123
-    public function createCustomMessageTemplateFromDefaultFor($message_type_label, $messenger_label)
124
-    {
125
-        $this->amOnDefaultMessageTemplateListTablePage();
126
-        $this->actor()->click(
127
-            MessagesPage::createCustomButtonForMessageTypeAndMessenger(
128
-                $message_type_label,
129
-                $messenger_label
130
-            )
131
-        );
132
-        $this->actor()->seeInField('#title', 'New Custom Template');
133
-    }
134
-
135
-
136
-    /**
137
-     * This switches the context of the current messages template to the given reference.
138
-     * @param string $context_reference  This should be the visible label for the option.
139
-     */
140
-    public function switchContextTo($context_reference)
141
-    {
142
-        $this->actor()->selectOption(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR, $context_reference);
143
-        $this->actor()->click(MessagesPage::MESSAGES_CONTEXT_SWITCHER_BUTTON_SELECTOR);
144
-        $this->actor()->waitForText($context_reference, 10, 'h1');
145
-    }
146
-
147
-
148
-    /**
149
-     * Toggles Context so its turned off or on (depending on where it started) and verifies the expected state after
150
-     * toggling.
151
-     *
152
-     * @param string $context_string           What context is being switched (used for the expected state text)
153
-     * @param bool   $expected_state_is_active Used to indicate whether the expected state is active (true) or inactive
154
-     *                                         (false)
155
-     */
156
-    public function toggleContextState($context_string, $expected_state_is_active = true)
157
-    {
158
-        $this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
159
-        $this->actor()->click(MessagesPage::MESSAGES_CONTEXT_ACTIVE_STATE_TOGGLE);
160
-        if ($expected_state_is_active) {
161
-            $this->actor()->waitForText("The template for $context_string is currently active.");
162
-        } else {
163
-            $this->actor()->waitForText("The template for $context_string is currently inactive");
164
-        }
165
-    }
166
-
167
-
168
-    /**
169
-     * Triggers saving the message template.
170
-     * @param bool $and_close   Use to indicate to click the Save and Close button.
171
-     */
172
-    public function saveMessageTemplate($and_close = false)
173
-    {
174
-        $this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
175
-        if ($and_close) {
176
-            $this->actor()->click('Save and Close');
177
-        } else {
178
-            $this->actor()->click('Save');
179
-        }
180
-        $this->actor()->waitForText('successfully updated');
181
-    }
182
-
183
-
184
-    /**
185
-     * This takes care of clicking the View Message icon for the given parameters.
186
-     * Assumes you are already viewing the messages activity list table.
187
-     * @param        $message_type_label
188
-     * @param        $message_status
189
-     * @param string $messenger
190
-     * @param string $context
191
-     * @param int    $number_in_set
192
-     */
193
-    public function viewMessageInMessagesListTableFor(
194
-        $message_type_label,
195
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
196
-        $messenger = 'Email',
197
-        $context = 'Event Admin',
198
-        $number_in_set = 1
199
-    ) {
200
-        $this->actor()->click(MessagesPage::messagesActivityListTableViewButtonSelectorFor(
201
-            $message_type_label,
202
-            $message_status,
203
-            $messenger,
204
-            $context,
205
-            $number_in_set
206
-        ));
207
-    }
208
-
209
-
210
-    /**
211
-     * Takes care of deleting a message matching the given parameters via the message activity list table.
212
-     * Assumes you are already viewing the messages activity list table.
213
-     * @param        $message_type_label
214
-     * @param        $message_status
215
-     * @param string $messenger
216
-     * @param string $context
217
-     * @param int    $number_in_set
218
-     */
219
-    public function deleteMessageInMessagesListTableFor(
220
-        $message_type_label,
221
-        $message_status = MessagesPage::MESSAGE_STATUS_SENT,
222
-        $messenger = 'Email',
223
-        $context = 'Event Admin',
224
-        $number_in_set = 1
225
-    ) {
226
-        $delete_action_selector = MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
227
-            $message_type_label,
228
-            $message_status,
229
-            $messenger,
230
-            $context,
231
-            $number_in_set
232
-        );
233
-        $cell_selector = MessagesPage::messagesActivityListTableCellSelectorFor(
234
-            'to',
235
-            $message_type_label,
236
-            $message_status,
237
-            $messenger,
238
-            $context,
239
-            '',
240
-            $number_in_set
241
-        );
242
-        $this->actor()->scrollTo($cell_selector, 0, -30);
243
-        $this->actor()->moveMouseOver(
244
-            $cell_selector,
245
-            5,
246
-            5
247
-        );
248
-        $this->actor()->waitForElementVisible(
249
-            $delete_action_selector
250
-        );
251
-        $this->actor()->click(
252
-            $delete_action_selector
253
-        );
254
-        $this->actor()->waitForText('successfully deleted', 20);
255
-    }
256
-
257
-
258
-    /**
259
-     * Assuming you have already triggered the view modal for a single message from the context of the message activity
260
-     * list table, this will take care of validating the given text is in that window.
261
-     * @param string $text_to_view
262
-     */
263
-    public function seeTextInViewMessageModal($text_to_view, $should_not_see = false)
264
-    {
265
-        $this->actor()->wait(2);
266
-        $this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
267
-        $this->actor()->switchToIframe('message-view-window');
268
-        $should_not_see ? $this->actor()->dontSee($text_to_view) : $this->actor()->see($text_to_view);
269
-        $this->actor()->switchToIframe();
270
-    }
271
-
272
-
273
-    /**
274
-     * This returns the value for the link at the given selector in the message modal.
275
-     * @param string $selector (any selector string accepted by WebDriver)
276
-     */
277
-    public function observeLinkAtSelectorInMessageModal($selector)
278
-    {
279
-        $this->actor()->wait(2);
280
-        $this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
281
-        $this->actor()->switchToIframe('message-view-window');
282
-        $link = $this->actor()->observeLinkUrlAt($selector);
283
-        $this->actor()->switchToIframe();
284
-        return $link;
285
-    }
286
-
287
-
288
-    /**
289
-     * Assuming you have already triggered the view modal for a single message from the context of the message activity
290
-     * list table, this will take care of validating the given text is NOT that window.
291
-     * @param string $text_to_view
292
-     */
293
-    public function dontSeeTextInViewMessageModal($text_to_view)
294
-    {
295
-        $this->seeTextInViewMessageModal($text_to_view, true);
296
-    }
297
-
298
-
299
-    public function dismissMessageModal()
300
-    {
301
-        $this->actor()->executeJs('window.dialogHelper.closeModal()');
302
-    }
13
+	/**
14
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
15
+	 *                                  a string.
16
+	 */
17
+	public function amOnMessagesActivityListTablePage($additional_params = '')
18
+	{
19
+		$this->actor()->amOnAdminPage(MessagesPage::messageActivityListTableUrl($additional_params));
20
+	}
21
+
22
+	/**
23
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
24
+	 *                                  a string.
25
+	 */
26
+	public function amOnDefaultMessageTemplateListTablePage($additional_params = '')
27
+	{
28
+		$this->actor()->amOnAdminPage(MessagesPage::defaultMessageTemplateListTableUrl($additional_params));
29
+	}
30
+
31
+
32
+	/**
33
+	 * @param string $additional_params Any additional request parameters for the generated url should be included as
34
+	 *                                  a string.
35
+	 */
36
+	public function amOnCustomMessageTemplateListTablePage($additional_params = '')
37
+	{
38
+		$this->actor()->amOnAdminPage(MessagesPage::customMessageTemplateListTableUrl($additional_params));
39
+	}
40
+
41
+
42
+	/**
43
+	 * Directs to message settings page
44
+	 */
45
+	public function amOnMessageSettingsPage()
46
+	{
47
+		$this->actor()->amOnAdminPage(MessagesPage::messageSettingsUrl());
48
+	}
49
+
50
+
51
+	public function activateMessageTypeForMessenger($message_type_slug, $messenger_slug = 'email')
52
+	{
53
+		$this->actor()->dragAndDrop(
54
+			MessagesPage::draggableSettingsBoxSelectorForMessageTypeAndMessenger($message_type_slug, $messenger_slug),
55
+			MessagesPage::MESSAGES_SETTINGS_ACTIVE_MESSAGE_TYPES_CONTAINER_SELECTOR
56
+		);
57
+	}
58
+
59
+
60
+	/**
61
+	 * Assumes you are already on the list table page that has the ui for editing the template.
62
+	 * @param string $message_type_slug
63
+	 * @param string $context [optional] if you want to click directly to the given context in the editor
64
+	 */
65
+	public function clickToEditMessageTemplateByMessageType($message_type_slug, $context = '')
66
+	{
67
+		$this->actor()->click(MessagesPage::editMessageTemplateClassByMessageType($message_type_slug, $context));
68
+	}
69
+
70
+
71
+	/**
72
+	 * Use this action to verify that the count for the given text in the specified field is as expected.  For example
73
+	 * filling the condition of, "There should only be 1 instance of `[email protected]` in all the 'to' column.
74
+	 *
75
+	 * @param int    $expected_occurence_count
76
+	 * @param string $text_to_check_for
77
+	 * @param string $field
78
+	 * @param string $message_type_label
79
+	 * @param string $message_status
80
+	 * @param string $messenger
81
+	 * @param string $context
82
+	 */
83
+	public function verifyMatchingCountofTextInMessageActivityListTableFor(
84
+		$expected_occurence_count,
85
+		$text_to_check_for,
86
+		$field,
87
+		$message_type_label,
88
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
89
+		$messenger = 'Email',
90
+		$context = 'Event Admin'
91
+	) {
92
+		$elements = $this->actor()->grabMultiple(MessagesPage::messagesActivityListTableCellSelectorFor(
93
+			$field,
94
+			$message_type_label,
95
+			$message_status,
96
+			$messenger,
97
+			$context,
98
+			$text_to_check_for,
99
+			0
100
+		));
101
+		$actual_count = count($elements);
102
+		$this->actor()->assertEquals(
103
+			$expected_occurence_count,
104
+			$actual_count,
105
+			sprintf(
106
+				'Expected %s of the %s text for the %s field but there were actually %s counted.',
107
+				$expected_occurence_count,
108
+				$text_to_check_for,
109
+				$field,
110
+				$actual_count
111
+			)
112
+		);
113
+	}
114
+
115
+
116
+	/**
117
+	 * This will create a custom message template for the given messenger and message type from the context of the
118
+	 * default (global) message template list table.
119
+	 * Also takes care of verifying the template was created.
120
+	 * @param string $message_type_label
121
+	 * @param string $messenger_label
122
+	 */
123
+	public function createCustomMessageTemplateFromDefaultFor($message_type_label, $messenger_label)
124
+	{
125
+		$this->amOnDefaultMessageTemplateListTablePage();
126
+		$this->actor()->click(
127
+			MessagesPage::createCustomButtonForMessageTypeAndMessenger(
128
+				$message_type_label,
129
+				$messenger_label
130
+			)
131
+		);
132
+		$this->actor()->seeInField('#title', 'New Custom Template');
133
+	}
134
+
135
+
136
+	/**
137
+	 * This switches the context of the current messages template to the given reference.
138
+	 * @param string $context_reference  This should be the visible label for the option.
139
+	 */
140
+	public function switchContextTo($context_reference)
141
+	{
142
+		$this->actor()->selectOption(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR, $context_reference);
143
+		$this->actor()->click(MessagesPage::MESSAGES_CONTEXT_SWITCHER_BUTTON_SELECTOR);
144
+		$this->actor()->waitForText($context_reference, 10, 'h1');
145
+	}
146
+
147
+
148
+	/**
149
+	 * Toggles Context so its turned off or on (depending on where it started) and verifies the expected state after
150
+	 * toggling.
151
+	 *
152
+	 * @param string $context_string           What context is being switched (used for the expected state text)
153
+	 * @param bool   $expected_state_is_active Used to indicate whether the expected state is active (true) or inactive
154
+	 *                                         (false)
155
+	 */
156
+	public function toggleContextState($context_string, $expected_state_is_active = true)
157
+	{
158
+		$this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
159
+		$this->actor()->click(MessagesPage::MESSAGES_CONTEXT_ACTIVE_STATE_TOGGLE);
160
+		if ($expected_state_is_active) {
161
+			$this->actor()->waitForText("The template for $context_string is currently active.");
162
+		} else {
163
+			$this->actor()->waitForText("The template for $context_string is currently inactive");
164
+		}
165
+	}
166
+
167
+
168
+	/**
169
+	 * Triggers saving the message template.
170
+	 * @param bool $and_close   Use to indicate to click the Save and Close button.
171
+	 */
172
+	public function saveMessageTemplate($and_close = false)
173
+	{
174
+		$this->actor()->scrollTo(MessagesPage::MESSAGES_CONTEXT_SWITCHER_SELECTOR);
175
+		if ($and_close) {
176
+			$this->actor()->click('Save and Close');
177
+		} else {
178
+			$this->actor()->click('Save');
179
+		}
180
+		$this->actor()->waitForText('successfully updated');
181
+	}
182
+
183
+
184
+	/**
185
+	 * This takes care of clicking the View Message icon for the given parameters.
186
+	 * Assumes you are already viewing the messages activity list table.
187
+	 * @param        $message_type_label
188
+	 * @param        $message_status
189
+	 * @param string $messenger
190
+	 * @param string $context
191
+	 * @param int    $number_in_set
192
+	 */
193
+	public function viewMessageInMessagesListTableFor(
194
+		$message_type_label,
195
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
196
+		$messenger = 'Email',
197
+		$context = 'Event Admin',
198
+		$number_in_set = 1
199
+	) {
200
+		$this->actor()->click(MessagesPage::messagesActivityListTableViewButtonSelectorFor(
201
+			$message_type_label,
202
+			$message_status,
203
+			$messenger,
204
+			$context,
205
+			$number_in_set
206
+		));
207
+	}
208
+
209
+
210
+	/**
211
+	 * Takes care of deleting a message matching the given parameters via the message activity list table.
212
+	 * Assumes you are already viewing the messages activity list table.
213
+	 * @param        $message_type_label
214
+	 * @param        $message_status
215
+	 * @param string $messenger
216
+	 * @param string $context
217
+	 * @param int    $number_in_set
218
+	 */
219
+	public function deleteMessageInMessagesListTableFor(
220
+		$message_type_label,
221
+		$message_status = MessagesPage::MESSAGE_STATUS_SENT,
222
+		$messenger = 'Email',
223
+		$context = 'Event Admin',
224
+		$number_in_set = 1
225
+	) {
226
+		$delete_action_selector = MessagesPage::messagesActivityListTableDeleteActionSelectorFor(
227
+			$message_type_label,
228
+			$message_status,
229
+			$messenger,
230
+			$context,
231
+			$number_in_set
232
+		);
233
+		$cell_selector = MessagesPage::messagesActivityListTableCellSelectorFor(
234
+			'to',
235
+			$message_type_label,
236
+			$message_status,
237
+			$messenger,
238
+			$context,
239
+			'',
240
+			$number_in_set
241
+		);
242
+		$this->actor()->scrollTo($cell_selector, 0, -30);
243
+		$this->actor()->moveMouseOver(
244
+			$cell_selector,
245
+			5,
246
+			5
247
+		);
248
+		$this->actor()->waitForElementVisible(
249
+			$delete_action_selector
250
+		);
251
+		$this->actor()->click(
252
+			$delete_action_selector
253
+		);
254
+		$this->actor()->waitForText('successfully deleted', 20);
255
+	}
256
+
257
+
258
+	/**
259
+	 * Assuming you have already triggered the view modal for a single message from the context of the message activity
260
+	 * list table, this will take care of validating the given text is in that window.
261
+	 * @param string $text_to_view
262
+	 */
263
+	public function seeTextInViewMessageModal($text_to_view, $should_not_see = false)
264
+	{
265
+		$this->actor()->wait(2);
266
+		$this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
267
+		$this->actor()->switchToIframe('message-view-window');
268
+		$should_not_see ? $this->actor()->dontSee($text_to_view) : $this->actor()->see($text_to_view);
269
+		$this->actor()->switchToIframe();
270
+	}
271
+
272
+
273
+	/**
274
+	 * This returns the value for the link at the given selector in the message modal.
275
+	 * @param string $selector (any selector string accepted by WebDriver)
276
+	 */
277
+	public function observeLinkAtSelectorInMessageModal($selector)
278
+	{
279
+		$this->actor()->wait(2);
280
+		$this->actor()->waitForElementVisible('.ee-admin-dialog-container-inner-content');
281
+		$this->actor()->switchToIframe('message-view-window');
282
+		$link = $this->actor()->observeLinkUrlAt($selector);
283
+		$this->actor()->switchToIframe();
284
+		return $link;
285
+	}
286
+
287
+
288
+	/**
289
+	 * Assuming you have already triggered the view modal for a single message from the context of the message activity
290
+	 * list table, this will take care of validating the given text is NOT that window.
291
+	 * @param string $text_to_view
292
+	 */
293
+	public function dontSeeTextInViewMessageModal($text_to_view)
294
+	{
295
+		$this->seeTextInViewMessageModal($text_to_view, true);
296
+	}
297
+
298
+
299
+	public function dismissMessageModal()
300
+	{
301
+		$this->actor()->executeJs('window.dialogHelper.closeModal()');
302
+	}
303 303
 }
Please login to merge, or discard this patch.
core/services/assets/AssetRegistrationException.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@
 block discarded – undo
16 16
  */
17 17
 class AssetRegistrationException extends RuntimeException
18 18
 {
19
-    /**
20
-     * @param                $script_handle
21
-     * @param string         $message
22
-     * @param int            $code
23
-     * @param Exception|null $previous
24
-     */
25
-    public function __construct($script_handle, $message = '', $code = 0, Exception $previous = null)
26
-    {
27
-        if (empty($message)) {
28
-            $message = sprintf(
29
-                esc_html_x(
30
-                    'The "%1$s" script could not be registered with WordPress core.',
31
-                    'The "script-handle" script could not be registered with WordPress core.',
32
-                    'event_espresso'
33
-                ),
34
-                $script_handle
35
-            );
36
-        }
37
-        parent::__construct($message, $code, $previous);
38
-    }
19
+	/**
20
+	 * @param                $script_handle
21
+	 * @param string         $message
22
+	 * @param int            $code
23
+	 * @param Exception|null $previous
24
+	 */
25
+	public function __construct($script_handle, $message = '', $code = 0, Exception $previous = null)
26
+	{
27
+		if (empty($message)) {
28
+			$message = sprintf(
29
+				esc_html_x(
30
+					'The "%1$s" script could not be registered with WordPress core.',
31
+					'The "script-handle" script could not be registered with WordPress core.',
32
+					'event_espresso'
33
+				),
34
+				$script_handle
35
+			);
36
+		}
37
+		parent::__construct($message, $code, $previous);
38
+	}
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
core/services/privacy/policy/PrivacyPolicyInterface.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -16,20 +16,20 @@
 block discarded – undo
16 16
 interface PrivacyPolicyInterface
17 17
 {
18 18
 
19
-    /**
20
-     * Returns the translated name to display in this privacy policy's section's title
21
-     *
22
-     * @return string
23
-     */
24
-    public function getName();
19
+	/**
20
+	 * Returns the translated name to display in this privacy policy's section's title
21
+	 *
22
+	 * @return string
23
+	 */
24
+	public function getName();
25 25
 
26 26
 
27
-    /**
28
-     * Returns the suggested privacy policy content for this plugin. May contain HTML
29
-     *
30
-     * @return string
31
-     */
32
-    public function getContent();
27
+	/**
28
+	 * Returns the suggested privacy policy content for this plugin. May contain HTML
29
+	 *
30
+	 * @return string
31
+	 */
32
+	public function getContent();
33 33
 }
34 34
 // End of file PrivacyPolicyInterface.php
35 35
 // Location: EventEspresso\core\domain\services\admin/PrivacyPolicyInterface.php
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/export/ExportRegistration.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use EE_Registration;
6 6
 use EE_Ticket;
7
-use EEM_Answer;
8 7
 use EEM_Registration;
9 8
 use EventEspresso\core\services\privacy\export\PersonalDataExporterInterface;
10 9
 
Please login to merge, or discard this patch.
Indentation   +122 added lines, -122 removed lines patch added patch discarded remove patch
@@ -18,133 +18,133 @@
 block discarded – undo
18 18
  */
19 19
 class ExportRegistration implements PersonalDataExporterInterface
20 20
 {
21
-    /**
22
-     * @var EEM_Registration
23
-     */
24
-    protected $registration_model;
21
+	/**
22
+	 * @var EEM_Registration
23
+	 */
24
+	protected $registration_model;
25 25
 
26
-    /**
27
-     * ExportRegistration constructor.
28
-     *
29
-     * @param EEM_Registration $registration_model
30
-     */
31
-    public function __construct(EEM_Registration $registration_model)
32
-    {
33
-        $this->registration_model = $registration_model;
34
-    }
26
+	/**
27
+	 * ExportRegistration constructor.
28
+	 *
29
+	 * @param EEM_Registration $registration_model
30
+	 */
31
+	public function __construct(EEM_Registration $registration_model)
32
+	{
33
+		$this->registration_model = $registration_model;
34
+	}
35 35
 
36 36
 
37
-    /**
38
-     * Returns data for export.
39
-     *
40
-     * @param string    $email_address ,
41
-     * @param int       $page          starts at 1, not 0
42
-     * @return array {
43
-     * @type array      $data          {
44
-     * @type array {
45
-     * @type string     $group_id      (not translated, same for all exports)
46
-     * @type string     $group_label   (translated string)
47
-     * @type string|int $item_id
48
-     * @type array      $data          {
49
-     * @type array {
50
-     * @type string     $name          what's shown in the left-column of the export row
51
-     * @type string     $value         what's showin the right-column of the export row
52
-     *                                 }
53
-     *                                 }
54
-     *                                 }
55
-     *                                 }
56
-     *                                 }
57
-     */
58
-    public function export($email_address, $page = 1)
59
-    {
60
-        $page_size = 10;
61
-        $registrations = $this->registration_model->get_all(
62
-            array(
63
-                array(
64
-                    'Attendee.ATT_email' => $email_address,
65
-                ),
66
-                'limit' => array(
67
-                    ($page - 1) * $page_size,
68
-                    $page_size,
69
-                ),
70
-            )
71
-        );
72
-        $export_fields = array_intersect_key(
73
-            $this->registration_model->field_settings(),
74
-            array_flip(
75
-                array(
76
-                    'REG_code',
77
-                    'REG_date',
78
-                    'REG_final_price',
79
-                    'REG_paid',
80
-                    'REG_url_link',
81
-                    'REG_count',
82
-                    'REG_group_size',
83
-                    'REG_att_is_going',
84
-                )
85
-            )
86
-        );
87
-        $export_items = array();
88
-        $found_something = false;
89
-        foreach ($registrations as $registration) {
90
-            /**
91
-             * @var $registration EE_Registration
92
-             */
93
-            $found_something = true;
94
-            $data = array();
95
-            foreach ($export_fields as $field_name => $field_obj) {
96
-                $data[] = array(
97
-                    'name'  => $field_obj->get_nicename(),
98
-                    'value' => $registration->get_pretty($field_name),
99
-                );
100
-            }
101
-            $answers = $registration->answers(
102
-                array(
103
-                    'force_join' => array(
104
-                        'Question',
105
-                    ),
106
-                )
107
-            );
108
-            foreach ($answers as $answer) {
109
-                $data[] = array(
110
-                    'name'  => $answer->question()->display_text(),
111
-                    'value' => $answer->pretty_value(),
112
-                );
113
-            }
114
-            $ticket = $registration->ticket();
115
-            if ($ticket instanceof EE_Ticket) {
116
-                $data[] = array(
117
-                    'name'  => esc_html__('Ticket', 'event_espresso'),
118
-                    'value' => $ticket->name_and_info(),
119
-                );
120
-                $data[] = array(
121
-                    'name'  => esc_html__('Event', 'event_espresso'),
122
-                    'value' => $ticket->get_event_name(),
123
-                );
124
-            }
37
+	/**
38
+	 * Returns data for export.
39
+	 *
40
+	 * @param string    $email_address ,
41
+	 * @param int       $page          starts at 1, not 0
42
+	 * @return array {
43
+	 * @type array      $data          {
44
+	 * @type array {
45
+	 * @type string     $group_id      (not translated, same for all exports)
46
+	 * @type string     $group_label   (translated string)
47
+	 * @type string|int $item_id
48
+	 * @type array      $data          {
49
+	 * @type array {
50
+	 * @type string     $name          what's shown in the left-column of the export row
51
+	 * @type string     $value         what's showin the right-column of the export row
52
+	 *                                 }
53
+	 *                                 }
54
+	 *                                 }
55
+	 *                                 }
56
+	 *                                 }
57
+	 */
58
+	public function export($email_address, $page = 1)
59
+	{
60
+		$page_size = 10;
61
+		$registrations = $this->registration_model->get_all(
62
+			array(
63
+				array(
64
+					'Attendee.ATT_email' => $email_address,
65
+				),
66
+				'limit' => array(
67
+					($page - 1) * $page_size,
68
+					$page_size,
69
+				),
70
+			)
71
+		);
72
+		$export_fields = array_intersect_key(
73
+			$this->registration_model->field_settings(),
74
+			array_flip(
75
+				array(
76
+					'REG_code',
77
+					'REG_date',
78
+					'REG_final_price',
79
+					'REG_paid',
80
+					'REG_url_link',
81
+					'REG_count',
82
+					'REG_group_size',
83
+					'REG_att_is_going',
84
+				)
85
+			)
86
+		);
87
+		$export_items = array();
88
+		$found_something = false;
89
+		foreach ($registrations as $registration) {
90
+			/**
91
+			 * @var $registration EE_Registration
92
+			 */
93
+			$found_something = true;
94
+			$data = array();
95
+			foreach ($export_fields as $field_name => $field_obj) {
96
+				$data[] = array(
97
+					'name'  => $field_obj->get_nicename(),
98
+					'value' => $registration->get_pretty($field_name),
99
+				);
100
+			}
101
+			$answers = $registration->answers(
102
+				array(
103
+					'force_join' => array(
104
+						'Question',
105
+					),
106
+				)
107
+			);
108
+			foreach ($answers as $answer) {
109
+				$data[] = array(
110
+					'name'  => $answer->question()->display_text(),
111
+					'value' => $answer->pretty_value(),
112
+				);
113
+			}
114
+			$ticket = $registration->ticket();
115
+			if ($ticket instanceof EE_Ticket) {
116
+				$data[] = array(
117
+					'name'  => esc_html__('Ticket', 'event_espresso'),
118
+					'value' => $ticket->name_and_info(),
119
+				);
120
+				$data[] = array(
121
+					'name'  => esc_html__('Event', 'event_espresso'),
122
+					'value' => $ticket->get_event_name(),
123
+				);
124
+			}
125 125
 
126
-            $export_items[] = array(
127
-                'group_id'    => 'registration',
128
-                'group_label' => esc_html__('Event Registrations', 'event_espresso'),
129
-                'item_id'     => $registration->ID(),
130
-                'data'        => $data,
131
-            );
132
-        }
133
-        return array(
134
-            'data' => $export_items,
135
-            'done' => ! $found_something,
136
-        );
137
-    }
126
+			$export_items[] = array(
127
+				'group_id'    => 'registration',
128
+				'group_label' => esc_html__('Event Registrations', 'event_espresso'),
129
+				'item_id'     => $registration->ID(),
130
+				'data'        => $data,
131
+			);
132
+		}
133
+		return array(
134
+			'data' => $export_items,
135
+			'done' => ! $found_something,
136
+		);
137
+	}
138 138
 
139
-    /**
140
-     * Gets the Translated name of this exporter
141
-     *
142
-     * @return string
143
-     */
144
-    public function name()
145
-    {
146
-        return esc_html__('Event Espresso Registration Data Exporter', 'event_espresso');
147
-    }
139
+	/**
140
+	 * Gets the Translated name of this exporter
141
+	 *
142
+	 * @return string
143
+	 */
144
+	public function name()
145
+	{
146
+		return esc_html__('Event Espresso Registration Data Exporter', 'event_espresso');
147
+	}
148 148
 }
149 149
 // End of file ExportRegistration.php
150 150
 // Location: EventEspresso\core\domain\services\admin\privacy\export/ExportRegistration.php
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/export/ExportTransaction.php 1 patch
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -15,106 +15,106 @@
 block discarded – undo
15 15
  */
16 16
 class ExportTransaction implements PersonalDataExporterInterface
17 17
 {
18
-    /**
19
-     * @var EEM_Transaction $transaction_model
20
-     */
21
-    protected $transaction_model;
18
+	/**
19
+	 * @var EEM_Transaction $transaction_model
20
+	 */
21
+	protected $transaction_model;
22 22
 
23
-    /**
24
-     * ExportTransaction constructor.
25
-     *
26
-     * @param $transaction_model
27
-     */
28
-    public function __construct(EEM_Transaction $transaction_model)
29
-    {
30
-        $this->transaction_model = $transaction_model;
31
-    }
23
+	/**
24
+	 * ExportTransaction constructor.
25
+	 *
26
+	 * @param $transaction_model
27
+	 */
28
+	public function __construct(EEM_Transaction $transaction_model)
29
+	{
30
+		$this->transaction_model = $transaction_model;
31
+	}
32 32
 
33 33
 
34
-    /**
35
-     * Returns data for export.
36
-     *
37
-     * @param string    $email_address ,
38
-     * @param int       $page          starts at 1, not 0
39
-     * @return array {
40
-     * @type array      $data          {
41
-     * @type array {
42
-     * @type string     $group_id      (not translated, same for all exports)
43
-     * @type string     $group_label   (translated string)
44
-     * @type string|int $item_id
45
-     * @type array      $data          {
46
-     * @type array {
47
-     * @type string     $name          what's shown in the left-column of the export row
48
-     * @type string     $value         what's showin the right-column of the export row
49
-     *                                 }
50
-     *                                 }
51
-     *                                 }
52
-     *                                 }
53
-     *                                 }
54
-     */
55
-    public function export($email_address, $page = 1)
56
-    {
57
-        $page_size = 10;
58
-        $transactions = $this->transaction_model->get_all(
59
-            array(
60
-                array(
61
-                    'Registration.Attendee.ATT_email' => $email_address,
62
-                ),
63
-                'limit' => array(
64
-                    ($page - 1) * $page_size,
65
-                    $page_size,
66
-                ),
67
-            )
68
-        );
69
-        $export_fields = array_intersect_key(
70
-            EEM_Transaction::instance()->field_settings(),
71
-            array_flip(
72
-                array(
73
-                    'TXN_timestamp',
74
-                    'TXN_total',
75
-                    'TXN_paid',
76
-                    'TXN_session_data',
77
-                )
78
-            )
79
-        );
80
-        $export_items = array();
81
-        $found_something = false;
82
-        foreach ($transactions as $transaction) {
83
-            $found_something = true;
84
-            $data = array();
85
-            foreach ($export_fields as $field_name => $field_obj) {
86
-                if ($field_name === 'TXN_session_data') {
87
-                    $value = $transaction->get_pretty($field_name, 'print_r');
88
-                } else {
89
-                    $value = $transaction->get_pretty($field_name);
90
-                }
91
-                $data[] = array(
92
-                    'name'  => $field_obj->get_nicename(),
93
-                    'value' => $value,
94
-                );
95
-            }
96
-            $export_items[] = array(
97
-                'group_id'    => 'transactions',
98
-                'group_label' => esc_html__('Transactions', 'event_espresso'),
99
-                'item_id'     => $transaction->ID(),
100
-                'data'        => $data,
101
-            );
102
-        }
103
-        return array(
104
-            'data' => $export_items,
105
-            'done' => ! $found_something,
106
-        );
107
-    }
34
+	/**
35
+	 * Returns data for export.
36
+	 *
37
+	 * @param string    $email_address ,
38
+	 * @param int       $page          starts at 1, not 0
39
+	 * @return array {
40
+	 * @type array      $data          {
41
+	 * @type array {
42
+	 * @type string     $group_id      (not translated, same for all exports)
43
+	 * @type string     $group_label   (translated string)
44
+	 * @type string|int $item_id
45
+	 * @type array      $data          {
46
+	 * @type array {
47
+	 * @type string     $name          what's shown in the left-column of the export row
48
+	 * @type string     $value         what's showin the right-column of the export row
49
+	 *                                 }
50
+	 *                                 }
51
+	 *                                 }
52
+	 *                                 }
53
+	 *                                 }
54
+	 */
55
+	public function export($email_address, $page = 1)
56
+	{
57
+		$page_size = 10;
58
+		$transactions = $this->transaction_model->get_all(
59
+			array(
60
+				array(
61
+					'Registration.Attendee.ATT_email' => $email_address,
62
+				),
63
+				'limit' => array(
64
+					($page - 1) * $page_size,
65
+					$page_size,
66
+				),
67
+			)
68
+		);
69
+		$export_fields = array_intersect_key(
70
+			EEM_Transaction::instance()->field_settings(),
71
+			array_flip(
72
+				array(
73
+					'TXN_timestamp',
74
+					'TXN_total',
75
+					'TXN_paid',
76
+					'TXN_session_data',
77
+				)
78
+			)
79
+		);
80
+		$export_items = array();
81
+		$found_something = false;
82
+		foreach ($transactions as $transaction) {
83
+			$found_something = true;
84
+			$data = array();
85
+			foreach ($export_fields as $field_name => $field_obj) {
86
+				if ($field_name === 'TXN_session_data') {
87
+					$value = $transaction->get_pretty($field_name, 'print_r');
88
+				} else {
89
+					$value = $transaction->get_pretty($field_name);
90
+				}
91
+				$data[] = array(
92
+					'name'  => $field_obj->get_nicename(),
93
+					'value' => $value,
94
+				);
95
+			}
96
+			$export_items[] = array(
97
+				'group_id'    => 'transactions',
98
+				'group_label' => esc_html__('Transactions', 'event_espresso'),
99
+				'item_id'     => $transaction->ID(),
100
+				'data'        => $data,
101
+			);
102
+		}
103
+		return array(
104
+			'data' => $export_items,
105
+			'done' => ! $found_something,
106
+		);
107
+	}
108 108
 
109
-    /**
110
-     * Gets the Translated name of this exporter
111
-     *
112
-     * @return string
113
-     */
114
-    public function name()
115
-    {
116
-        return esc_html__('Event Espresso Transaction Exporter', 'event_espresso');
117
-    }
109
+	/**
110
+	 * Gets the Translated name of this exporter
111
+	 *
112
+	 * @return string
113
+	 */
114
+	public function name()
115
+	{
116
+		return esc_html__('Event Espresso Transaction Exporter', 'event_espresso');
117
+	}
118 118
 }
119 119
 // End of file ExportTransaction.php
120 120
 // Location: EventEspresso\core\domain\services\admin\privacy\export/ExportTransaction.php
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/export/ExportCheckins.php 1 patch
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -16,112 +16,112 @@
 block discarded – undo
16 16
  */
17 17
 class ExportCheckins implements PersonalDataExporterInterface
18 18
 {
19
-    /**
20
-     * @var EEM_Checkin
21
-     */
22
-    protected $checkin_model;
19
+	/**
20
+	 * @var EEM_Checkin
21
+	 */
22
+	protected $checkin_model;
23 23
 
24
-    /**
25
-     * ExportCheckins constructor.
26
-     *
27
-     * @param EEM_Checkin $checkin_model
28
-     */
29
-    public function __construct(EEM_Checkin $checkin_model)
30
-    {
31
-        $this->checkin_model = $checkin_model;
32
-    }
24
+	/**
25
+	 * ExportCheckins constructor.
26
+	 *
27
+	 * @param EEM_Checkin $checkin_model
28
+	 */
29
+	public function __construct(EEM_Checkin $checkin_model)
30
+	{
31
+		$this->checkin_model = $checkin_model;
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * Returns data for export.
37
-     *
38
-     * @param string    $email_address ,
39
-     * @param int       $page          starts at 1, not 0
40
-     * @return array {
41
-     * @type array      $data          {
42
-     * @type array {
43
-     * @type string     $group_id      (not translated, same for all exports)
44
-     * @type string     $group_label   (translated string)
45
-     * @type string|int $item_id
46
-     * @type array      $data          {
47
-     * @type array {
48
-     * @type string     $name          what's shown in the left-column of the export row
49
-     * @type string     $value         what's showin the right-column of the export row
50
-     *                                 }
51
-     *                                 }
52
-     *                                 }
53
-     *                                 }
54
-     *                                 }
55
-     */
56
-    public function export($email_address, $page = 1)
57
-    {
58
-        $page_size = 10;
59
-        $checkins = $this->checkin_model->get_all(
60
-            array(
61
-                array(
62
-                    'Registration.Attendee.ATT_email' => $email_address,
63
-                ),
64
-                'limit'      => array(
65
-                    ($page - 1) * $page_size,
66
-                    $page_size,
67
-                ),
68
-                'force_join' => array('Registration.Event'),
69
-            )
70
-        );
35
+	/**
36
+	 * Returns data for export.
37
+	 *
38
+	 * @param string    $email_address ,
39
+	 * @param int       $page          starts at 1, not 0
40
+	 * @return array {
41
+	 * @type array      $data          {
42
+	 * @type array {
43
+	 * @type string     $group_id      (not translated, same for all exports)
44
+	 * @type string     $group_label   (translated string)
45
+	 * @type string|int $item_id
46
+	 * @type array      $data          {
47
+	 * @type array {
48
+	 * @type string     $name          what's shown in the left-column of the export row
49
+	 * @type string     $value         what's showin the right-column of the export row
50
+	 *                                 }
51
+	 *                                 }
52
+	 *                                 }
53
+	 *                                 }
54
+	 *                                 }
55
+	 */
56
+	public function export($email_address, $page = 1)
57
+	{
58
+		$page_size = 10;
59
+		$checkins = $this->checkin_model->get_all(
60
+			array(
61
+				array(
62
+					'Registration.Attendee.ATT_email' => $email_address,
63
+				),
64
+				'limit'      => array(
65
+					($page - 1) * $page_size,
66
+					$page_size,
67
+				),
68
+				'force_join' => array('Registration.Event'),
69
+			)
70
+		);
71 71
 
72
-        if (empty($checkins)) {
73
-            return array(
74
-                'data' => array(),
75
-                'done' => true,
76
-            );
77
-        }
72
+		if (empty($checkins)) {
73
+			return array(
74
+				'data' => array(),
75
+				'done' => true,
76
+			);
77
+		}
78 78
 
79
-        $export_items = array();
80
-        foreach ($checkins as $checkin) {
81
-            $reg = $checkin->get_first_related('Registration');
82
-            if ($reg instanceof EE_Registration) {
83
-                $event_name = $reg->event_name();
84
-            } else {
85
-                $event_name = esc_html__('Unknown', 'event_espresso');
86
-            }
87
-            $export_items[] =
88
-                array(
89
-                    'group_id'    => 'check-ins',
90
-                    'group_label' => esc_html__('Event Check-Ins', 'event_espresso'),
91
-                    'item_id'     => $checkin->ID(),
92
-                    'data'        => array(
93
-                        array(
94
-                            'name'  => esc_html__('Time', 'event_espresso'),
95
-                            'value' => $checkin->get_pretty('CHK_timestamp'),
96
-                        ),
97
-                        array(
98
-                            'name'  => esc_html__('Check in/out', 'event_espresso'),
99
-                            'value' => $checkin->get('CHK_in')
100
-                                ? esc_html__('In', 'event_espresso')
101
-                                : esc_html__('Out', 'event_espresso'),
102
-                        ),
103
-                        array(
104
-                            'name'  => esc_html__('Event', 'event_espresso'),
105
-                            'value' => $event_name,
106
-                        ),
107
-                    ),
108
-                );
109
-        }
110
-        return array(
111
-            'data' => $export_items,
112
-            'done' => true,
113
-        );
114
-    }
79
+		$export_items = array();
80
+		foreach ($checkins as $checkin) {
81
+			$reg = $checkin->get_first_related('Registration');
82
+			if ($reg instanceof EE_Registration) {
83
+				$event_name = $reg->event_name();
84
+			} else {
85
+				$event_name = esc_html__('Unknown', 'event_espresso');
86
+			}
87
+			$export_items[] =
88
+				array(
89
+					'group_id'    => 'check-ins',
90
+					'group_label' => esc_html__('Event Check-Ins', 'event_espresso'),
91
+					'item_id'     => $checkin->ID(),
92
+					'data'        => array(
93
+						array(
94
+							'name'  => esc_html__('Time', 'event_espresso'),
95
+							'value' => $checkin->get_pretty('CHK_timestamp'),
96
+						),
97
+						array(
98
+							'name'  => esc_html__('Check in/out', 'event_espresso'),
99
+							'value' => $checkin->get('CHK_in')
100
+								? esc_html__('In', 'event_espresso')
101
+								: esc_html__('Out', 'event_espresso'),
102
+						),
103
+						array(
104
+							'name'  => esc_html__('Event', 'event_espresso'),
105
+							'value' => $event_name,
106
+						),
107
+					),
108
+				);
109
+		}
110
+		return array(
111
+			'data' => $export_items,
112
+			'done' => true,
113
+		);
114
+	}
115 115
 
116
-    /**
117
-     * Gets the Translated name of this exporter
118
-     *
119
-     * @return string
120
-     */
121
-    public function name()
122
-    {
123
-        return esc_html__('Event Espresso Checkins Exporter', 'event_espresso');
124
-    }
116
+	/**
117
+	 * Gets the Translated name of this exporter
118
+	 *
119
+	 * @return string
120
+	 */
121
+	public function name()
122
+	{
123
+		return esc_html__('Event Espresso Checkins Exporter', 'event_espresso');
124
+	}
125 125
 }
126 126
 // End of file ExportCheckins.php
127 127
 // Location: EventEspresso\core\domain\services\admin\privacy\export/ExportCheckins.php
Please login to merge, or discard this patch.
core/domain/services/admin/privacy/export/ExportAttendee.php 2 patches
Indentation   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -15,116 +15,116 @@
 block discarded – undo
15 15
  */
16 16
 class ExportAttendee implements PersonalDataExporterInterface
17 17
 {
18
-    /**
19
-     * @var EEM_Attendee
20
-     */
21
-    protected $attendee_model;
18
+	/**
19
+	 * @var EEM_Attendee
20
+	 */
21
+	protected $attendee_model;
22 22
 
23
-    /**
24
-     * ExportAttendee constructor.
25
-     *
26
-     * @param EEM_Attendee $attendee_model
27
-     */
28
-    public function __construct(EEM_Attendee $attendee_model)
29
-    {
30
-        $this->attendee_model = $attendee_model;
31
-    }
23
+	/**
24
+	 * ExportAttendee constructor.
25
+	 *
26
+	 * @param EEM_Attendee $attendee_model
27
+	 */
28
+	public function __construct(EEM_Attendee $attendee_model)
29
+	{
30
+		$this->attendee_model = $attendee_model;
31
+	}
32 32
 
33 33
 
34
-    /**
35
-     * Returns data for export.
36
-     *
37
-     * @param string    $email_address ,
38
-     * @param int       $page          starts at 1, not 0
39
-     * @return array {
40
-     * @type array      $data          {
41
-     * @type array {
42
-     * @type string     $group_id      (not translated, same for all exports)
43
-     * @type string     $group_label   (translated string)
44
-     * @type string|int $item_id
45
-     * @type array      $data          {
46
-     * @type array {
47
-     * @type string     $name          what's shown in the left-column of the export row
48
-     * @type string     $value         what's showin the right-column of the export row
49
-     *                                 }
50
-     *                                 }
51
-     *                                 }
52
-     *                                 }
53
-     *                                 }
54
-     */
55
-    public function export($email_address, $page = 1)
56
-    {
57
-        $attendees = $this->attendee_model->get_all(
58
-            array(
59
-                array(
60
-                    'ATT_email' => $email_address,
61
-                ),
62
-            )
63
-        );
34
+	/**
35
+	 * Returns data for export.
36
+	 *
37
+	 * @param string    $email_address ,
38
+	 * @param int       $page          starts at 1, not 0
39
+	 * @return array {
40
+	 * @type array      $data          {
41
+	 * @type array {
42
+	 * @type string     $group_id      (not translated, same for all exports)
43
+	 * @type string     $group_label   (translated string)
44
+	 * @type string|int $item_id
45
+	 * @type array      $data          {
46
+	 * @type array {
47
+	 * @type string     $name          what's shown in the left-column of the export row
48
+	 * @type string     $value         what's showin the right-column of the export row
49
+	 *                                 }
50
+	 *                                 }
51
+	 *                                 }
52
+	 *                                 }
53
+	 *                                 }
54
+	 */
55
+	public function export($email_address, $page = 1)
56
+	{
57
+		$attendees = $this->attendee_model->get_all(
58
+			array(
59
+				array(
60
+					'ATT_email' => $email_address,
61
+				),
62
+			)
63
+		);
64 64
 
65
-        if (empty($attendees)) {
66
-            return array(
67
-                'data' => array(),
68
-                'done' => true,
69
-            );
70
-        }
65
+		if (empty($attendees)) {
66
+			return array(
67
+				'data' => array(),
68
+				'done' => true,
69
+			);
70
+		}
71 71
 
72
-        $export_items = array();
73
-        foreach ($attendees as $attendee) {
74
-            $export_fields = array_intersect_key(
75
-                $this->attendee_model->field_settings(),
76
-                array_flip(
77
-                    array(
78
-                        'ATT_fname',
79
-                        'ATT_lname',
80
-                        'ATT_email',
81
-                        'ATT_address1',
82
-                        'ATT_address2',
83
-                        'ATT_city',
84
-                        'STA_ID',
85
-                        'CNT_ISO',
86
-                        'ATT_zip',
87
-                        'ATT_phone',
88
-                    )
89
-                )
90
-            );
91
-            $data = array();
92
-            foreach ($export_fields as $field_name => $field_obj) {
93
-                if ($field_name === 'STA_ID') {
94
-                    $value = $attendee->state_name();
95
-                } elseif ($field_name == 'CNT_ISO') {
96
-                    $value = $attendee->country_name();
97
-                } else {
98
-                    $value = $attendee->get_pretty($field_name);
99
-                }
100
-                $data[] = array(
101
-                    'name'  => $field_obj->get_nicename(),
102
-                    'value' => $value,
103
-                );
104
-            }
105
-            $export_items[] =
106
-                array(
107
-                    'group_id'    => 'att-' . $attendee->ID(),
108
-                    'group_label' => esc_html__('Contact Profiles', 'event_espresso'),
109
-                    'item_id'     => $attendee->ID(),
110
-                    'data'        => $data,
111
-                );
112
-        }
113
-        return array(
114
-            'data' => $export_items,
115
-            'done' => true,
116
-        );
117
-    }
72
+		$export_items = array();
73
+		foreach ($attendees as $attendee) {
74
+			$export_fields = array_intersect_key(
75
+				$this->attendee_model->field_settings(),
76
+				array_flip(
77
+					array(
78
+						'ATT_fname',
79
+						'ATT_lname',
80
+						'ATT_email',
81
+						'ATT_address1',
82
+						'ATT_address2',
83
+						'ATT_city',
84
+						'STA_ID',
85
+						'CNT_ISO',
86
+						'ATT_zip',
87
+						'ATT_phone',
88
+					)
89
+				)
90
+			);
91
+			$data = array();
92
+			foreach ($export_fields as $field_name => $field_obj) {
93
+				if ($field_name === 'STA_ID') {
94
+					$value = $attendee->state_name();
95
+				} elseif ($field_name == 'CNT_ISO') {
96
+					$value = $attendee->country_name();
97
+				} else {
98
+					$value = $attendee->get_pretty($field_name);
99
+				}
100
+				$data[] = array(
101
+					'name'  => $field_obj->get_nicename(),
102
+					'value' => $value,
103
+				);
104
+			}
105
+			$export_items[] =
106
+				array(
107
+					'group_id'    => 'att-' . $attendee->ID(),
108
+					'group_label' => esc_html__('Contact Profiles', 'event_espresso'),
109
+					'item_id'     => $attendee->ID(),
110
+					'data'        => $data,
111
+				);
112
+		}
113
+		return array(
114
+			'data' => $export_items,
115
+			'done' => true,
116
+		);
117
+	}
118 118
 
119
-    /**
120
-     * Gets the Translated name of this exporter
121
-     *
122
-     * @return string
123
-     */
124
-    public function name()
125
-    {
126
-        return esc_html__('Event Espresso Attendee Data Exporter', 'event_espresso');
127
-    }
119
+	/**
120
+	 * Gets the Translated name of this exporter
121
+	 *
122
+	 * @return string
123
+	 */
124
+	public function name()
125
+	{
126
+		return esc_html__('Event Espresso Attendee Data Exporter', 'event_espresso');
127
+	}
128 128
 }
129 129
 // End of file ExportAttendee.php
130 130
 // Location: EventEspresso\core\domain\services\admin\privacy\export/ExportAttendee.php
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
             }
105 105
             $export_items[] =
106 106
                 array(
107
-                    'group_id'    => 'att-' . $attendee->ID(),
107
+                    'group_id'    => 'att-'.$attendee->ID(),
108 108
                     'group_label' => esc_html__('Contact Profiles', 'event_espresso'),
109 109
                     'item_id'     => $attendee->ID(),
110 110
                     'data'        => $data,
Please login to merge, or discard this patch.
core/espresso_definitions.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
7 7
 define('EE_SUPPORT_EMAIL', '[email protected]');
8 8
 // used to be DIRECTORY_SEPARATOR, but that caused issues on windows
9 9
 if (! defined('DS')) {
10
-    define('DS', '/');
10
+	define('DS', '/');
11 11
 }
12 12
 if (! defined('PS')) {
13
-    define('PS', PATH_SEPARATOR);
13
+	define('PS', PATH_SEPARATOR);
14 14
 }
15 15
 if (! defined('SP')) {
16
-    define('SP', ' ');
16
+	define('SP', ' ');
17 17
 }
18 18
 if (! defined('EENL')) {
19
-    define('EENL', "\n");
19
+	define('EENL', "\n");
20 20
 }
21 21
 // define the plugin directory and URL
22 22
 define('EE_PLUGIN_BASENAME', plugin_basename(EVENT_ESPRESSO_MAIN_FILE));
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
 define('EE_LANGUAGES_SAFE_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'languages' . DS);
71 71
 // check for DOMPDF fonts in uploads
72 72
 if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS)) {
73
-    define('DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS);
73
+	define('DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS);
74 74
 }
75 75
 // ajax constants
76 76
 define(
77
-    'EE_FRONT_AJAX',
78
-    isset($_REQUEST['ee_front_ajax']) || isset($_REQUEST['data']['ee_front_ajax'])
77
+	'EE_FRONT_AJAX',
78
+	isset($_REQUEST['ee_front_ajax']) || isset($_REQUEST['data']['ee_front_ajax'])
79 79
 );
80 80
 define(
81
-    'EE_ADMIN_AJAX',
82
-    isset($_REQUEST['ee_admin_ajax']) || isset($_REQUEST['data']['ee_admin_ajax'])
81
+	'EE_ADMIN_AJAX',
82
+	isset($_REQUEST['ee_admin_ajax']) || isset($_REQUEST['data']['ee_admin_ajax'])
83 83
 );
84 84
 // just a handy constant occasionally needed for finding values representing infinity in the DB
85 85
 // you're better to use this than its straight value (currently -1) in case you ever
@@ -89,5 +89,5 @@  discard block
 block discarded – undo
89 89
 define('EE_DEBUG', false);
90 90
 // for older WP versions
91 91
 if (! defined('MONTH_IN_SECONDS')) {
92
-    define('MONTH_IN_SECONDS', DAY_IN_SECONDS * 30);
92
+	define('MONTH_IN_SECONDS', DAY_IN_SECONDS * 30);
93 93
 }
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,71 +6,71 @@  discard block
 block discarded – undo
6 6
 define('EE_MIN_PHP_VER_RECOMMENDED', '5.6.32');
7 7
 define('EE_SUPPORT_EMAIL', '[email protected]');
8 8
 // used to be DIRECTORY_SEPARATOR, but that caused issues on windows
9
-if (! defined('DS')) {
9
+if ( ! defined('DS')) {
10 10
     define('DS', '/');
11 11
 }
12
-if (! defined('PS')) {
12
+if ( ! defined('PS')) {
13 13
     define('PS', PATH_SEPARATOR);
14 14
 }
15
-if (! defined('SP')) {
15
+if ( ! defined('SP')) {
16 16
     define('SP', ' ');
17 17
 }
18
-if (! defined('EENL')) {
18
+if ( ! defined('EENL')) {
19 19
     define('EENL', "\n");
20 20
 }
21 21
 // define the plugin directory and URL
22 22
 define('EE_PLUGIN_BASENAME', plugin_basename(EVENT_ESPRESSO_MAIN_FILE));
23
-define('EE_PLUGIN_DIR_PATH', dirname(EVENT_ESPRESSO_MAIN_FILE) . DS);
23
+define('EE_PLUGIN_DIR_PATH', dirname(EVENT_ESPRESSO_MAIN_FILE).DS);
24 24
 define('EE_PLUGIN_DIR_URL', plugin_dir_url(EVENT_ESPRESSO_MAIN_FILE));
25 25
 // main root folder paths
26
-define('EE_ADMIN_PAGES', EE_PLUGIN_DIR_PATH . 'admin_pages' . DS);
27
-define('EE_CORE', EE_PLUGIN_DIR_PATH . 'core' . DS);
28
-define('EE_MODULES', EE_PLUGIN_DIR_PATH . 'modules' . DS);
29
-define('EE_PUBLIC', EE_PLUGIN_DIR_PATH . 'public' . DS);
30
-define('EE_SHORTCODES', EE_PLUGIN_DIR_PATH . 'shortcodes' . DS);
31
-define('EE_WIDGETS', EE_PLUGIN_DIR_PATH . 'widgets' . DS);
32
-define('EE_PAYMENT_METHODS', EE_PLUGIN_DIR_PATH . 'payment_methods' . DS);
33
-define('EE_CAFF_PATH', EE_PLUGIN_DIR_PATH . 'caffeinated' . DS);
26
+define('EE_ADMIN_PAGES', EE_PLUGIN_DIR_PATH.'admin_pages'.DS);
27
+define('EE_CORE', EE_PLUGIN_DIR_PATH.'core'.DS);
28
+define('EE_MODULES', EE_PLUGIN_DIR_PATH.'modules'.DS);
29
+define('EE_PUBLIC', EE_PLUGIN_DIR_PATH.'public'.DS);
30
+define('EE_SHORTCODES', EE_PLUGIN_DIR_PATH.'shortcodes'.DS);
31
+define('EE_WIDGETS', EE_PLUGIN_DIR_PATH.'widgets'.DS);
32
+define('EE_PAYMENT_METHODS', EE_PLUGIN_DIR_PATH.'payment_methods'.DS);
33
+define('EE_CAFF_PATH', EE_PLUGIN_DIR_PATH.'caffeinated'.DS);
34 34
 // core system paths
35
-define('EE_ADMIN', EE_CORE . 'admin' . DS);
36
-define('EE_CPTS', EE_CORE . 'CPTs' . DS);
37
-define('EE_CLASSES', EE_CORE . 'db_classes' . DS);
38
-define('EE_INTERFACES', EE_CORE . 'interfaces' . DS);
39
-define('EE_BUSINESS', EE_CORE . 'business' . DS);
40
-define('EE_MODELS', EE_CORE . 'db_models' . DS);
41
-define('EE_HELPERS', EE_CORE . 'helpers' . DS);
42
-define('EE_LIBRARIES', EE_CORE . 'libraries' . DS);
43
-define('EE_TEMPLATES', EE_CORE . 'templates' . DS);
44
-define('EE_THIRD_PARTY', EE_CORE . 'third_party_libs' . DS);
45
-define('EE_GLOBAL_ASSETS', EE_TEMPLATES . 'global_assets' . DS);
46
-define('EE_FORM_SECTIONS', EE_LIBRARIES . 'form_sections' . DS);
35
+define('EE_ADMIN', EE_CORE.'admin'.DS);
36
+define('EE_CPTS', EE_CORE.'CPTs'.DS);
37
+define('EE_CLASSES', EE_CORE.'db_classes'.DS);
38
+define('EE_INTERFACES', EE_CORE.'interfaces'.DS);
39
+define('EE_BUSINESS', EE_CORE.'business'.DS);
40
+define('EE_MODELS', EE_CORE.'db_models'.DS);
41
+define('EE_HELPERS', EE_CORE.'helpers'.DS);
42
+define('EE_LIBRARIES', EE_CORE.'libraries'.DS);
43
+define('EE_TEMPLATES', EE_CORE.'templates'.DS);
44
+define('EE_THIRD_PARTY', EE_CORE.'third_party_libs'.DS);
45
+define('EE_GLOBAL_ASSETS', EE_TEMPLATES.'global_assets'.DS);
46
+define('EE_FORM_SECTIONS', EE_LIBRARIES.'form_sections'.DS);
47 47
 // gateways
48
-define('EE_GATEWAYS', EE_MODULES . 'gateways' . DS);
49
-define('EE_GATEWAYS_URL', EE_PLUGIN_DIR_URL . 'modules' . DS . 'gateways' . DS);
48
+define('EE_GATEWAYS', EE_MODULES.'gateways'.DS);
49
+define('EE_GATEWAYS_URL', EE_PLUGIN_DIR_URL.'modules'.DS.'gateways'.DS);
50 50
 // asset URL paths
51
-define('EE_TEMPLATES_URL', EE_PLUGIN_DIR_URL . 'core' . DS . 'templates' . DS);
52
-define('EE_GLOBAL_ASSETS_URL', EE_TEMPLATES_URL . 'global_assets' . DS);
53
-define('EE_IMAGES_URL', EE_GLOBAL_ASSETS_URL . 'images' . DS);
54
-define('EE_THIRD_PARTY_URL', EE_PLUGIN_DIR_URL . 'core' . DS . 'third_party_libs' . DS);
55
-define('EE_HELPERS_ASSETS', EE_PLUGIN_DIR_URL . 'core/helpers/assets/');
56
-define('EE_LIBRARIES_URL', EE_PLUGIN_DIR_URL . 'core/libraries/');
51
+define('EE_TEMPLATES_URL', EE_PLUGIN_DIR_URL.'core'.DS.'templates'.DS);
52
+define('EE_GLOBAL_ASSETS_URL', EE_TEMPLATES_URL.'global_assets'.DS);
53
+define('EE_IMAGES_URL', EE_GLOBAL_ASSETS_URL.'images'.DS);
54
+define('EE_THIRD_PARTY_URL', EE_PLUGIN_DIR_URL.'core'.DS.'third_party_libs'.DS);
55
+define('EE_HELPERS_ASSETS', EE_PLUGIN_DIR_URL.'core/helpers/assets/');
56
+define('EE_LIBRARIES_URL', EE_PLUGIN_DIR_URL.'core/libraries/');
57 57
 // define upload paths
58 58
 $uploads = wp_upload_dir();
59 59
 // define the uploads directory and URL
60
-define('EVENT_ESPRESSO_UPLOAD_DIR', $uploads['basedir'] . DS . 'espresso' . DS);
61
-define('EVENT_ESPRESSO_UPLOAD_URL', $uploads['baseurl'] . DS . 'espresso' . DS);
60
+define('EVENT_ESPRESSO_UPLOAD_DIR', $uploads['basedir'].DS.'espresso'.DS);
61
+define('EVENT_ESPRESSO_UPLOAD_URL', $uploads['baseurl'].DS.'espresso'.DS);
62 62
 // define the templates directory and URL
63
-define('EVENT_ESPRESSO_TEMPLATE_DIR', $uploads['basedir'] . DS . 'espresso' . DS . 'templates' . DS);
64
-define('EVENT_ESPRESSO_TEMPLATE_URL', $uploads['baseurl'] . DS . 'espresso' . DS . 'templates' . DS);
63
+define('EVENT_ESPRESSO_TEMPLATE_DIR', $uploads['basedir'].DS.'espresso'.DS.'templates'.DS);
64
+define('EVENT_ESPRESSO_TEMPLATE_URL', $uploads['baseurl'].DS.'espresso'.DS.'templates'.DS);
65 65
 // define the gateway directory and URL
66
-define('EVENT_ESPRESSO_GATEWAY_DIR', $uploads['basedir'] . DS . 'espresso' . DS . 'gateways' . DS);
67
-define('EVENT_ESPRESSO_GATEWAY_URL', $uploads['baseurl'] . DS . 'espresso' . DS . 'gateways' . DS);
66
+define('EVENT_ESPRESSO_GATEWAY_DIR', $uploads['basedir'].DS.'espresso'.DS.'gateways'.DS);
67
+define('EVENT_ESPRESSO_GATEWAY_URL', $uploads['baseurl'].DS.'espresso'.DS.'gateways'.DS);
68 68
 // languages folder/path
69
-define('EE_LANGUAGES_SAFE_LOC', '..' . DS . 'uploads' . DS . 'espresso' . DS . 'languages' . DS);
70
-define('EE_LANGUAGES_SAFE_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'languages' . DS);
69
+define('EE_LANGUAGES_SAFE_LOC', '..'.DS.'uploads'.DS.'espresso'.DS.'languages'.DS);
70
+define('EE_LANGUAGES_SAFE_DIR', EVENT_ESPRESSO_UPLOAD_DIR.'languages'.DS);
71 71
 // check for DOMPDF fonts in uploads
72
-if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS)) {
73
-    define('DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR . 'fonts' . DS);
72
+if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR.'fonts'.DS)) {
73
+    define('DOMPDF_FONT_DIR', EVENT_ESPRESSO_UPLOAD_DIR.'fonts'.DS);
74 74
 }
75 75
 // ajax constants
76 76
 define(
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
 define('EE_INF', INF > (float) PHP_INT_MAX ? INF : PHP_INT_MAX);
89 89
 define('EE_DEBUG', false);
90 90
 // for older WP versions
91
-if (! defined('MONTH_IN_SECONDS')) {
91
+if ( ! defined('MONTH_IN_SECONDS')) {
92 92
     define('MONTH_IN_SECONDS', DAY_IN_SECONDS * 30);
93 93
 }
Please login to merge, or discard this patch.
core/bootstrap_espresso.php 2 patches
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@  discard block
 block discarded – undo
6 6
  */
7 7
 function espresso_load_error_handling()
8 8
 {
9
-    static $error_handling_loaded = false;
10
-    if ($error_handling_loaded) {
11
-        return;
12
-    }
13
-    // load debugging tools
14
-    if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) {
15
-        require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php';
16
-        \EEH_Debug_Tools::instance();
17
-    }
18
-    // load error handling
19
-    if (is_readable(EE_CORE . 'EE_Error.core.php')) {
20
-        require_once EE_CORE . 'EE_Error.core.php';
21
-    } else {
22
-        wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso'));
23
-    }
24
-    $error_handling_loaded = true;
9
+	static $error_handling_loaded = false;
10
+	if ($error_handling_loaded) {
11
+		return;
12
+	}
13
+	// load debugging tools
14
+	if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) {
15
+		require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php';
16
+		\EEH_Debug_Tools::instance();
17
+	}
18
+	// load error handling
19
+	if (is_readable(EE_CORE . 'EE_Error.core.php')) {
20
+		require_once EE_CORE . 'EE_Error.core.php';
21
+	} else {
22
+		wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso'));
23
+	}
24
+	$error_handling_loaded = true;
25 25
 }
26 26
 
27 27
 
@@ -35,19 +35,19 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function espresso_load_required($classname, $full_path_to_file)
37 37
 {
38
-    if (is_readable($full_path_to_file)) {
39
-        require_once $full_path_to_file;
40
-    } else {
41
-        throw new \EE_Error(
42
-            sprintf(
43
-                esc_html__(
44
-                    'The %s class file could not be located or is not readable due to file permissions.',
45
-                    'event_espresso'
46
-                ),
47
-                $classname
48
-            )
49
-        );
50
-    }
38
+	if (is_readable($full_path_to_file)) {
39
+		require_once $full_path_to_file;
40
+	} else {
41
+		throw new \EE_Error(
42
+			sprintf(
43
+				esc_html__(
44
+					'The %s class file could not be located or is not readable due to file permissions.',
45
+					'event_espresso'
46
+				),
47
+				$classname
48
+			)
49
+		);
50
+	}
51 51
 }
52 52
 
53 53
 
@@ -66,39 +66,39 @@  discard block
 block discarded – undo
66 66
  */
67 67
 function bootstrap_espresso()
68 68
 {
69
-    require_once __DIR__ . '/espresso_definitions.php';
70
-    try {
71
-        espresso_load_error_handling();
72
-        espresso_load_required(
73
-            'EEH_Base',
74
-            EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php'
75
-        );
76
-        espresso_load_required(
77
-            'EEH_File',
78
-            EE_CORE . 'interfaces' . DS . 'EEHI_File.interface.php'
79
-        );
80
-        espresso_load_required(
81
-            'EEH_File',
82
-            EE_CORE . 'helpers' . DS . 'EEH_File.helper.php'
83
-        );
84
-        espresso_load_required(
85
-            'EEH_Array',
86
-            EE_CORE . 'helpers' . DS . 'EEH_Array.helper.php'
87
-        );
88
-        // instantiate and configure PSR4 autoloader
89
-        espresso_load_required(
90
-            'Psr4Autoloader',
91
-            EE_CORE . 'Psr4Autoloader.php'
92
-        );
93
-        espresso_load_required(
94
-            'EE_Psr4AutoloaderInit',
95
-            EE_CORE . 'EE_Psr4AutoloaderInit.core.php'
96
-        );
97
-        $AutoloaderInit = new EE_Psr4AutoloaderInit();
98
-        $AutoloaderInit->initializeAutoloader();
99
-        new EventEspresso\core\services\bootstrap\BootstrapCore();
100
-    } catch (Exception $e) {
101
-        require_once EE_CORE . 'exceptions' . DS . 'ExceptionStackTraceDisplay.php';
102
-        new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e);
103
-    }
69
+	require_once __DIR__ . '/espresso_definitions.php';
70
+	try {
71
+		espresso_load_error_handling();
72
+		espresso_load_required(
73
+			'EEH_Base',
74
+			EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php'
75
+		);
76
+		espresso_load_required(
77
+			'EEH_File',
78
+			EE_CORE . 'interfaces' . DS . 'EEHI_File.interface.php'
79
+		);
80
+		espresso_load_required(
81
+			'EEH_File',
82
+			EE_CORE . 'helpers' . DS . 'EEH_File.helper.php'
83
+		);
84
+		espresso_load_required(
85
+			'EEH_Array',
86
+			EE_CORE . 'helpers' . DS . 'EEH_Array.helper.php'
87
+		);
88
+		// instantiate and configure PSR4 autoloader
89
+		espresso_load_required(
90
+			'Psr4Autoloader',
91
+			EE_CORE . 'Psr4Autoloader.php'
92
+		);
93
+		espresso_load_required(
94
+			'EE_Psr4AutoloaderInit',
95
+			EE_CORE . 'EE_Psr4AutoloaderInit.core.php'
96
+		);
97
+		$AutoloaderInit = new EE_Psr4AutoloaderInit();
98
+		$AutoloaderInit->initializeAutoloader();
99
+		new EventEspresso\core\services\bootstrap\BootstrapCore();
100
+	} catch (Exception $e) {
101
+		require_once EE_CORE . 'exceptions' . DS . 'ExceptionStackTraceDisplay.php';
102
+		new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e);
103
+	}
104 104
 }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
         return;
12 12
     }
13 13
     // load debugging tools
14
-    if (WP_DEBUG === true && is_readable(EE_HELPERS . 'EEH_Debug_Tools.helper.php')) {
15
-        require_once EE_HELPERS . 'EEH_Debug_Tools.helper.php';
14
+    if (WP_DEBUG === true && is_readable(EE_HELPERS.'EEH_Debug_Tools.helper.php')) {
15
+        require_once EE_HELPERS.'EEH_Debug_Tools.helper.php';
16 16
         \EEH_Debug_Tools::instance();
17 17
     }
18 18
     // load error handling
19
-    if (is_readable(EE_CORE . 'EE_Error.core.php')) {
20
-        require_once EE_CORE . 'EE_Error.core.php';
19
+    if (is_readable(EE_CORE.'EE_Error.core.php')) {
20
+        require_once EE_CORE.'EE_Error.core.php';
21 21
     } else {
22 22
         wp_die(esc_html__('The EE_Error core class could not be loaded.', 'event_espresso'));
23 23
     }
@@ -66,39 +66,39 @@  discard block
 block discarded – undo
66 66
  */
67 67
 function bootstrap_espresso()
68 68
 {
69
-    require_once __DIR__ . '/espresso_definitions.php';
69
+    require_once __DIR__.'/espresso_definitions.php';
70 70
     try {
71 71
         espresso_load_error_handling();
72 72
         espresso_load_required(
73 73
             'EEH_Base',
74
-            EE_CORE . 'helpers' . DS . 'EEH_Base.helper.php'
74
+            EE_CORE.'helpers'.DS.'EEH_Base.helper.php'
75 75
         );
76 76
         espresso_load_required(
77 77
             'EEH_File',
78
-            EE_CORE . 'interfaces' . DS . 'EEHI_File.interface.php'
78
+            EE_CORE.'interfaces'.DS.'EEHI_File.interface.php'
79 79
         );
80 80
         espresso_load_required(
81 81
             'EEH_File',
82
-            EE_CORE . 'helpers' . DS . 'EEH_File.helper.php'
82
+            EE_CORE.'helpers'.DS.'EEH_File.helper.php'
83 83
         );
84 84
         espresso_load_required(
85 85
             'EEH_Array',
86
-            EE_CORE . 'helpers' . DS . 'EEH_Array.helper.php'
86
+            EE_CORE.'helpers'.DS.'EEH_Array.helper.php'
87 87
         );
88 88
         // instantiate and configure PSR4 autoloader
89 89
         espresso_load_required(
90 90
             'Psr4Autoloader',
91
-            EE_CORE . 'Psr4Autoloader.php'
91
+            EE_CORE.'Psr4Autoloader.php'
92 92
         );
93 93
         espresso_load_required(
94 94
             'EE_Psr4AutoloaderInit',
95
-            EE_CORE . 'EE_Psr4AutoloaderInit.core.php'
95
+            EE_CORE.'EE_Psr4AutoloaderInit.core.php'
96 96
         );
97 97
         $AutoloaderInit = new EE_Psr4AutoloaderInit();
98 98
         $AutoloaderInit->initializeAutoloader();
99 99
         new EventEspresso\core\services\bootstrap\BootstrapCore();
100 100
     } catch (Exception $e) {
101
-        require_once EE_CORE . 'exceptions' . DS . 'ExceptionStackTraceDisplay.php';
101
+        require_once EE_CORE.'exceptions'.DS.'ExceptionStackTraceDisplay.php';
102 102
         new EventEspresso\core\exceptions\ExceptionStackTraceDisplay($e);
103 103
     }
104 104
 }
Please login to merge, or discard this patch.