Completed
Branch FET-8209-allow-multiple-carts (f5b2f0)
by
unknown
108:40 queued 97:50
created
core/interfaces/cart/CartInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\interfaces\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
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * @param boolean $open
26 26
 	 */
27
-	function setOpen( $open );
27
+	function setOpen($open);
28 28
 
29 29
 
30 30
 
Please login to merge, or discard this patch.
core/interfaces/cart/CartCreatorInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\interfaces\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
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	 * @param  CartCalculatorRepositoryInterface $cartCalculatorRepository
17 17
 	 * @return CartInterface
18 18
 	 */
19
-	public function getNewCart( CartCalculatorRepositoryInterface $cartCalculatorRepository );
19
+	public function getNewCart(CartCalculatorRepositoryInterface $cartCalculatorRepository);
20 20
 
21 21
 }
22 22
 // End of file CartCreatorInterface.php
Please login to merge, or discard this patch.
core/interfaces/cart/CartRepositoryInterface.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\interfaces\EEI_Repository;
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
 /**
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * @param CartInterface $cart
24 24
 	 * @return bool
25 25
 	 */
26
-	function addCart( CartInterface $cart );
26
+	function addCart(CartInterface $cart);
27 27
 
28 28
 
29 29
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param mixed $ID
32 32
 	 * @return null | object
33 33
 	 */
34
-	function getCart( $ID );
34
+	function getCart($ID);
35 35
 
36 36
 
37 37
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param CartInterface $cart
40 40
 	 * @return bool
41 41
 	 */
42
-	function hasCart( CartInterface $cart );
42
+	function hasCart(CartInterface $cart);
43 43
 
44 44
 
45 45
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param mixed $ID
48 48
 	 * @return bool
49 49
 	 */
50
-	function hasCartByID( $ID );
50
+	function hasCartByID($ID);
51 51
 
52 52
 
53 53
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param CartInterface $cart
56 56
 	 * @return bool | int
57 57
 	 */
58
-	function saveCart( CartInterface $cart );
58
+	function saveCart(CartInterface $cart);
59 59
 
60 60
 
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @param mixed $ID
64 64
 	 * @return bool | int
65 65
 	 */
66
-	function saveCartByID( $ID );
66
+	function saveCartByID($ID);
67 67
 
68 68
 
69 69
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @param CartInterface $cart
72 72
 	 * @return void
73 73
 	 */
74
-	function removeCart( CartInterface $cart );
74
+	function removeCart(CartInterface $cart);
75 75
 
76 76
 
77 77
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @param mixed $ID
80 80
 	 * @return void
81 81
 	 */
82
-	function removeCartByID( $ID );
82
+	function removeCartByID($ID);
83 83
 
84 84
 
85 85
 
Please login to merge, or discard this patch.
core/interfaces/cart/CartCalculatorInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\services\cart\CartTotal;
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
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	 * @param CartTotal 	$cartTotal
23 23
 	 * @return CartTotal
24 24
 	 */
25
-	public function calculateTotal( CartInterface $cart, CartTotal $cartTotal );
25
+	public function calculateTotal(CartInterface $cart, CartTotal $cartTotal);
26 26
 
27 27
 
28 28
 
Please login to merge, or discard this patch.
core/interfaces/cart/CartCalculatorRepositoryRepositoryInterface.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\interfaces\EEI_Collection;
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
 /**
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * @param CartCalculatorInterface $cartCalculator
24 24
 	 * @return bool
25 25
 	 */
26
-	function addCartCalculator( CartCalculatorInterface $cartCalculator );
26
+	function addCartCalculator(CartCalculatorInterface $cartCalculator);
27 27
 
28 28
 
29 29
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param string $name
32 32
 	 * @return null | object
33 33
 	 */
34
-	function getCartCalculator( $name );
34
+	function getCartCalculator($name);
35 35
 
36 36
 
37 37
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param CartCalculatorInterface $cartCalculator
40 40
 	 * @return bool
41 41
 	 */
