Skip to content

Commit de94a1b

Browse files
committed
formatting and type fixes
1 parent cac5db8 commit de94a1b

File tree

78 files changed

+4590
-3359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4590
-3359
lines changed

caffeinated/admin/extend/events/Extend_Events_Admin_Page.core.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,13 +1093,13 @@ public function espresso_event_months_dropdown()
10931093
{
10941094
// what we need to do is get all PRIMARY datetimes for all events to filter on.
10951095
// Note we need to include any other filters that are set!
1096-
$status = isset($this->_req_data['status']) ? $this->_req_data['status'] : null;
1096+
$status = isset($this->_req_data['status']) ? $this->_req_data['status'] : '';
10971097
// categories?
10981098
$category = isset($this->_req_data['EVT_CAT']) && $this->_req_data['EVT_CAT'] > 0
10991099
? $this->_req_data['EVT_CAT']
1100-
: null;
1100+
: '';
11011101
// active status?
1102-
$active_status = isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : null;
1102+
$active_status = isset($this->_req_data['active_status']) ? $this->_req_data['active_status'] : '';
11031103
$cur_date = isset($this->_req_data['month_range']) ? $this->_req_data['month_range'] : '';
11041104
return EEH_Form_Fields::generate_event_months_dropdown($cur_date, $status, $category, $active_status);
11051105
}
@@ -1126,6 +1126,7 @@ public function active_status_dropdown($current_value = '')
11261126
}
11271127

11281128

