@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -23,30 +23,30 @@ |
||
23 | 23 | abstract class Command implements CommandInterface |
24 | 24 | { |
25 | 25 | |
26 | - /* |
|
26 | + /* |
|
27 | 27 | * @var CapCheckInterface $cap_check |
28 | 28 | */ |
29 | - protected $cap_check; |
|
29 | + protected $cap_check; |
|
30 | 30 | |
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * @return mixed |
|
35 | - */ |
|
36 | - public function getCapCheck() |
|
37 | - { |
|
38 | - return $this->cap_check; |
|
39 | - } |
|
33 | + /** |
|
34 | + * @return mixed |
|
35 | + */ |
|
36 | + public function getCapCheck() |
|
37 | + { |
|
38 | + return $this->cap_check; |
|
39 | + } |
|
40 | 40 | |
41 | 41 | |
42 | 42 | |
43 | - /** |
|
44 | - * @param CapCheckInterface $cap_check |
|
45 | - */ |
|
46 | - public function setCapCheck(CapCheckInterface $cap_check) |
|
47 | - { |
|
48 | - $this->cap_check = $cap_check; |
|
49 | - } |
|
43 | + /** |
|
44 | + * @param CapCheckInterface $cap_check |
|
45 | + */ |
|
46 | + public function setCapCheck(CapCheckInterface $cap_check) |
|
47 | + { |
|
48 | + $this->cap_check = $cap_check; |
|
49 | + } |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | // End of file Command.php |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * DTO for passing data to a UpdateRegistrationAndTransactionAfterChangeCommandHandler |
13 | 13 | * |
14 | 14 | * @package Event Espresso |
15 | - |
|
16 | -*@author Brent Christensen |
|
15 | + *@author Brent Christensen |
|
17 | 16 | * @since $VID:$ |
18 | 17 | */ |
19 | 18 | class UpdateRegistrationAndTransactionAfterChangeCommand extends SingleRegistrationCommand |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
3 | - exit( 'No direct script access allowed' ); |
|
2 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
3 | + exit('No direct script access allowed'); |
|
4 | 4 | } |
5 | 5 | /** |
6 | 6 | * Class EE_Line_Item_Filter_Collection |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\commands; |
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 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @param \EventEspresso\core\services\commands\CommandInterface $command |
24 | 24 | * @return mixed |
25 | 25 | */ |
26 | - public function execute( $command ); |
|
26 | + public function execute($command); |
|
27 | 27 | |
28 | 28 | } |
29 | 29 | // End of file CommandBusInterface.php |
@@ -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 | |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | * @param int $code |
29 | 29 | * @param \Exception $previous |
30 | 30 | */ |
31 | - public function __construct( $var_name, $variable, $expected, $message = '', $code = 0, \Exception $previous = null ) { |
|
32 | - if ( empty( $message ) ) { |
|
33 | - $expected = strpos( ' was expected.', $expected ) === false |
|
34 | - ? $this->addIndefiniteArticle( $expected ) . ' was expected.' |
|
31 | + public function __construct($var_name, $variable, $expected, $message = '', $code = 0, \Exception $previous = null) { |
|
32 | + if (empty($message)) { |
|
33 | + $expected = strpos(' was expected.', $expected) === false |
|
34 | + ? $this->addIndefiniteArticle($expected).' was expected.' |
|
35 | 35 | : $expected; |
36 | 36 | $message = sprintf( |
37 | 37 | __( |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | 'event_espresso' |
40 | 40 | ), |
41 | 41 | $var_name, |
42 | - $this->addIndefiniteArticle( gettype( $variable ) ), |
|
42 | + $this->addIndefiniteArticle(gettype($variable)), |
|
43 | 43 | $expected |
44 | 44 | ); |
45 | 45 | } |
46 | - parent::__construct( $message, $code, $previous ); |
|
46 | + parent::__construct($message, $code, $previous); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | * @param $string |
53 | 53 | * @return string |
54 | 54 | */ |
55 | - protected function addIndefiniteArticle( $string ) { |
|
56 | - if ( strtolower( $string ) === 'null' ) { |
|
55 | + protected function addIndefiniteArticle($string) { |
|
56 | + if (strtolower($string) === 'null') { |
|
57 | 57 | return $string; |
58 | 58 | } |
59 | - return ( stripos( 'aeiou', $string[0] ) !== false ? 'an ' : 'a ' ) . $string; |
|
59 | + return (stripos('aeiou', $string[0]) !== false ? 'an ' : 'a ').$string; |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | // End of file InvalidDataTypeException.php |