42
-	function hasCartCalculator( CartCalculatorInterface $cartCalculator );
42
+	function hasCartCalculator(CartCalculatorInterface $cartCalculator);
43 43
 
44 44
 
45 45
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param string $name
48 48
 	 * @return bool
49 49
 	 */
50
-	function hasCartCalculatorByName( $name );
50
+	function hasCartCalculatorByName($name);
51 51
 
52 52
 
53 53
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @param CartCalculatorInterface $cartCalculator
56 56
 	 * @return void
57 57
 	 */
58
-	function removeCartCalculator( CartCalculatorInterface $cartCalculator );
58
+	function removeCartCalculator(CartCalculatorInterface $cartCalculator);
59 59
 
60 60
 
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @param string $name
64 64
 	 * @return void
65 65
 	 */
66
-	function removeCartCalculatorByName( $name );
66
+	function removeCartCalculatorByName($name);
67 67
 
68 68
 
69 69
 
Please login to merge, or discard this patch.
core/interfaces/EEI_Ticket.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace EventEspresso\core\interfaces;
4 4
 
5
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
6
-	exit( 'No direct script access allowed' );
5
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
6
+	exit('No direct script access allowed');
7 7
 }
8 8
 /**
9 9
  * EEI_Ticket class
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param  int $DTT_ID the primary key for a particular datetime
30 30
 	 * @return boolean
31 31
 	 */
32
-	public function available( $DTT_ID = 0 );
32
+	public function available($DTT_ID = 0);
33 33
 
34 34
 
35 35
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 *                      status const
41 41
 	 * @return mixed(int|string) status int if the display string isn't requested
42 42
 	 */
43
-	public function ticket_status( $display = false );
43
+	public function ticket_status($display = false);
44 44
 
45 45
 
46 46
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param  int $DTT_ID if an int above 0 is included here then we get a specific dtt.
53 53
 	 * @return boolean         true = tickets remaining, false not.
54 54
 	 */
55
-	public function is_remaining( $DTT_ID = 0 );
55
+	public function is_remaining($DTT_ID = 0);
56 56
 
57 57
 
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *                     all related datetimes
64 64
 	 * @return int
65 65
 	 */
66
-	public function remaining( $DTT_ID = 0 );
66
+	public function remaining($DTT_ID = 0);
67 67
 
68 68
 
69 69
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 *                            the end date ie: Jan 01 "to" Dec 31
112 112
 	 * @return array
113 113
 	 */
114
-	public function date_range( $dt_frmt = '', $conjunction = ' - ' );
114
+	public function date_range($dt_frmt = '', $conjunction = ' - ');
115 115
 
116 116
 
117 117
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 * @param array $query_params see EEM_Base::get_all()
132 132
 	 * @return \EE_Datetime[]
133 133
 	 */
134
-	public function datetimes( $query_params = array() );
134
+	public function datetimes($query_params = array());
135 135
 
136 136
 
137 137
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param  int    $dtt_id [optional] include the dtt_id with $what = 'datetime'.
157 157
 	 * @return mixed (array|int)          how many tickets have sold
158 158
 	 */
159
-	public function tickets_sold( $what = 'ticket', $dtt_id = null );
159
+	public function tickets_sold($what = 'ticket', $dtt_id = null);
160 160
 
161 161
 
162 162
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 * @param  bool $return_array whether to return as an array indexed by price id or just the object.
168 168
 	 * @return \EE_Price
169 169
 	 */
170
-	public function base_price( $return_array = false );
170
+	public function base_price($return_array = false);
171 171
 
172 172
 
173 173
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @param array $query_params like EEM_Base::get_all
188 188
 	 * @return \EE_Price[]
189 189
 	 */
190
-	public function prices( $query_params = array() );
190
+	public function prices($query_params = array());
191 191
 
192 192
 
193 193
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 * @param array $query_params see EEM_Base::get_all()
198 198
 	 * @return \EE_Datetime_Ticket
199 199
 	 */
200
-	public function datetime_tickets( $query_params = array() );
200
+	public function datetime_tickets($query_params = array());
201 201
 
202 202
 
203 203
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 * @param boolean $show_deleted
209 209
 	 * @return \EE_Datetime[]