1129+
11291130
/**
11301131
* returns a list of "venues"
11311132
*

core/EE_Deprecated.core.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ function ee_deprecated_update_attendee_registration_form_old($admin_page)
385385
foreach ($qstns as $QST_ID => $qstn) {
386386
// if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
387387
if (! is_array($qstn)) {
388-
$success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
388+
$success = EE_Answer::new_instance([ 'QST_ID' => $QST_ID, 'REG_ID' => $REG_ID ]);
389389
continue;
390390
}
391391

@@ -463,9 +463,7 @@ function ee_deprecated_reg_questions_meta_box_old($do_default_action, $admin_pag
463463

464464
$question_groups = EEM_Event::instance()->assemble_array_of_groups_questions_and_options(
465465
$registration,
466-
$registration->get(
467-
'EVT_ID'
468-
)
466+
$registration->get('EVT_ID')
469467
);
470468

471469
EE_Registry::instance()->load_helper('Form_Fields');

core/business/EE_Transaction_Processor.class.php

Lines changed: 48 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ private function _set_registration_query_params($registration_query_params)
9090
* @param array $registration_query_params array of query WHERE params to use
9191
* when retrieving cached registrations from a transaction
9292
* @return boolean
93-
* @throws \EE_Error
93+
* @throws EE_Error
94+
* @throws ReflectionException
9495
*/
9596
public function manually_update_registration_statuses(
9697
EE_Transaction $transaction,
@@ -127,7 +128,7 @@ public function manually_update_registration_statuses(
127128
* @param array $registration_query_params array of query WHERE params to use
128129
* when retrieving cached registrations from a transaction
129130
* @return boolean
130-
* @throws \EE_Error
131+
* @throws EE_Error
131132
*/
132133
public function toggle_registration_statuses_for_default_approved_events(
133134
EE_Transaction $transaction,
@@ -155,7 +156,7 @@ public function toggle_registration_statuses_for_default_approved_events(
155156
* @param array $registration_query_params array of query WHERE params to use
156157
* when retrieving cached registrations from a transaction
157158
* @return boolean
158-
* @throws \EE_Error
159+
* @throws EE_Error
159160
*/
160161
public function toggle_registration_statuses_if_no_monies_owing(
161162
EE_Transaction $transaction,
@@ -179,21 +180,22 @@ public function toggle_registration_statuses_if_no_monies_owing(
179180
* update_transaction_and_registrations_after_checkout_or_payment
180181
* cycles thru related registrations and calls update_registration_after_checkout_or_payment() on each
181182
*
182-
* @param EE_Transaction $transaction
183-
* @param \EE_Payment | NULL $payment
184-
* @param array $registration_query_params array of query WHERE params to use
183+
* @param EE_Transaction $transaction
184+
* @param EE_Payment | NULL $payment
185+
* @param array $registration_query_params array of query WHERE params to use
185186
* when retrieving cached registrations from a transaction
186-
* @param bool $trigger_notifications whether or not to call
187+
* @param bool $trigger_notifications whether or not to call
187188
* \EE_Registration_Processor::trigger_registration_update_notifications()
188189
* @return array
189-
* @throws \EE_Error
190+
* @throws EE_Error
191+
* @throws ReflectionException
190192
*/
191193
public function update_transaction_and_registrations_after_checkout_or_payment(
192194
EE_Transaction $transaction,
193195
$payment = null,
194196
$registration_query_params = array(),
195197
$trigger_notifications = true
196-
) {
198+
): array {
197199
// make sure some query params are set for retrieving registrations
198200
$this->_set_registration_query_params($registration_query_params);
199201
// get final reg step status
@@ -244,11 +246,12 @@ public function update_transaction_and_registrations_after_checkout_or_payment(
244246
* readjusts TXN and Line Item totals after a registration is changed from
245247
* cancelled or declined to another reg status such as pending payment or approved
246248
*
247-
* @param \EE_Registration $registration
248-
* @param array $closed_reg_statuses
249-
* @param bool $update_txn
249+
* @param EE_Registration $registration
250+
* @param array $closed_reg_statuses
251+
* @param bool $update_txn
250252
* @return bool
251-
* @throws \EE_Error
253+
* @throws EE_Error
254+
* @throws ReflectionException
252255
*/
253256
public function update_transaction_after_reinstating_canceled_registration(
254257
EE_Registration $registration,
@@ -297,11 +300,12 @@ public function update_transaction_after_reinstating_canceled_registration(
297300
* update_transaction_after_canceled_or_declined_registration
298301
* readjusts TXN and Line Item totals after a registration is cancelled or declined
299302
*
300-
* @param \EE_Registration $registration
301-
* @param array $closed_reg_statuses
302-
* @param bool $update_txn
303+
* @param EE_Registration $registration
304+
* @param array $closed_reg_statuses
305+
* @param bool $update_txn
303306
* @return bool
304-
* @throws \EE_Error
307+
* @throws EE_Error
308+
* @throws ReflectionException
305309
*/
306310
public function update_transaction_after_canceled_or_declined_registration(
307311
EE_Registration $registration,
@@ -381,10 +385,11 @@ public function get_transaction_for_registration(EE_Registration $registration)
381385
* get_ticket_line_item_for_transaction_registration
382386
*
383387
* @access public
384-
* @param EE_Transaction $transaction
385-
* @param EE_Registration $registration
388+
* @param EE_Transaction $transaction
389+
* @param EE_Registration $registration
386390
* @return EE_Line_Item
387391
* @throws EE_Error
392+
* @throws ReflectionException
388393
*/
389394
public function get_ticket_line_item_for_transaction_registration(
390395
EE_Transaction $transaction,
@@ -466,8 +471,9 @@ public function toggle_transaction_status_if_all_registrations_canceled_or_decli
466471
* @param array $registration_query_params array of query WHERE params to use
467472
* when retrieving cached registrations from a transaction
468473
* @param string $additional_param
469-
* @throws \EE_Error
470474
* @return boolean
475+
* @throws ReflectionException
476+
* @throws EE_Error
471477
*/
472478
private function _call_method_on_registrations_via_Registration_Processor(
473479
$method_name,
@@ -511,9 +517,10 @@ private function _call_method_on_registrations_via_Registration_Processor(
511517
* the first active Payment Method
512518
* whichever is found first.
513519
*
514-
* @param EE_Registration $edited_registration
520+
* @param EE_Registration $edited_registration
515521
* @return void
516-
* @throws \EE_Error
522+
* @throws EE_Error
523+
* @throws ReflectionException
517524
*/
518525
public function set_transaction_payment_method_based_on_registration_statuses(
519526
EE_Registration $edited_registration
@@ -817,12 +824,12 @@ public function final_reg_step_completed(EE_Transaction $transaction)
817824
* set_reg_step_initiated
818825
* given a valid TXN_reg_step, this sets it's value to a unix timestamp
819826
*
827+
* @param EE_Transaction $transaction
828+
* @param string $reg_step_slug
829+
* @return boolean
830+
* @throws EE_Error*@throws ReflectionException
820831
* @deprecated 4.9.12
821832
* @access public
822-
* @param \EE_Transaction $transaction
823-
* @param string $reg_step_slug
824-
* @return boolean
825-
* @throws \EE_Error
826833
*/
827834
public function set_reg_step_initiated(EE_Transaction $transaction, $reg_step_slug)
828835
{
@@ -843,12 +850,12 @@ public function set_reg_step_initiated(EE_Transaction $transaction, $reg_step_sl
843850
* set_reg_step_completed
844851
* given a valid TXN_reg_step, this sets the step as completed
845852
*
853+
* @param EE_Transaction $transaction
854+
* @param string $reg_step_slug
855+
* @return boolean
856+
* @throws EE_Error*@throws ReflectionException
846857
* @deprecated 4.9.12
847858
* @access public
848-
* @param \EE_Transaction $transaction
849-
* @param string $reg_step_slug
850-
* @return boolean
851-
* @throws \EE_Error
852859
*/
853860
public function set_reg_step_completed(EE_Transaction $transaction, $reg_step_slug)
854861
{
@@ -869,12 +876,12 @@ public function set_reg_step_completed(EE_Transaction $transaction, $reg_step_sl
869876
* set_reg_step_completed
870877
* given a valid TXN_reg_step slug, this sets the step as NOT completed
871878
*
879+
* @param EE_Transaction $transaction
880+
* @param string $reg_step_slug
881+
* @return boolean
882+
* @throws EE_Error*@throws ReflectionException
872883
* @deprecated 4.9.12
873884
* @access public
874-
* @param \EE_Transaction $transaction
875-
* @param string $reg_step_slug
876-
* @return boolean
877-
* @throws \EE_Error
878885
*/
879886
public function set_reg_step_not_completed(EE_Transaction $transaction, $reg_step_slug)
880887
{
@@ -896,11 +903,11 @@ public function set_reg_step_not_completed(EE_Transaction $transaction, $reg_ste
896903
* given a valid TXN_reg_step slug, this will remove (unset)
897904
* the reg step from the TXN reg step array
898905
*
899-
* @deprecated 4.9.12
900-
* @access public
901-
* @param \EE_Transaction $transaction
902-
* @param string $reg_step_slug
906+
* @param EE_Transaction $transaction
907+
* @param string $reg_step_slug
903908
* @return void
909+
*@deprecated 4.9.12
910+
* @access public
904911
*/
905912
public function remove_reg_step(EE_Transaction $transaction, $reg_step_slug)
906913
{
@@ -922,11 +929,11 @@ public function remove_reg_step(EE_Transaction $transaction, $reg_step_slug)
922929
* upgrades a TXNs status from failed to abandoned,
923930
* meaning that contact information has been captured for at least one registrant
924931
*
925-
* @deprecated 4.9.12
926-
* @access public
927932
* @param EE_Transaction $transaction
928933
* @return boolean
929-
* @throws \EE_Error
934+
* @throws EE_Error*@throws ReflectionException
935+
* @deprecated 4.9.12
936+
* @access public
930937
*/
931938
public function toggle_failed_transaction_status(EE_Transaction $transaction)
932939
{

0 commit comments

Comments
 (0)