@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | use EventEspresso\core\services\commands\CommandInterface; |
8 | 8 | |
9 | 9 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
10 | - exit('No direct script access allowed'); |
|
10 | + exit('No direct script access allowed'); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | |
@@ -26,40 +26,40 @@ discard block |
||
26 | 26 | { |
27 | 27 | |
28 | 28 | |
29 | - /** |
|
30 | - * @var CopyRegistrationService $copy_registration_service |
|
31 | - */ |
|
32 | - private $copy_registration_service; |
|
33 | - |
|
34 | - |
|
35 | - |
|
36 | - /** |
|
37 | - * Command constructor |
|
38 | - * |
|
39 | - * @param CopyRegistrationService $copy_registration_service |
|
40 | - */ |
|
41 | - public function __construct(CopyRegistrationService $copy_registration_service) |
|
42 | - { |
|
43 | - $this->copy_registration_service = $copy_registration_service; |
|
44 | - } |
|
45 | - |
|
46 | - |
|
47 | - |
|
48 | - /** |
|
49 | - * @param \EventEspresso\core\services\commands\CommandInterface $command |
|
50 | - * @return boolean |
|
51 | - */ |
|
52 | - public function handle(CommandInterface $command) |
|
53 | - { |
|
54 | - /** @var CopyRegistrationPaymentsCommand $command */ |
|
55 | - if ( ! $command instanceof CopyRegistrationPaymentsCommand) { |
|
56 | - throw new InvalidEntityException(get_class($command), 'CopyRegistrationPaymentsCommand'); |
|
57 | - } |
|
58 | - return $this->copy_registration_service->copyPaymentDetails( |
|
59 | - $command->targetRegistration(), |
|
60 | - $command->registrationToCopy() |
|
61 | - ); |
|
62 | - } |
|
29 | + /** |
|
30 | + * @var CopyRegistrationService $copy_registration_service |
|
31 | + */ |
|
32 | + private $copy_registration_service; |
|
33 | + |
|
34 | + |
|
35 | + |
|
36 | + /** |
|
37 | + * Command constructor |
|
38 | + * |
|
39 | + * @param CopyRegistrationService $copy_registration_service |
|
40 | + */ |
|
41 | + public function __construct(CopyRegistrationService $copy_registration_service) |
|
42 | + { |
|
43 | + $this->copy_registration_service = $copy_registration_service; |
|
44 | + } |
|
45 | + |
|
46 | + |
|
47 | + |
|
48 | + /** |
|
49 | + * @param \EventEspresso\core\services\commands\CommandInterface $command |
|
50 | + * @return boolean |
|
51 | + */ |
|
52 | + public function handle(CommandInterface $command) |
|
53 | + { |
|
54 | + /** @var CopyRegistrationPaymentsCommand $command */ |
|
55 | + if ( ! $command instanceof CopyRegistrationPaymentsCommand) { |
|
56 | + throw new InvalidEntityException(get_class($command), 'CopyRegistrationPaymentsCommand'); |
|
57 | + } |
|
58 | + return $this->copy_registration_service->copyPaymentDetails( |
|
59 | + $command->targetRegistration(), |
|
60 | + $command->registrationToCopy() |
|
61 | + ); |
|
62 | + } |
|
63 | 63 | |
64 | 64 | |
65 | 65 |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | use EventEspresso\core\services\commands\CommandHandler; |
7 | 7 | use EventEspresso\core\services\commands\CommandInterface; |
8 | 8 | |
9 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
10 | - exit( 'No direct script access allowed' ); |
|
9 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
10 | + exit('No direct script access allowed'); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | * @param \EventEspresso\core\services\commands\CommandInterface $command |
49 | 49 | * @return boolean |
50 | 50 | */ |
51 | - public function handle( CommandInterface $command ) |
|
51 | + public function handle(CommandInterface $command) |
|
52 | 52 | { |
53 | 53 | /** @var UpdateRegistrationAndTransactionAfterChangeCommand $command */ |
54 | - if ( ! $command instanceof UpdateRegistrationAndTransactionAfterChangeCommand ) { |
|
54 | + if ( ! $command instanceof UpdateRegistrationAndTransactionAfterChangeCommand) { |
|
55 | 55 | throw new InvalidEntityException( |
56 | 56 | get_class($command), |
57 | 57 | 'UpdateRegistrationAndTransactionAfterChangeCommand' |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\exceptions; |
3 | 3 | |
4 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
5 | - exit( 'No direct script access allowed' ); |
|
4 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @param \Exception $exception |
26 | 26 | */ |
27 | - public function __construct( \Exception $exception ) { |
|
28 | - $this->log( $exception ); |
|
27 | + public function __construct(\Exception $exception) { |
|
28 | + $this->log($exception); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | |
@@ -36,22 +36,22 @@ discard block |
||
36 | 36 | * @param \Exception $exception |
37 | 37 | * @param int $time |
38 | 38 | */ |
39 | - public function log( \Exception $exception, $time = 0 ) { |
|
40 | - if ( ! $time ) { |
|
39 | + public function log(\Exception $exception, $time = 0) { |
|
40 | + if ( ! $time) { |
|
41 | 41 | $time = time(); |
42 | 42 | } |
43 | 43 | $exception_log = '----------------------------------------------------------------------------------------'; |
44 | 44 | $exception_log .= PHP_EOL; |
45 | - $exception_log .= '[' . date( 'Y-m-d H:i:s', $time ) . '] Exception Details' . PHP_EOL; |
|
46 | - $exception_log .= 'Message: ' . $exception->getMessage() . PHP_EOL; |
|
47 | - $exception_log .= 'Code: ' . $exception->getCode() . PHP_EOL; |
|
48 | - $exception_log .= 'File: ' . $exception->getFile() . PHP_EOL; |
|
49 | - $exception_log .= 'Line No: ' . $exception->getLine() . PHP_EOL; |
|
50 | - $exception_log .= 'Stack trace: ' . PHP_EOL; |
|
51 | - $exception_log .= $exception->getTraceAsString() . PHP_EOL; |
|
45 | + $exception_log .= '['.date('Y-m-d H:i:s', $time).'] Exception Details'.PHP_EOL; |
|
46 | + $exception_log .= 'Message: '.$exception->getMessage().PHP_EOL; |
|
47 | + $exception_log .= 'Code: '.$exception->getCode().PHP_EOL; |
|
48 | + $exception_log .= 'File: '.$exception->getFile().PHP_EOL; |
|
49 | + $exception_log .= 'Line No: '.$exception->getLine().PHP_EOL; |
|
50 | + $exception_log .= 'Stack trace: '.PHP_EOL; |
|
51 | + $exception_log .= $exception->getTraceAsString().PHP_EOL; |
|
52 | 52 | $exception_log .= '----------------------------------------------------------------------------------------'; |
53 | - $exception_log .= PHP_EOL; |
|
54 | - error_log( $exception_log ); |
|
53 | + $exception_log .= PHP_EOL; |
|
54 | + error_log($exception_log); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container\exceptions; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -18,28 +18,28 @@ discard block |
||
18 | 18 | class ServiceNotFoundException extends \RuntimeException |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * ServiceNotFoundException constructor |
|
23 | - * |
|
24 | - * @param string $service_name the name of the requested service |
|
25 | - * @param string $message |
|
26 | - * @param int $code |
|
27 | - * @param \Exception $previous |
|
28 | - */ |
|
29 | - public function __construct( |
|
30 | - $service_name, |
|
31 | - $message = '', |
|
32 | - $code = 0, |
|
33 | - \Exception $previous = null |
|
34 | - ) { |
|
35 | - if (empty($message)) { |
|
36 | - $message = sprintf( |
|
37 | - __('The requested service "%1$s" could not found be found in the CoffeeShop.', 'event_espresso'), |
|
38 | - $service_name |
|
39 | - ); |
|
40 | - } |
|
41 | - parent::__construct($message, $code, $previous); |
|
42 | - } |
|
21 | + /** |
|
22 | + * ServiceNotFoundException constructor |
|
23 | + * |
|
24 | + * @param string $service_name the name of the requested service |
|
25 | + * @param string $message |
|
26 | + * @param int $code |
|
27 | + * @param \Exception $previous |
|
28 | + */ |
|
29 | + public function __construct( |
|
30 | + $service_name, |
|
31 | + $message = '', |
|
32 | + $code = 0, |
|
33 | + \Exception $previous = null |
|
34 | + ) { |
|
35 | + if (empty($message)) { |
|
36 | + $message = sprintf( |
|
37 | + __('The requested service "%1$s" could not found be found in the CoffeeShop.', 'event_espresso'), |
|
38 | + $service_name |
|
39 | + ); |
|
40 | + } |
|
41 | + parent::__construct($message, $code, $previous); |
|
42 | + } |
|
43 | 43 | } |
44 | 44 | // End of file ServiceNotFoundException.php |
45 | 45 | // Location: /ServiceNotFoundException.php |
46 | 46 | \ No newline at end of file |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container\exceptions; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -19,28 +19,28 @@ discard block |
||
19 | 19 | { |
20 | 20 | |
21 | 21 | |
22 | - /** |
|
23 | - * ServiceExistsException constructor |
|
24 | - * |
|
25 | - * @param string $service_name the name of the requested service |
|
26 | - * @param string $message |
|
27 | - * @param int $code |
|
28 | - * @param \Exception $previous |
|
29 | - */ |
|
30 | - public function __construct( |
|
31 | - $service_name, |
|
32 | - $message = '', |
|
33 | - $code = 0, |
|
34 | - \Exception $previous = null |
|
35 | - ) { |
|
36 | - if (empty($message)) { |
|
37 | - $message = sprintf( |
|
38 | - __('The "%1$s" service already exists in the CoffeeShop and can not be added again.', 'event_espresso'), |
|
39 | - $service_name |
|
40 | - ); |
|
41 | - } |
|
42 | - parent::__construct($message, $code, $previous); |
|
43 | - } |
|
22 | + /** |
|
23 | + * ServiceExistsException constructor |
|
24 | + * |
|
25 | + * @param string $service_name the name of the requested service |
|
26 | + * @param string $message |
|
27 | + * @param int $code |
|
28 | + * @param \Exception $previous |
|
29 | + */ |
|
30 | + public function __construct( |
|
31 | + $service_name, |
|
32 | + $message = '', |
|
33 | + $code = 0, |
|
34 | + \Exception $previous = null |
|
35 | + ) { |
|
36 | + if (empty($message)) { |
|
37 | + $message = sprintf( |
|
38 | + __('The "%1$s" service already exists in the CoffeeShop and can not be added again.', 'event_espresso'), |
|
39 | + $service_name |
|
40 | + ); |
|
41 | + } |
|
42 | + parent::__construct($message, $code, $previous); |
|
43 | + } |
|
44 | 44 | |
45 | 45 | |
46 | 46 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | namespace EventEspresso\core\services\container\exceptions; |
3 | 3 | |
4 | 4 | if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
5 | - exit('No direct script access allowed'); |
|
5 | + exit('No direct script access allowed'); |
|
6 | 6 | } |
7 | 7 | |
8 | 8 | |
@@ -18,29 +18,29 @@ discard block |
||
18 | 18 | class InvalidServiceException extends \UnexpectedValueException |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * InvalidServiceException constructor. |
|
23 | - * |
|
24 | - * @param string $service_name the name of the requested service |
|
25 | - * @param string $actual classname of what we got |
|
26 | - * @param string $message |
|
27 | - * @param int $code |
|
28 | - * @param \Exception $previous |
|
29 | - */ |
|
30 | - public function __construct($service_name, $actual, $message = '', $code = 0, \Exception $previous = null) |
|
31 | - { |
|
32 | - if (empty($message)) { |
|
33 | - $message = sprintf( |
|
34 | - __( |
|
35 | - 'The "%1$s" service could not be retrieved from the CoffeeShop, but "%2$s" was received.', |
|
36 | - 'event_espresso' |
|
37 | - ), |
|
38 | - $service_name, |
|
39 | - print_r($actual, true) |
|
40 | - ); |
|
41 | - } |
|
42 | - parent::__construct($message, $code, $previous); |
|
43 | - } |
|
21 | + /** |
|
22 | + * InvalidServiceException constructor. |
|
23 | + * |
|
24 | + * @param string $service_name the name of the requested service |
|
25 | + * @param string $actual classname of what we got |
|
26 | + * @param string $message |
|
27 | + * @param int $code |
|
28 | + * @param \Exception $previous |
|
29 | + */ |
|
30 | + public function __construct($service_name, $actual, $message = '', $code = 0, \Exception $previous = null) |
|
31 | + { |
|
32 | + if (empty($message)) { |
|
33 | + $message = sprintf( |
|
34 | + __( |
|
35 | + 'The "%1$s" service could not be retrieved from the CoffeeShop, but "%2$s" was received.', |
|
36 | + 'event_espresso' |
|
37 | + ), |
|
38 | + $service_name, |
|
39 | + print_r($actual, true) |
|
40 | + ); |
|
41 | + } |
|
42 | + parent::__construct($message, $code, $previous); |
|
43 | + } |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | // End of file InvalidServiceException.php |
@@ -51,7 +51,7 @@ |
||
51 | 51 | </table> |
52 | 52 | <div class="ee-editor-footer-container"> |
53 | 53 | <div class="ee-editor-id-container"> |
54 | - <span class="ee-item-id"><?php echo $DTT_ID ? sprintf( esc_html__( 'Datetime ID: %d', 'event_espresso' ), $DTT_ID ) : ''; ?></span> |
|
54 | + <span class="ee-item-id"><?php echo $DTT_ID ? sprintf(esc_html__('Datetime ID: %d', 'event_espresso'), $DTT_ID) : ''; ?></span> |
|
55 | 55 | </div> |
56 | 56 | <div class="save-cancel-button-container"> |
57 | 57 | <button data-context="short-ticket" data-datetime-row="<?php echo $dtt_row; ?>" class="button-primary ee-create-button"> |
@@ -1,1 +1,1 @@ |
||
1 | -<?php printf( esc_html__('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.', 'event_espresso'), '<a href="https://eventespresso.com/go/authorizenetaim/" target="_blank">','</a>' ); |
|
2 | 1 | \ No newline at end of file |
2 | +<?php printf(esc_html__('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.', 'event_espresso'), '<a href="https://eventespresso.com/go/authorizenetaim/" target="_blank">', '</a>'); |
|
3 | 3 | \ No newline at end of file |
@@ -1,1 +1,1 @@ |
||
1 | -<?php printf( esc_html__('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.', 'event_espresso'), '<a href="https://eventespresso.com/go/paypalpro/" target="_blank">','</a>' ); |
|
2 | 1 | \ No newline at end of file |
2 | +<?php printf(esc_html__('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.', 'event_espresso'), '<a href="https://eventespresso.com/go/paypalpro/" target="_blank">', '</a>'); |
|
3 | 3 | \ No newline at end of file |