210 210
 	 */
211
-	public function datetimes_ordered( $show_expired = true, $show_deleted = false );
211
+	public function datetimes_ordered($show_expired = true, $show_deleted = false);
212 212
 
213 213
 
214 214
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 * @param bool $no_cache
278 278
 	 * @return float
279 279
 	 */
280
-	public function get_ticket_total_with_taxes( $no_cache = false );
280
+	public function get_ticket_total_with_taxes($no_cache = false);
281 281
 
282 282
 
283 283
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @param string $name
308 308
 	 * @return boolean
309 309
 	 */
310
-	function set_name( $name );
310
+	function set_name($name);
311 311
 
312 312
 
313 313
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	 * @param string $description
327 327
 	 * @return boolean
328 328
 	 */
329
-	function set_description( $description );
329
+	function set_description($description);
330 330
 
331 331
 
332 332
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 	 * @param string $tm_frmt
338 338
 	 * @return string
339 339
 	 */
340
-	function start_date( $dt_frmt = '', $tm_frmt = '' );
340
+	function start_date($dt_frmt = '', $tm_frmt = '');
341 341
 
342 342
 
343 343
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 	 * @param string $start_date
348 348
 	 * @return void
349 349
 	 */
350
-	function set_start_date( $start_date );
350
+	function set_start_date($start_date);
351 351
 
352 352
 
353 353
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	 * @param string $tm_frmt
359 359
 	 * @return string
360 360
 	 */
361
-	function end_date( $dt_frmt = '', $tm_frmt = '' );
361
+	function end_date($dt_frmt = '', $tm_frmt = '');
362 362
 
363 363
 
364 364
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 	 * @param string $end_date
369 369
 	 * @return void
370 370
 	 */
371
-	function set_end_date( $end_date );
371
+	function set_end_date($end_date);
372 372
 
373 373
 
374 374
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	 *
380 380
 	 * @param string $time a string representation of the sell until time (ex 9am or 7:30pm)
381 381
 	 */
382
-	function set_end_time( $time );
382
+	function set_end_time($time);
383 383
 
384 384
 
385 385
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 	 * @param int $min
390 390
 	 * @return boolean
391 391
 	 */
392
-	function set_min( $min );
392
+	function set_min($min);
393 393
 
394 394
 
395 395
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	 * @param int $max
409 409
 	 * @return boolean
410 410
 	 */
411
-	function set_max( $max );
411
+	function set_max($max);
412 412
 
413 413
 
414 414
 
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 	 * @param float $price
419 419
 	 * @return boolean
420 420
 	 */
421
-	function set_price( $price );
421
+	function set_price($price);
422 422
 
423 423
 
424 424
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	 * @param int $qty
438 438
 	 * @return boolean
439 439
 	 */
440
-	function increase_sold( $qty = 1 );
440
+	function increase_sold($qty = 1);
441 441
 
442 442
 
443 443
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 	 * @param int $sold
448 448
 	 * @return boolean
449 449
 	 */
450
-	function set_sold( $sold );
450
+	function set_sold($sold);
451 451
 
452 452
 
453 453
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 	 * @param int $qty
458 458
 	 * @return boolean
459 459
 	 */
460
-	function decrease_sold( $qty = 1 );
460
+	function decrease_sold($qty = 1);
461 461
 
462 462
 
463 463
 
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 	 *
474 474
 	 * @return int
475 475
 	 */
476
-	function qty( $context = '' );
476
+	function qty($context = '');
477 477
 
478 478
 
479 479
 
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 	 *
489 489
 	 * @return int
490 490
 	 */
491
-	function real_quantity_on_ticket( $context = 'reg_limit' );
491
+	function real_quantity_on_ticket($context = 'reg_limit');
492 492
 
493 493
 
494 494
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 	 * @return bool
500 500
 	 * @throws \EE_Error
501 501
 	 */
502
-	function set_qty( $qty );
502
+	function set_qty($qty);
503 503
 
504 504
 
505 505
 
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 	 * @param int $uses
519 519
 	 * @return boolean
