@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace EventEspresso\core\services\cart; |
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 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @return string |
35 | 35 | */ |
36 | 36 | public function SKU() { |
37 | - if ( empty( $this->SKU ) ) { |
|
37 | + if (empty($this->SKU)) { |
|
38 | 38 | $this->SKU = $this->generateSKU(); |
39 | 39 | } |
40 | 40 | return $this->SKU; |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | use EventEspresso\core\interfaces\cart\CartInterface; |
5 | 5 | use EventEspresso\core\interfaces\cart\CartCalculatorInterface; |
6 | 6 | |
7 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
8 | - exit( 'No direct script access allowed' ); |
|
7 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
8 | + exit('No direct script access allowed'); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @param CartTotal $cartTotal |
52 | 52 | * @return CartTotal |
53 | 53 | */ |
54 | - public function calculateTotal( CartInterface $cart, CartTotal $cartTotal ) { |
|
54 | + public function calculateTotal(CartInterface $cart, CartTotal $cartTotal) { |
|
55 | 55 | $this->cart = $cart; |
56 | 56 | $this->cartTotal = $cartTotal; |
57 | 57 | $this->calculateDiscountTotal(); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function calculateDiscountTotal() { |
66 | 66 | $discountCartItems = $this->cart->getDiscountCartItems(); |
67 | - foreach ( $discountCartItems as $discountCartItem ) { |
|
67 | + foreach ($discountCartItems as $discountCartItem) { |
|
68 | 68 | $discountTotal = $discountCartItem->calculatePrice(); |
69 | 69 | $this->cartTotal->discountTotal -= $discountTotal; |
70 | 70 | $this->cartTotal->preTaxSubtotal -= $discountTotal; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | |
4 | 4 | use EventEspresso\core\interfaces\cart\DiscountInterface; |
5 | 5 | |
6 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
7 | - exit( 'No direct script access allowed' ); |
|
6 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
7 | + exit('No direct script access allowed'); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | * @param DiscountInterface $discount |
30 | 30 | * @param Cart $cart |
31 | 31 | */ |
32 | - public function __construct( DiscountInterface $discount, Cart $cart ) { |
|
32 | + public function __construct(DiscountInterface $discount, Cart $cart) { |
|
33 | 33 | $this->item = $discount; |
34 | - parent::__construct( $cart ); |
|
34 | + parent::__construct($cart); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * @return string |
41 | 41 | */ |
42 | 42 | public function generateSKU() { |
43 | - return md5( $this->item->ID() . $this->item->description() ); |
|
43 | + return md5($this->item->ID().$this->item->description()); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | * @return object |
51 | 51 | * @throws \EE_Error |
52 | 52 | */ |
53 | - public function validateItem( $item ) { |
|
54 | - if ( ! $item instanceof DiscountInterface ) { |
|
55 | - throw new \EE_Error( 'Invalid or missing discount in cart.' ); |
|
53 | + public function validateItem($item) { |
|
54 | + if ( ! $item instanceof DiscountInterface) { |
|
55 | + throw new \EE_Error('Invalid or missing discount in cart.'); |
|
56 | 56 | } |
57 | 57 | return $item; |
58 | 58 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @return float |
64 | 64 | */ |
65 | 65 | public function calculatePrice() { |
66 | - return (float)( $this->getItem()->amount() * $this->quantity ); |
|
66 | + return (float) ($this->getItem()->amount() * $this->quantity); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 |
@@ -4,8 +4,8 @@ discard block |
||
4 | 4 | use EventEspresso\core\interfaces\cart\CartInterface; |
5 | 5 | use EventEspresso\core\interfaces\cart\CartCalculatorInterface; |
6 | 6 | |
7 | -if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) { |
|
8 | - exit( 'No direct script access allowed' ); |
|
7 | +if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
8 | + exit('No direct script access allowed'); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @param CartTotal $cartTotal |
52 | 52 | * @return CartTotal |
53 | 53 | */ |
54 | - public function calculateTotal( CartInterface $cart, CartTotal $cartTotal ) { |
|
54 | + public function calculateTotal(CartInterface $cart, CartTotal $cartTotal) { |
|
55 | 55 | $this->cart = $cart; |
56 | 56 | $this->cartTotal = $cartTotal; |
57 | 57 | $this->calculateTicketTotal(); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | protected function calculateTicketTotal() { |
66 | 66 | $ticketCartItems = $this->cart->getTicketCartItems(); |
67 | - foreach ( $ticketCartItems as $ticketCartItem ) { |
|
67 | + foreach ($ticketCartItems as $ticketCartItem) { |
|
68 | 68 | $this->cartTotal->ticketCount += $ticketCartItem->quantity(); |
69 | 69 | $ticketTotal = $ticketCartItem->calculatePrice(); |
70 | 70 | $this->cartTotal->ticketTotal += $ticketTotal; |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | * @param CartCalculatorInterface $cartCalculator |
29 | 29 | * @return bool |
30 | 30 | */ |
31 | - public function addCartCalculator( CartCalculatorInterface $cartCalculator ) { |
|
32 | - return $this->add( $cartCalculator, $cartCalculator->name() ); |
|
31 | + public function addCartCalculator(CartCalculatorInterface $cartCalculator) { |
|
32 | + return $this->add($cartCalculator, $cartCalculator->name()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * @param mixed $name |
39 | 39 | * @return CartCalculatorInterface |
40 | 40 | */ |
41 | - public function getCartCalculator( $name ) { |
|
42 | - $cartCalculator = $this->get_by_info( $name ); |
|
43 | - if ( ! $cartCalculator instanceof CartCalculatorInterface ) { |
|
41 | + public function getCartCalculator($name) { |
|
42 | + $cartCalculator = $this->get_by_info($name); |
|
43 | + if ( ! $cartCalculator instanceof CartCalculatorInterface) { |
|
44 | 44 | // exception ?? |
45 | 45 | } |
46 | 46 | return $cartCalculator; |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | * @param CartCalculatorInterface $cartCalculator |
53 | 53 | * @return bool |
54 | 54 | */ |
55 | - public function hasCartCalculator( CartCalculatorInterface $cartCalculator ) { |
|
56 | - return $this->contains( $cartCalculator ); |
|
55 | + public function hasCartCalculator(CartCalculatorInterface $cartCalculator) { |
|
56 | + return $this->contains($cartCalculator); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | * @param mixed $name |
63 | 63 | * @return bool |
64 | 64 | */ |
65 | - public function hasCartCalculatorByName( $name ) { |
|
66 | - $cartCalculator = $this->get_by_info( $name ); |
|
67 | - return $this->contains( $cartCalculator ); |
|
65 | + public function hasCartCalculatorByName($name) { |
|
66 | + $cartCalculator = $this->get_by_info($name); |
|
67 | + return $this->contains($cartCalculator); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | * @param CartCalculatorInterface $cartCalculator |
74 | 74 | * @return void |
75 | 75 | */ |
76 | - public function removeCartCalculator( CartCalculatorInterface $cartCalculator ) { |
|
77 | - $this->remove( $cartCalculator ); |
|
76 | + public function removeCartCalculator(CartCalculatorInterface $cartCalculator) { |
|
77 | + $this->remove($cartCalculator); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | |
@@ -83,9 +83,9 @@ discard block |
||
83 | 83 | * @param mixed $name |
84 | 84 | * @return void |
85 | 85 | */ |
86 | - public function removeCartCalculatorByName( $name ) { |
|
87 | - $cartCalculator = $this->get_by_info( $name ); |
|
88 | - $this->remove( $cartCalculator ); |
|
86 | + public function removeCartCalculatorByName($name) { |
|
87 | + $cartCalculator = $this->get_by_info($name); |
|
88 | + $this->remove($cartCalculator); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | CartRepositoryInterface $CartRepository, |
60 | 60 | CartCalculatorRepositoryInterface $cartCalculatorRepository |
61 | 61 | ) { |
62 | - $this->session = $session; |
|
63 | - $this->cartCreator = $CartCreator; |
|
62 | + $this->session = $session; |
|
63 | + $this->cartCreator = $CartCreator; |
|
64 | 64 | $this->cartRepository = $CartRepository; |
65 | 65 | $this->cartCalculators = $cartCalculatorRepository; |
66 | - do_action( 'AHEE__CartManager__construct__complete', $this ); |
|
66 | + do_action('AHEE__CartManager__construct__complete', $this); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -73,15 +73,15 @@ discard block |
||
73 | 73 | * @param bool $createNew |
74 | 74 | * @return CartInterface |
75 | 75 | */ |
76 | - public function getCart( $ID, $createNew = false ) { |
|
77 | - $cart = $this->cartRepository->getCart( $ID ); |
|
78 | - if ( ! $cart instanceof Cart ) { |
|
79 | - $cart = $this->getCartFromSession( $ID ); |
|
76 | + public function getCart($ID, $createNew = false) { |
|
77 | + $cart = $this->cartRepository->getCart($ID); |
|
78 | + if ( ! $cart instanceof Cart) { |
|
79 | + $cart = $this->getCartFromSession($ID); |
|
80 | 80 | } |
81 | - if ( ! $cart instanceof Cart && $createNew ) { |
|
81 | + if ( ! $cart instanceof Cart && $createNew) { |
|
82 | 82 | $cart = $this->createCart(); |
83 | 83 | } |
84 | - if ( ! $cart instanceof Cart ) { |
|
84 | + if ( ! $cart instanceof Cart) { |
|
85 | 85 | // exception ? |
86 | 86 | } |
87 | 87 | return $cart; |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | * @param mixed $ID |
94 | 94 | * @return CartInterface |
95 | 95 | */ |
96 | - public function getCartFromSession( $ID ) { |
|
96 | + public function getCartFromSession($ID) { |
|
97 | 97 | // try getting the cart out of the session |
98 | - $cart = $this->session->cart( $ID ); |
|
99 | - if ( $cart instanceof Cart && $ID == $cart->ID() ) { |
|
100 | - if ( $this->cartRepository->addCart( $cart ) ) { |
|
98 | + $cart = $this->session->cart($ID); |
|
99 | + if ($cart instanceof Cart && $ID == $cart->ID()) { |
|
100 | + if ($this->cartRepository->addCart($cart)) { |
|
101 | 101 | return $cart; |
102 | 102 | } |
103 | 103 | } |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | * @return CartInterface |
113 | 113 | */ |
114 | 114 | protected function createCart() { |
115 | - $cart = $this->cartCreator->getNewCart( $this->cartCalculators ); |
|
116 | - if ( $this->cartRepository->addCart( $cart ) ) { |
|
115 | + $cart = $this->cartCreator->getNewCart($this->cartCalculators); |
|
116 | + if ($this->cartRepository->addCart($cart)) { |
|
117 | 117 | return $cart; |
118 | 118 | } |
119 | 119 | return null; |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @param \EE_Promotion $promotion |
27 | 27 | * @return bool |
28 | 28 | */ |
29 | - public function add_promotion( \EE_Promotion $promotion ) { |
|
30 | - return $this->add( $promotion, $promotion->ID() ); |
|
29 | + public function add_promotion(\EE_Promotion $promotion) { |
|
30 | + return $this->add($promotion, $promotion->ID()); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | * @param mixed $ID |
37 | 37 | * @return null | object |
38 | 38 | */ |
39 | - public function get_promotion( $ID ) { |
|
40 | - $promotion = $this->get_by_info( $ID ); |
|
41 | - if ( ! $promotion instanceof \EE_Ticket ) { |
|
39 | + public function get_promotion($ID) { |
|
40 | + $promotion = $this->get_by_info($ID); |
|
41 | + if ( ! $promotion instanceof \EE_Ticket) { |
|
42 | 42 | // ??? exception ??? |
43 | 43 | } |
44 | 44 | return $promotion; |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * @param mixed $ID |
51 | 51 | * @return null | object |
52 | 52 | */ |
53 | - public function get_promotion_by_id( $ID ) { |
|
54 | - return $this->get_by_info( $ID ); |
|
53 | + public function get_promotion_by_id($ID) { |
|
54 | + return $this->get_by_info($ID); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | * @param \EE_Promotion $promotion |
61 | 61 | * @return bool |
62 | 62 | */ |
63 | - public function has_promotion( \EE_Promotion $promotion ) { |
|
64 | - return $this->has( $promotion ); |
|
63 | + public function has_promotion(\EE_Promotion $promotion) { |
|
64 | + return $this->has($promotion); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | * @param mixed $ID |
71 | 71 | * @return bool |
72 | 72 | */ |
73 | - public function has_promotion_by_id( $ID ) { |
|
74 | - $promotion = $this->get_by_info( $ID ); |
|
75 | - return $this->has( $promotion ); |
|
73 | + public function has_promotion_by_id($ID) { |
|
74 | + $promotion = $this->get_by_info($ID); |
|
75 | + return $this->has($promotion); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | * @param \EE_Promotion $promotion |
82 | 82 | * @return bool | int |
83 | 83 | */ |
84 | - public function save_promotion( \EE_Promotion $promotion ) { |
|
85 | - return $this->persist( $promotion, 'save' ); |
|
84 | + public function save_promotion(\EE_Promotion $promotion) { |
|
85 | + return $this->persist($promotion, 'save'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | * @param mixed $ID |
92 | 92 | * @return bool | int |
93 | 93 | */ |
94 | - public function save_promotion_by_id( $ID ) { |
|
95 | - $promotion = $this->get_by_info( $ID ); |
|
96 | - return $this->persist( $promotion, 'save' ); |
|
94 | + public function save_promotion_by_id($ID) { |
|
95 | + $promotion = $this->get_by_info($ID); |
|
96 | + return $this->persist($promotion, 'save'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | * @param \EE_Promotion $promotion |
103 | 103 | * @return void |
104 | 104 | */ |
105 | - public function remove_promotion( \EE_Promotion $promotion ) { |
|
106 | - $this->remove( $promotion ); |
|
105 | + public function remove_promotion(\EE_Promotion $promotion) { |
|
106 | + $this->remove($promotion); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | * @param mixed $ID |
113 | 113 | * @return void |
114 | 114 | */ |
115 | - public function remove_promotion_by_id( $ID ) { |
|
116 | - $promotion = $this->get_by_info( $ID ); |
|
117 | - $this->remove( $promotion ); |
|
115 | + public function remove_promotion_by_id($ID) { |
|
116 | + $promotion = $this->get_by_info($ID); |
|
117 | + $this->remove($promotion); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | * @param Product $product |
28 | 28 | * @return bool |
29 | 29 | */ |
30 | - public function add_product( Product $product ) { |
|
31 | - return $this->add( $product, $product->ID() ); |
|
30 | + public function add_product(Product $product) { |
|
31 | + return $this->add($product, $product->ID()); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | * @param mixed $ID |
38 | 38 | * @return Product |
39 | 39 | */ |
40 | - public function get_product( $ID ) { |
|
41 | - $product = $this->get_by_info( $ID ); |
|
42 | - if ( ! $product instanceof Product ) { |
|
40 | + public function get_product($ID) { |
|
41 | + $product = $this->get_by_info($ID); |
|
42 | + if ( ! $product instanceof Product) { |
|
43 | 43 | // ??? exception ??? |
44 | 44 | } |
45 | 45 | return $product; |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | * @param mixed $ID |
52 | 52 | * @return Product |
53 | 53 | */ |
54 | - public function get_product_by_id( $ID ) { |
|
55 | - return $this->get_by_info( $ID ); |
|
54 | + public function get_product_by_id($ID) { |
|
55 | + return $this->get_by_info($ID); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | * @param Product $product |
62 | 62 | * @return bool |
63 | 63 | */ |
64 | - public function has_product( Product $product ) { |
|
65 | - return $this->has( $product ); |
|
64 | + public function has_product(Product $product) { |
|
65 | + return $this->has($product); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | * @param mixed $ID |
72 | 72 | * @return bool |
73 | 73 | */ |
74 | - public function has_product_by_id( $ID ) { |
|
75 | - $product = $this->get_by_info( $ID ); |
|
76 | - return $this->has( $product ); |
|
74 | + public function has_product_by_id($ID) { |
|
75 | + $product = $this->get_by_info($ID); |
|
76 | + return $this->has($product); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | * @param Product $product |
83 | 83 | * @return bool | int |
84 | 84 | */ |
85 | - public function save_product( Product $product ) { |
|
86 | - return $this->persist( $product, 'save' ); |
|
85 | + public function save_product(Product $product) { |
|
86 | + return $this->persist($product, 'save'); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | * @param mixed $ID |
93 | 93 | * @return bool | int |
94 | 94 | */ |
95 | - public function save_product_by_id( $ID ) { |
|
96 | - $product = $this->get_by_info( $ID ); |
|
97 | - return $this->persist( $product, 'save' ); |
|
95 | + public function save_product_by_id($ID) { |
|
96 | + $product = $this->get_by_info($ID); |
|
97 | + return $this->persist($product, 'save'); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | * @param Product $product |
104 | 104 | * @return void |
105 | 105 | */ |
106 | - public function remove_product( Product $product ) { |
|
107 | - $this->remove( $product ); |
|
106 | + public function remove_product(Product $product) { |
|
107 | + $this->remove($product); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | * @param mixed $ID |
114 | 114 | * @return void |
115 | 115 | */ |
116 | - public function remove_product_by_id( $ID ) { |
|
117 | - $product = $this->get_by_info( $ID ); |
|
118 | - $this->remove( $product ); |
|
116 | + public function remove_product_by_id($ID) { |
|
117 | + $product = $this->get_by_info($ID); |
|
118 | + $this->remove($product); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | * @param \EE_Ticket $ticket |
27 | 27 | * @return bool |
28 | 28 | */ |
29 | - public function addTicket( \EE_Ticket $ticket ) { |
|
30 | - return $this->add( $ticket, array( $ticket->ID(), $ticket->get_event_ID() ) ); |
|
29 | + public function addTicket(\EE_Ticket $ticket) { |
|
30 | + return $this->add($ticket, array($ticket->ID(), $ticket->get_event_ID())); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | * @param mixed $ID |
37 | 37 | * @return null | object |
38 | 38 | */ |
39 | - public function getTicket( $ID ) { |
|
40 | - $ticket = $this->get_by_info( $ID ); |
|
41 | - if ( ! $ticket instanceof \EE_Ticket ) { |
|
39 | + public function getTicket($ID) { |
|
40 | + $ticket = $this->get_by_info($ID); |
|
41 | + if ( ! $ticket instanceof \EE_Ticket) { |
|
42 | 42 | // ??? exception ??? |
43 | 43 | } |
44 | 44 | return $ticket; |
@@ -50,8 +50,8 @@ discard block |
||
50 | 50 | * @param mixed $ID |
51 | 51 | * @return null | object |
52 | 52 | */ |
53 | - public function getTicketByID( $ID ) { |
|
54 | - return $this->get_by_info( $ID ); |
|
53 | + public function getTicketByID($ID) { |
|
54 | + return $this->get_by_info($ID); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | |
@@ -60,8 +60,8 @@ discard block |
||
60 | 60 | * @param \EE_Ticket $ticket |
61 | 61 | * @return bool |
62 | 62 | */ |
63 | - public function hasTicket( \EE_Ticket $ticket ) { |
|
64 | - return $this->has( $ticket ); |
|
63 | + public function hasTicket(\EE_Ticket $ticket) { |
|
64 | + return $this->has($ticket); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | |
@@ -70,9 +70,9 @@ discard block |
||
70 | 70 | * @param mixed $ID |
71 | 71 | * @return bool |
72 | 72 | */ |
73 | - public function hasTicketByID( $ID ) { |
|
74 | - $ticket = $this->get_by_info( $ID ); |
|
75 | - return $this->has( $ticket ); |
|
73 | + public function hasTicketByID($ID) { |
|
74 | + $ticket = $this->get_by_info($ID); |
|
75 | + return $this->has($ticket); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | * @param \EE_Ticket $ticket |
82 | 82 | * @return bool | int |
83 | 83 | */ |
84 | - public function saveTicket( \EE_Ticket $ticket ) { |
|
85 | - return $this->persist( $ticket, 'save' ); |
|
84 | + public function saveTicket(\EE_Ticket $ticket) { |
|
85 | + return $this->persist($ticket, 'save'); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | * @param mixed $ID |
92 | 92 | * @return bool | int |
93 | 93 | */ |
94 | - public function saveTicketByID( $ID ) { |
|
95 | - $ticket = $this->get_by_info( $ID ); |
|
96 | - return $this->persist( $ticket, 'save' ); |
|
94 | + public function saveTicketByID($ID) { |
|
95 | + $ticket = $this->get_by_info($ID); |
|
96 | + return $this->persist($ticket, 'save'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | * @param \EE_Ticket $ticket |
103 | 103 | * @return void |
104 | 104 | */ |
105 | - public function removeTicket( \EE_Ticket $ticket ) { |
|
106 | - $this->remove( $ticket ); |
|
105 | + public function removeTicket(\EE_Ticket $ticket) { |
|
106 | + $this->remove($ticket); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | * @param mixed $ID |
113 | 113 | * @return void |
114 | 114 | */ |
115 | - public function removeTicketByID( $ID ) { |
|
116 | - $ticket = $this->get_by_info( $ID ); |
|
117 | - $this->remove( $ticket ); |
|
115 | + public function removeTicketByID($ID) { |
|
116 | + $ticket = $this->get_by_info($ID); |
|
117 | + $this->remove($ticket); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 |