520 520
 	 */
521
-	function set_uses( $uses );
521
+	function set_uses($uses);
522 522
 
523 523
 
524 524
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
 	 * @param boolean $required
538 538
 	 * @return boolean
539 539
 	 */
540
-	public function set_required( $required );
540
+	public function set_required($required);
541 541
 
542 542
 
543 543
 
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 	 * @param boolean $taxable
557 557
 	 * @return boolean
558 558
 	 */
559
-	function set_taxable( $taxable );
559
+	function set_taxable($taxable);
560 560
 
561 561
 
562 562
 
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 	 * @param boolean $is_default
576 576
 	 * @return boolean
577 577
 	 */
578
-	function set_is_default( $is_default );
578
+	function set_is_default($is_default);
579 579
 
580 580
 
581 581
 
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 	 * @param int $order
595 595
 	 * @return boolean
596 596
 	 */
597
-	function set_order( $order );
597
+	function set_order($order);
598 598
 
599 599
 
600 600
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 	 * @param int $row
614 614
 	 * @return boolean
615 615
 	 */
616
-	function set_row( $row );
616
+	function set_row($row);
617 617
 
618 618
 
619 619
 
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 	 * @param boolean $deleted
633 633
 	 * @return boolean
634 634
 	 */
635
-	function set_deleted( $deleted );
635
+	function set_deleted($deleted);
636 636
 
637 637
 
638 638
 
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
 	 * @param int $parent
652 652
 	 * @return boolean
653 653
 	 */
654
-	function set_parent_ID( $parent );
654
+	function set_parent_ID($parent);
655 655
 
656 656
 
657 657
 
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 	 * @param array $query_params like EEM_Base::get_all's
689 689
 	 * @return \EE_Registration[]
690 690
 	 */
691
-	public function registrations( $query_params = array() );
691
+	public function registrations($query_params = array());
692 692
 
693 693
 
694 694
 
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 	 * @param array $query_params like EEM_Base::get_all's
709 709
 	 * @return int
710 710
 	 */
711
-	public function count_registrations( $query_params = array() );
711
+	public function count_registrations($query_params = array());
712 712
 
713 713
 
714 714
 
Please login to merge, or discard this patch.
core/libraries/repositories/ObjectInfoSingleKeyStrategy.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	* @param EEI_Collection $object_collection
38 38
 	*/
39
-	public function setCollection( EEI_Collection $object_collection ) {
39
+	public function setCollection(EEI_Collection $object_collection) {
40 40
 		$this->object_collection = $object_collection;
41 41
 	}
42 42
 
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	* @param mixed  $info
54 54
 	* @return bool
55 55
 	*/
56
-	public function setObjectInfo( $object, $info = null ) {
57
-		$info = ! empty( $info ) ? $info : spl_object_hash( $object );
56
+	public function setObjectInfo($object, $info = null) {
57
+		$info = ! empty($info) ? $info : spl_object_hash($object);
58 58
 		$this->object_collection->rewind();
59
-		while ( $this->object_collection->valid() ) {
60
-			if ( $object == $this->object_collection->current() ) {
61
-				$this->object_collection->setInfo( $info );
59
+		while ($this->object_collection->valid()) {
60
+			if ($object == $this->object_collection->current()) {
61
+				$this->object_collection->setInfo($info);
62 62
 				$this->object_collection->rewind();
63 63
 				return true;
64 64
 			}
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
 	* @param mixed $info
79 79
 	* @return null | object
80 80
 	*/
81
-	public function getObjectByInfo( $info ) {
81
+	public function getObjectByInfo($info) {
82 82
 		$this->object_collection->rewind();
83
-		while ( $this->object_collection->valid() ) {
84
-			if ( $info === $this->object_collection->getInfo() ) {
83
+		while ($this->object_collection->valid()) {
84
+			if ($info === $this->object_collection->getInfo()) {
85 85
 				$object = $this->object_collection->current();
86 86
 				$this->object_collection->rewind();
87 87
 				return $object;
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
 	 * @param $info
103 103
 	 * @return void
104 104
 	 */
105
-	public function setCurrentByInfo( $info ) {
105
+	public function setCurrentByInfo($info) {
106 106
 		$this->object_collection->rewind();
107
-		while ( $this->object_collection->valid() ) {
108
-			if ( $info === $this->object_collection->getInfo() ) {
107
+		while ($this->object_collection->valid()) {
108
+			if ($info === $this->object_collection->getInfo()) {
109 109
 				break;
110 110
 			}
111 111
 			$this->object_collection->next();
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 
28 28
 
29 29
 	/**
30
-	* @type ObjectRepository $object_collection
31
-	*/
30
+	 * @type ObjectRepository $object_collection
31
+	 */
32 32
 	protected $object_collection;
33 33
 
34 34
 
35 35
 
36 36
 	/**
37
-	* @param EEI_Collection $object_collection
38
-	*/
37
+	 * @param EEI_Collection $object_collection
38
+	 */
39 39
 	public function setCollection( EEI_Collection $object_collection ) {
40 40
 		$this->object_collection = $object_collection;
41 41
 	}
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 
44 44
 
45 45
 	/**
46
-	* setObjectInfo
47
-	*
48
-	* Sets the data associated with an object in the SplObjectStorage
49
-	* if no $info is supplied, then the spl_object_hash() is used
50
-	*
51
-	* @access protected
52
-	* @param object $object
53
-	* @param mixed  $info
54
-	* @return bool
55
-	*/
46
+	 * setObjectInfo
47
+	 *
48
+	 * Sets the data associated with an object in the SplObjectStorage
49
+	 * if no $info is supplied, then the spl_object_hash() is used
50
+	 *
51
+	 * @access protected
52
+	 * @param object $object
53
+	 * @param mixed  $info
54
+	 * @return bool
55
+	 */
56 56
 	public function setObjectInfo( $object, $info = null ) {
57 57
 		$info = ! empty( $info ) ? $info : spl_object_hash( $object );
58 58
 		$this->object_collection->rewind();
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 
71 71
 
72 72
 	/**
73
-	* getObjectByInfo
74
-	*
75
-	* finds and returns an object in the repository based on the info that was set using addObject()
76
-	*
77
-	* @access protected
78
-	* @param mixed $info
79
-	* @return null | object
80
-	*/
73
+	 * getObjectByInfo
74
+	 *
75
+	 * finds and returns an object in the repository based on the info that was set using addObject()
76
+	 *
77
+	 * @access protected
78
+	 * @param mixed $info
79
+	 * @return null | object
80
+	 */
81 81
 	public function getObjectByInfo( $info ) {
82 82
 		$this->object_collection->rewind();
83 83
 		while ( $this->object_collection->valid() ) {
Please login to merge, or discard this patch.
core/libraries/repositories/ObjectRepository.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\Core\Libraries\Repositories;
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
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	/**
36 36
 	 * @param ObjectInfoStrategyInterface $object_info_strategy
37 37
 	 */
38
-	function __construct( ObjectInfoStrategyInterface $object_info_strategy = null ) {
38
+	function __construct(ObjectInfoStrategyInterface $object_info_strategy = null) {
39 39
 		// so that object info strategy can access objects, rewind, etc
40
-		$object_info_strategy->setCollection( $this );
40
+		$object_info_strategy->setCollection($this);
41 41
 		$this->object_info_strategy = $object_info_strategy instanceof ObjectInfoStrategyInterface
42 42
 			? $object_info_strategy : new ObjectInfoSingleKeyStrategy();
43 43
 	}
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 * @param mixed  $info
57 57
 	 * @return bool
58 58
 	 */
59
-	protected function addObject( $object, $info = null ) {
60
-		$this->attach( $object );
61
-		$this->setObjectInfo( $object, $info );
62
-		return $this->contains( $object );
59
+	protected function addObject($object, $info = null) {
60
+		$this->attach($object);
61
+		$this->setObjectInfo($object, $info);
62
+		return $this->contains($object);
63 63
 	}
64 64
 
65 65
 
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 	 * @param object $object
74 74
 	 * @return bool
75 75
 	 */
76
-	protected function hasObject( $object ) {
77
-		return $this->contains( $object );
76
+	protected function hasObject($object) {
77
+		return $this->contains($object);
78 78
 	}
79 79
 
80 80
 
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	 * @param mixed  $info
91 91
 	 * @return bool
92 92
 	 */
93
-	public function setObjectInfo( $object, $info = null ) {
94
-		return call_user_func_array( array( $this->object_info_strategy, 'setObjectInfo' ), array( $object, $info ) );
93
+	public function setObjectInfo($object, $info = null) {
94
+		return call_user_func_array(array($this->object_info_strategy, 'setObjectInfo'), array($object, $info));
95 95
 	}
96 96
 
97 97
 
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	 * @param mixed
106 106
 	 * @return null | object
107 107
 	 */
108
-	public function getObjectByInfo( $info ) {
109
-		return call_user_func_array( array( $this->object_info_strategy, 'getObjectByInfo' ), array( $info ) );
108
+	public function getObjectByInfo($info) {
109
+		return call_user_func_array(array($this->object_info_strategy, 'getObjectByInfo'), array($info));
110 110
 	}
111 111
 
112 112
 
@@ -126,16 +126,16 @@  discard block
 block discarded – undo
126 126
 	 * @return bool | int
127 127
 	 * @throws \EE_Error
128 128
 	 */
129
-	protected function persistObject( $object, $persistence_callback = '', $persistence_arguments = array() ) {
130
-		if ( $this->contains( $object ) ) {
129
+	protected function persistObject($object, $persistence_callback = '', $persistence_arguments = array()) {
130
+		if ($this->contains($object)) {
131 131
 			$this->rewind();
132
-			while ( $this->valid() ) {
133
-				if ( $object === $this->current() ) {
132
+			while ($this->valid()) {
133
+				if ($object === $this->current()) {
134 134
 					$success = false;
135
-					if ( method_exists( $object, $persistence_callback ) ) {
136
-						$success = call_user_func_array( array( $object, $persistence_callback ), $persistence_arguments );
137
-					} else if ( $object instanceof \EE_Base_Class ) {
138
-						$success = $object->save( $persistence_arguments );
135
+					if (method_exists($object, $persistence_callback)) {
136
+						$success = call_user_func_array(array($object, $persistence_callback), $persistence_arguments);
137
+					} else if ($object instanceof \EE_Base_Class) {
138
+						$success = $object->save($persistence_arguments);
139 139
 					}
140 140
 					$this->rewind();
141 141
 					return $success;
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 	 * @param $object
158 158
 	 * @return void
159 159
 	 */
160
-	protected function removeObject( $object ) {
161
-		$this->detach( $object );
160
+	protected function removeObject($object) {
161
+		$this->detach($object);
162 162
 	}
163 163
 
164 164
 
Please login to merge, or discard this patch.
core/libraries/repositories/ObjectInfoStrategyInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	/**
15 15
 	 * @param EEI_Collection $object_collection
16 16
 	 */
17
-	function setCollection( EEI_Collection $object_collection );
17
+	function setCollection(EEI_Collection $object_collection);
18 18
 
19 19
 
20 20
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * @param $info
24 24
 	 * @return bool
25 25
 	 */
26
-	function setObjectInfo( $object, $info );
26
+	function setObjectInfo($object, $info);
27 27
 
28 28
 
29 29
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param mixed $array_of_key_value_pairings
32 32
 	 * @return null|object
33 33
 	 */
34
-	function getObjectByInfo( $array_of_key_value_pairings );
34
+	function getObjectByInfo($array_of_key_value_pairings);
35 35
 
36 36
 
37 37
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param mixed $array_of_key_value_pairings
40 40
 	 * @return void
41 41
 	 */
42
-	function setCurrentByInfo( $array_of_key_value_pairings );
42
+	function setCurrentByInfo($array_of_key_value_pairings);
43 43
 
44 44
 }
45 45
 // End of file ObjectInfoStrategyInterface.php
Please login to merge, or discard this patch.