Completed
Branch FET/10766/extract-activation-d... (f6eee0)
by
unknown
13:03 queued 10:52
created
core/services/commands/CommandBusInterface.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\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
 block discarded – undo
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
Please login to merge, or discard this patch.
core/db_classes/EE_Venue.class.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 	 *                             		    date_format and the second value is the time format
38 38
 	 * @return EE_Attendee
39 39
 	 */
40
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
41
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
42
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
40
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
41
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
42
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
43 43
 	}
44 44
 
45 45
 
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 *                          		the website will be used.
51 51
 	 * @return EE_Attendee
52 52
 	 */
53
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
54
-		return new self( $props_n_values, TRUE, $timezone );
53
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
54
+		return new self($props_n_values, TRUE, $timezone);
55 55
 	}
56 56
 
57 57
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @return string
62 62
 	 */
63 63
 	function name() {
64
-		return $this->get( 'VNU_name' );
64
+		return $this->get('VNU_name');
65 65
 	}
66 66
 
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @return string
71 71
 	 */
72 72
 	function phone() {
73
-		return $this->get( 'VNU_phone' );
73
+		return $this->get('VNU_phone');
74 74
 	}
75 75
 
76 76
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @return string
81 81
 	 */
82 82
 	function venue_url() {
83
-		return $this->get( 'VNU_url' );
83
+		return $this->get('VNU_url');
84 84
 	}
85 85
 
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @return string
90 90
 	 */
91 91
 	function description() {
92
-		return $this->get( 'VNU_desc' );
92
+		return $this->get('VNU_desc');
93 93
 	}
94 94
 
95 95
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return string
100 100
 	 */
101 101
 	function excerpt() {
102
-		return $this->get( 'VNU_short_desc' );
102
+		return $this->get('VNU_short_desc');
103 103
 	}
104 104
 
105 105
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @return string
110 110
 	 */
111 111
 	function identifier() {
112
-		return $this->get( 'VNU_identifier' );
112
+		return $this->get('VNU_identifier');
113 113
 	}
114 114
 
115 115
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @return string
120 120
 	 */
121 121
 	function address() {
122
-		return $this->get( 'VNU_address' );
122
+		return $this->get('VNU_address');
123 123
 	}
124 124
 
125 125
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @return string
130 130
 	 */
131 131
 	function address2() {
132
-		return $this->get( 'VNU_address2' );
132
+		return $this->get('VNU_address2');
133 133
 	}
134 134
 
135 135
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * @return string
141 141
 	 */
142 142
 	function city() {
143
-		return $this->get( 'VNU_city' );
143
+		return $this->get('VNU_city');
144 144
 	}
145 145
 
146 146
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @return int
149 149
 	 */
150 150
 	function state_ID() {
151
-		return $this->get( 'STA_ID' );
151
+		return $this->get('STA_ID');
152 152
 	}
153 153
 
154 154
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * @return string
167 167
 	 */
168 168
 	public function state_name() {
169
-		return $this->state_obj() instanceof EE_State ? $this->state_obj()->name() :  '';
169
+		return $this->state_obj() instanceof EE_State ? $this->state_obj()->name() : '';
170 170
 	}
171 171
 
172 172
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @return EE_State
177 177
 	 */
178 178
 	function state_obj() {
179
-		return $this->get_first_related( 'State' );
179
+		return $this->get_first_related('State');
180 180
 	}
181 181
 
182 182
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 * @return string
189 189
 	 */
190 190
 	public function state() {
191
-		if ( apply_filters( 'FHEE__EEI_Address__state__use_abbreviation', true, $this->state_obj() ) ) {
191
+		if (apply_filters('FHEE__EEI_Address__state__use_abbreviation', true, $this->state_obj())) {
192 192
 			return $this->state_abbrev();
193 193
 		} else {
194 194
 			return $this->state_name();
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * @return string
203 203
 	 */
204 204
 	function country_ID() {
205
-		return $this->get( 'CNT_ISO' );
205
+		return $this->get('CNT_ISO');
206 206
 	}
207 207
 
208 208
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @return string
212 212
 	 */
213 213
 	public function country_name() {
214
-		return $this->country_obj() instanceof EE_Country ? $this->country_obj()->name() :  '';
214
+		return $this->country_obj() instanceof EE_Country ? $this->country_obj()->name() : '';
215 215
 	}
216 216
 
217 217
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 * @return EE_Country
222 222
 	 */
223 223
 	function country_obj() {
224
-		return $this->get_first_related( 'Country' );
224
+		return $this->get_first_related('Country');
225 225
 	}
226 226
 
227 227
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	 * @return string
234 234
 	 */
235 235
 	public function country() {
236
-		if ( apply_filters( 'FHEE__EEI_Address__country__use_abbreviation', true, $this->country_obj() ) ) {
236
+		if (apply_filters('FHEE__EEI_Address__country__use_abbreviation', true, $this->country_obj())) {
237 237
 			return $this->country_ID();
238 238
 		} else {
239 239
 			return $this->country_name();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * @return string
248 248
 	 */
249 249
 	function zip() {
250
-		return $this->get( 'VNU_zip' );
250
+		return $this->get('VNU_zip');
251 251
 	}
252 252
 
253 253
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @return int
258 258
 	 */
259 259
 	function capacity() {
260
-		return $this->get_pretty( 'VNU_capacity', 'symbol' );
260
+		return $this->get_pretty('VNU_capacity', 'symbol');
261 261
 	}
262 262
 
263 263
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @return string
268 268
 	 */
269 269
 	function created() {
270
-		return $this->get( 'VNU_created' );
270
+		return $this->get('VNU_created');
271 271
 	}
272 272
 
273 273
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 * @return string
278 278
 	 */
279 279
 	function modified() {
280
-		return $this->get( 'VNU_modified' );
280
+		return $this->get('VNU_modified');
281 281
 	}
282 282
 
283 283
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * @return int
288 288
 	 */
289 289
 	function order() {
290
-		return $this->get( 'VNU_order' );
290
+		return $this->get('VNU_order');
291 291
 	}
292 292
 
293 293
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 * @return int
298 298
 	 */
299 299
 	function wp_user() {
300
-		return $this->get( 'VNU_wp_user' );
300
+		return $this->get('VNU_wp_user');
301 301
 	}
302 302
 
303 303
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 * @return string
307 307
 	 */
308 308
 	function virtual_phone() {
309
-		return $this->get( 'VNU_virtual_phone' );
309
+		return $this->get('VNU_virtual_phone');
310 310
 	}
311 311
 
312 312
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @return string
316 316
 	 */
317 317
 	function virtual_url() {
318
-		return $this->get( 'VNU_virtual_url' );
318
+		return $this->get('VNU_virtual_url');
319 319
 	}
320 320
 
321 321
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * @return bool
325 325
 	 */
326 326
 	function enable_for_gmap() {
327
-		return $this->get( 'VNU_enable_for_gmap' );
327
+		return $this->get('VNU_enable_for_gmap');
328 328
 	}
329 329
 
330 330
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 * @return string
334 334
 	 */
335 335
 	function google_map_link() {
336
-		return $this->get( 'VNU_google_map_link' );
336
+		return $this->get('VNU_google_map_link');
337 337
 	}
338 338
 
339 339
 
@@ -345,16 +345,16 @@  discard block
 block discarded – undo
345 345
 	 * @param bool  $upcoming
346 346
 	 * @return EE_Event[]
347 347
 	 */
348
-	function events( $query_params = array(), $upcoming = FALSE ) {
349
-		if ( $upcoming ) {
348
+	function events($query_params = array(), $upcoming = FALSE) {
349
+		if ($upcoming) {
350 350
 			$query_params = array(
351 351
 				array(
352 352
 					'status' => 'publish',
353
-					'Datetime.DTT_EVT_start' => array( '>',  EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_start' ) )
353
+					'Datetime.DTT_EVT_start' => array('>', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start'))
354 354
 				)
355 355
 			);
356 356
 		}
357
-		return $this->get_many_related( 'Event', $query_params );
357
+		return $this->get_many_related('Event', $query_params);
358 358
 	}
359 359
 
360 360
 
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
 	/**
373 373
 	 * Sets address
374 374
 	 */
375
-	function set_address( $address = '' ) {
376
-		$this->set( 'VNU_address', $address );
375
+	function set_address($address = '') {
376
+		$this->set('VNU_address', $address);
377 377
 	}
378 378
 
379 379
 
@@ -381,8 +381,8 @@  discard block
 block discarded – undo
381 381
 	/**
382 382
 	 * @param string $address2
383 383
 	 */
384
-	function set_address2( $address2 = '' ) {
385
-		$this->set( 'VNU_address2', $address2 );
384
+	function set_address2($address2 = '') {
385
+		$this->set('VNU_address2', $address2);
386 386
 	}
387 387
 
388 388
 
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
 	/**
391 391
 	 * @param string $city
392 392
 	 */
393
-	function set_city( $city = '' ) {
394
-		$this->set( 'VNU_city', $city );
393
+	function set_city($city = '') {
394
+		$this->set('VNU_city', $city);
395 395
 	}
396 396
 
397 397
 
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
 	/**
400 400
 	 * @param int $state
401 401
 	 */
402
-	function set_state_ID( $state = 0 ) {
403
-		$this->set( 'STA_ID', $state );
402
+	function set_state_ID($state = 0) {
403
+		$this->set('STA_ID', $state);
404 404
 	}
405 405
 
406 406
 
@@ -411,8 +411,8 @@  discard block
 block discarded – undo
411 411
 	 * @param EE_State /int $state_id_or_obj
412 412
 	 * @return EE_State
413 413
 	 */
414
-	function set_state_obj( $state_id_or_obj ) {
415
-		return $this->_add_relation_to( $state_id_or_obj, 'State' );
414
+	function set_state_obj($state_id_or_obj) {
415
+		return $this->_add_relation_to($state_id_or_obj, 'State');
416 416
 	}
417 417
 
418 418
 
@@ -420,8 +420,8 @@  discard block
 block discarded – undo
420 420
 	/**
421 421
 	 * @param int $country_ID
422 422
 	 */
423
-	function set_country_ID( $country_ID = 0 ) {
424
-		$this->set( 'CNT_ISO', $country_ID );
423
+	function set_country_ID($country_ID = 0) {
424
+		$this->set('CNT_ISO', $country_ID);
425 425
 	}
426 426
 
427 427
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 	 * @param EE_Country /string $country_id_or_obj
431 431
 	 * @return EE_Country
432 432
 	 */
433
-	function set_country_obj( $country_id_or_obj ) {
433
+	function set_country_obj($country_id_or_obj) {
434 434
 		return $this->_add_relation_to($country_id_or_obj, 'Country');
435 435
 	}
436 436
 
@@ -439,8 +439,8 @@  discard block
 block discarded – undo
439 439
 	/**
440 440
 	 * @param string $zip
441 441
 	 */
442
-	function set_zip( $zip = '' ) {
443
-		$this->set( 'VNU_zip', $zip );
442
+	function set_zip($zip = '') {
443
+		$this->set('VNU_zip', $zip);
444 444
 	}
445 445
 
446 446
 
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
 	/**
449 449
 	 * @param int $capacity
450 450
 	 */
451
-	function set_capacity( $capacity = 0 ) {
452
-		$this->set( 'VNU_capacity', $capacity );
451
+	function set_capacity($capacity = 0) {
452
+		$this->set('VNU_capacity', $capacity);
453 453
 	}
454 454
 
455 455
 
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 	/**
458 458
 	 * @param string $created
459 459
 	 */
460
-	function set_created( $created = '' ) {
461
-		$this->set( 'VNU_created', $created );
460
+	function set_created($created = '') {
461
+		$this->set('VNU_created', $created);
462 462
 	}
463 463
 
464 464
 
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 	/**
467 467
 	 * @param string $desc
468 468
 	 */
469
-	function set_description( $desc = '' ) {
470
-		$this->set( 'VNU_desc', $desc );
469
+	function set_description($desc = '') {
470
+		$this->set('VNU_desc', $desc);
471 471
 	}
472 472
 
473 473
 
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
 	/**
476 476
 	 * @param string $identifier
477 477
 	 */
478
-	function set_identifier( $identifier = '' ) {
479
-		$this->set( 'VNU_identifier', $identifier );
478
+	function set_identifier($identifier = '') {
479
+		$this->set('VNU_identifier', $identifier);
480 480
 	}
481 481
 
482 482
 
@@ -484,8 +484,8 @@  discard block
 block discarded – undo
484 484
 	/**
485 485
 	 * @param string $modified
486 486
 	 */
487
-	function set_modified( $modified = '' ) {
488
-		$this->set( 'VNU_modified', $modified );
487
+	function set_modified($modified = '') {
488
+		$this->set('VNU_modified', $modified);
489 489
 	}
490 490
 
491 491
 
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
 	/**
494 494
 	 * @param string $name
495 495
 	 */
496
-	function set_name( $name = '' ) {
497
-		$this->set( 'VNU_name', $name );
496
+	function set_name($name = '') {
497
+		$this->set('VNU_name', $name);
498 498
 	}
499 499
 
500 500
 
@@ -502,8 +502,8 @@  discard block
 block discarded – undo
502 502
 	/**
503 503
 	 * @param int $order
504 504
 	 */
505
-	function set_order( $order = 0 ) {
506
-		$this->set( 'VNU_order', $order );
505
+	function set_order($order = 0) {
506
+		$this->set('VNU_order', $order);
507 507
 	}
508 508
 
509 509
 
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
 	/**
512 512
 	 * @param string $phone
513 513
 	 */
514
-	function set_phone( $phone = '' ) {
515
-		$this->set( 'VNU_phone', $phone );
514
+	function set_phone($phone = '') {
515
+		$this->set('VNU_phone', $phone);
516 516
 	}
517 517
 
518 518
 
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 	/**
521 521
 	 * @param int $wp_user
522 522
 	 */
523
-	function set_wp_user( $wp_user = 1 ) {
524
-		$this->set( 'VNU_wp_user', $wp_user );
523
+	function set_wp_user($wp_user = 1) {
524
+		$this->set('VNU_wp_user', $wp_user);
525 525
 	}
526 526
 
527 527
 
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 	/**
530 530
 	 * @param string $url
531 531
 	 */
532
-	function set_venue_url( $url = '' ) {
533
-		$this->set( 'VNU_url', $url );
532
+	function set_venue_url($url = '') {
533
+		$this->set('VNU_url', $url);
534 534
 	}
535 535
 
536 536
 
@@ -538,8 +538,8 @@  discard block
 block discarded – undo
538 538
 	/**
539 539
 	 * @param string $phone
540 540
 	 */
541
-	function set_virtual_phone( $phone = '' ) {
542
-		$this->set( 'VNU_virtual_phone', $phone );
541
+	function set_virtual_phone($phone = '') {
542
+		$this->set('VNU_virtual_phone', $phone);
543 543
 	}
544 544
 
545 545
 
@@ -547,8 +547,8 @@  discard block
 block discarded – undo
547 547
 	/**
548 548
 	 * @param string $url
549 549
 	 */
550
-	function set_virtual_url( $url = '' ) {
551
-		$this->set( 'VNU_virtual_url', $url );
550
+	function set_virtual_url($url = '') {
551
+		$this->set('VNU_virtual_url', $url);
552 552
 	}
553 553
 
554 554
 
@@ -556,8 +556,8 @@  discard block
 block discarded – undo
556 556
 	/**
557 557
 	 * @param string $enable
558 558
 	 */
559
-	function set_enable_for_gmap( $enable = '' ) {
560
-		$this->set( 'VNU_enable_for_gmap', $enable );
559
+	function set_enable_for_gmap($enable = '') {
560
+		$this->set('VNU_enable_for_gmap', $enable);
561 561
 	}
562 562
 
563 563
 
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
 	/**
566 566
 	 * @param string $google_map_link
567 567
 	 */
568
-	function set_google_map_link( $google_map_link = '' ) {
569
-		$this->set( 'VNU_google_map_link', $google_map_link );
568
+	function set_google_map_link($google_map_link = '') {
569
+		$this->set('VNU_google_map_link', $google_map_link);
570 570
 	}
571 571
 
572 572
 
Please login to merge, or discard this patch.
core/db_models/EEM_Question_Group.model.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * ------------------------------------------------------------------------
23 23
  */
24
-require_once ( EE_MODELS . 'EEM_Soft_Delete_Base.model.php' );
25
-require_once( EE_CLASSES . 'EE_Question_Group.class.php');
24
+require_once (EE_MODELS.'EEM_Soft_Delete_Base.model.php');
25
+require_once(EE_CLASSES.'EE_Question_Group.class.php');
26 26
 class EEM_Question_Group extends EEM_Soft_Delete_Base {
27 27
 	const system_personal = 1;
28 28
 	const system_address = 2;
@@ -30,25 +30,25 @@  discard block
 block discarded – undo
30 30
 	protected static $_instance = NULL;
31 31
         
32 32
         
33
-	protected function __construct( $timezone = NULL ) {
34
-		$this->singular_item = __('Question Group','event_espresso');
35
-		$this->plural_item = __('Question Groups','event_espresso');
33
+	protected function __construct($timezone = NULL) {
34
+		$this->singular_item = __('Question Group', 'event_espresso');
35
+		$this->plural_item = __('Question Groups', 'event_espresso');
36 36
 
37 37
 		$this->_tables = array(
38
-			'Question_Group'=>new EE_Primary_Table('esp_question_group','QSG_ID')
38
+			'Question_Group'=>new EE_Primary_Table('esp_question_group', 'QSG_ID')
39 39
 		);
40 40
 		$this->_fields = array(
41 41
 			'Question_Group'=>array(
42
-				'QSG_ID'=>new EE_Primary_Key_Int_Field('QSG_ID', __('Question Group ID','event_espresso')),
43
-				'QSG_name'=>new EE_Plain_Text_Field('QSG_name', __('Question Group Name','event_espresso'), false, ''),
44
-				'QSG_identifier'=>new EE_Plain_Text_Field('QSG_identifier', __('Text ID for question Group','event_espresso'), false, ''),
45
-				'QSG_desc'=>new EE_Post_Content_Field('QSG_desc', __('Description of Question Group','event_espresso'), true, ''),
46
-				'QSG_order'=>new EE_Integer_Field('QSG_order', __('Order in which to show the question group','event_espresso'), true, 0),
47
-				'QSG_show_group_name'=>new EE_Boolean_Field('QSG_show_group_name', __('Flag indicating whether to show the group\'s name on the registration page','event_espresso'), false, true),
48
-				'QSG_show_group_desc'=>new EE_Boolean_Field('QSG_show_group_desc', __('Flag indicating whether to show the group\s description on the registration page','event_espresso'), false, false),
49
-				'QSG_wp_user' => new EE_WP_User_Field('QSG_wp_user', __('Question Group Creator ID', 'event_espresso'), FALSE ),
50
-				'QSG_system'=>new EE_Integer_Field('QSG_system', __('Indicate IF this is a system group and if it is what system group it corresponds to.','event_espresso'), false, 0),
51
-				'QSG_deleted'=>new EE_Trashed_Flag_Field('QSG_deleted', __('Flag indicating this question group was deleted','event_espresso'), false, false)
42
+				'QSG_ID'=>new EE_Primary_Key_Int_Field('QSG_ID', __('Question Group ID', 'event_espresso')),
43
+				'QSG_name'=>new EE_Plain_Text_Field('QSG_name', __('Question Group Name', 'event_espresso'), false, ''),
44
+				'QSG_identifier'=>new EE_Plain_Text_Field('QSG_identifier', __('Text ID for question Group', 'event_espresso'), false, ''),
45
+				'QSG_desc'=>new EE_Post_Content_Field('QSG_desc', __('Description of Question Group', 'event_espresso'), true, ''),
46
+				'QSG_order'=>new EE_Integer_Field('QSG_order', __('Order in which to show the question group', 'event_espresso'), true, 0),
47
+				'QSG_show_group_name'=>new EE_Boolean_Field('QSG_show_group_name', __('Flag indicating whether to show the group\'s name on the registration page', 'event_espresso'), false, true),
48
+				'QSG_show_group_desc'=>new EE_Boolean_Field('QSG_show_group_desc', __('Flag indicating whether to show the group\s description on the registration page', 'event_espresso'), false, false),
49
+				'QSG_wp_user' => new EE_WP_User_Field('QSG_wp_user', __('Question Group Creator ID', 'event_espresso'), FALSE),
50
+				'QSG_system'=>new EE_Integer_Field('QSG_system', __('Indicate IF this is a system group and if it is what system group it corresponds to.', 'event_espresso'), false, 0),
51
+				'QSG_deleted'=>new EE_Trashed_Flag_Field('QSG_deleted', __('Flag indicating this question group was deleted', 'event_espresso'), false, false)
52 52
 			)
53 53
 		);
54 54
 		$this->_model_relations = array(
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 			'WP_User' => new EE_Belongs_To_Relation(),
59 59
 		);
60 60
 		//this model is generally available for reading
61
-		$this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
62
-		$this->_cap_restriction_generators[ EEM_Base::caps_read_admin ] = new EE_Restriction_Generator_Reg_Form('QSG_system');
63
-		$this->_cap_restriction_generators[ EEM_Base::caps_edit ] = new EE_Restriction_Generator_Reg_Form('QSG_system');
64
-		$this->_cap_restriction_generators[ EEM_Base::caps_delete ] = new EE_Restriction_Generator_Reg_Form('QSG_system');
65
-		parent::__construct( $timezone );
61
+		$this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
62
+		$this->_cap_restriction_generators[EEM_Base::caps_read_admin] = new EE_Restriction_Generator_Reg_Form('QSG_system');
63
+		$this->_cap_restriction_generators[EEM_Base::caps_edit] = new EE_Restriction_Generator_Reg_Form('QSG_system');
64
+		$this->_cap_restriction_generators[EEM_Base::caps_delete] = new EE_Restriction_Generator_Reg_Form('QSG_system');
65
+		parent::__construct($timezone);
66 66
 
67 67
 	}
68 68
 	/**
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function get_latest_question_group_order() {
74 74
 		$columns_to_select = array(
75
-			'max_order' => array("MAX(QSG_order)","%d")
75
+			'max_order' => array("MAX(QSG_order)", "%d")
76 76
 			);
77
-		$max = $this->_get_all_wpdb_results(array(), ARRAY_A, $columns_to_select );
77
+		$max = $this->_get_all_wpdb_results(array(), ARRAY_A, $columns_to_select);
78 78
 		return $max[0]['max_order'];
79 79
 	}
80 80
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
strategies/display/EE_Radio_Button_Display_Strategy.strategy.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php if (!defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
 /**
3 3
  * Class EE_Radio_Button_Display_Strategy
4 4
  * displays a set of radio buttons
@@ -15,34 +15,34 @@  discard block
 block discarded – undo
15 15
 	 * @throws EE_Error
16 16
 	 * @return string of html to display the field
17 17
 	 */
18
-	public function display(){
18
+	public function display() {
19 19
 		$input = $this->get_input();
20 20
 		$input->set_label_sizes();
21 21
 		$label_size_class = $input->get_label_size_class();
22 22
 		$html = '';
23
-		foreach( $input->options() as $value => $display_text ){
24
-			$value = $input->get_normalization_strategy()->unnormalize( $value );
23
+		foreach ($input->options() as $value => $display_text) {
24
+			$value = $input->get_normalization_strategy()->unnormalize($value);
25 25
 
26
-			$html_id = $this->get_sub_input_id( $value );
27
-			$html .= EEH_HTML::nl( 0, 'radio' );
28
-			$html .= '<label for="' . $html_id . '"';
29
-			$html .= ' id="' . $html_id . '-lbl"';
30
-			$html .= ' class="ee-radio-label-after' . $label_size_class . '">';
31
-			$html .= EEH_HTML::nl( 1, 'radio' );
32
-			$html .= '<input id="' . $html_id . '"';
33
-			$html .= ' name="' . $input->html_name() . '"';
34
-			$html .= ' class="' . $input->html_class() . '"';
35
-			$html .= ' style="' . $input->html_style() . '"';
26
+			$html_id = $this->get_sub_input_id($value);
27
+			$html .= EEH_HTML::nl(0, 'radio');
28
+			$html .= '<label for="'.$html_id.'"';
29
+			$html .= ' id="'.$html_id.'-lbl"';
30
+			$html .= ' class="ee-radio-label-after'.$label_size_class.'">';
31
+			$html .= EEH_HTML::nl(1, 'radio');
32
+			$html .= '<input id="'.$html_id.'"';
33
+			$html .= ' name="'.$input->html_name().'"';
34
+			$html .= ' class="'.$input->html_class().'"';
35
+			$html .= ' style="'.$input->html_style().'"';
36 36
 			$html .= ' type="radio"';
37
-			$html .= ' value="' . esc_attr( $value ) . '"';
37
+			$html .= ' value="'.esc_attr($value).'"';
38 38
 			$html .= $input->raw_value() === $value ? ' checked="checked"' : '';
39
-			$html .= ' ' . $this->_input->other_html_attributes();
39
+			$html .= ' '.$this->_input->other_html_attributes();
40 40
 			$html .= '>&nbsp;';
41 41
 			$html .= $display_text;
42
-			$html .= EEH_HTML::nl( -1, 'radio' ) . '</label>';
42
+			$html .= EEH_HTML::nl( -1, 'radio' ).'</label>';
43 43
 
44 44
 		}
45
-		$html .= EEH_HTML::div( '', '', 'clear-float' );
45
+		$html .= EEH_HTML::div('', '', 'clear-float');
46 46
 		$html .= EEH_HTML::divx();
47 47
 		return $html;
48 48
 	}
Please login to merge, or discard this patch.
templates/thank-you-page-registration-details.template.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,81 +5,81 @@  discard block
 block discarded – undo
5 5
 /** @type string $SPCO_attendee_information_url */
6 6
 ?>
7 7
 <h3 class="ee-registration-details-h3"><?php _e('Registration Details', 'event_espresso'); ?></h3>
8
-<?php  do_action( 'AHEE__thank_you_page_registration_details_template__after_heading' ); ?>
8
+<?php  do_action('AHEE__thank_you_page_registration_details_template__after_heading'); ?>
9 9
 
10 10
 <div class="ee-registration-details-dv">
11 11
 <?php
12 12
 $registrations = $transaction->registrations();
13
-$registrations = is_array( $registrations ) ? $registrations : array();
14
-$reg_count = count( $registrations );
13
+$registrations = is_array($registrations) ? $registrations : array();
14
+$reg_count = count($registrations);
15 15
 $reg_cntr = 0;
16 16
 $event_name = '';
17 17
 $wait_list = false;
18
-foreach ( $registrations as $registration ) {
19
-	if ( $registration instanceof EE_Registration ) {
20
-		if ( $event_name != $registration->event_name() && ! empty( $event_name )) { ?>
18
+foreach ($registrations as $registration) {
19
+	if ($registration instanceof EE_Registration) {
20
+		if ($event_name != $registration->event_name() && ! empty($event_name)) { ?>
21 21
 		</tbody>
22 22
 	</table>
23 23
 		<?php
24 24
 		}
25 25
 		$reg_cntr++;
26
-		if ( $event_name != $registration->event_name() ) {
26
+		if ($event_name != $registration->event_name()) {
27 27
 	?>
28 28
 	<h5>
29
-		<span class="smaller-text grey-text"><?php _e('for','event_espresso');?>: </span> <?php echo htmlentities( $registration->event_name(), ENT_QUOTES, 'UTF-8' );?>
29
+		<span class="smaller-text grey-text"><?php _e('for', 'event_espresso'); ?>: </span> <?php echo htmlentities($registration->event_name(), ENT_QUOTES, 'UTF-8'); ?>
30 30
 	</h5>
31 31
 	<table class='ee-table ee-registrations-list'>
32 32
 		<thead>
33 33
 			<tr>
34 34
 				<th width="40%">
35
-					<?php _e("Registrant Name",'event_espresso')?>
35
+					<?php _e("Registrant Name", 'event_espresso')?>
36 36
 				</th>
37 37
 				<th width="25%" class="jst-left">
38
-					<?php _e("REG Code",'event_espresso');?>
38
+					<?php _e("REG Code", 'event_espresso'); ?>
39 39
 				</th>
40 40
 				<th width="35%" class="jst-left">
41
-					<?php _e("REG Status",'event_espresso');?>
41
+					<?php _e("REG Status", 'event_espresso'); ?>
42 42
 				</th>
43 43
 			</tr>
44 44
 		</thead>
45 45
 		<tbody>
46 46
 	<?php
47 47
 		}
48
-		if ( $is_primary || ( ! $is_primary && $reg_url_link == $registration->reg_url_link() )) { ?>
48
+		if ($is_primary || ( ! $is_primary && $reg_url_link == $registration->reg_url_link())) { ?>
49 49
 			<tr>
50 50
 				<td width="40%">
51 51
 				<?php
52
-					if ( $registration->attendee() instanceof EE_Attendee ) {
53
-						echo $registration->attendee()->full_name( TRUE );
52
+					if ($registration->attendee() instanceof EE_Attendee) {
53
+						echo $registration->attendee()->full_name(TRUE);
54 54
 					}
55 55
 				?>
56 56
 					<p class="tiny-text" style="margin: .75em 0 0;">
57 57
 					<?php
58
-					if ( $registration->count_question_groups() ) {
58
+					if ($registration->count_question_groups()) {
59 59
 					?>
60
-						<a class="ee-icon-only-lnk" href="<?php echo $registration->edit_attendee_information_url();?>" title="<?php esc_attr_e('Click here to edit Attendee Information', 'event_espresso');?>"><span class="ee-icon ee-icon-user-edit"></span><?php _e('edit info', 'event_espresso');?></a>
60
+						<a class="ee-icon-only-lnk" href="<?php echo $registration->edit_attendee_information_url(); ?>" title="<?php esc_attr_e('Click here to edit Attendee Information', 'event_espresso'); ?>"><span class="ee-icon ee-icon-user-edit"></span><?php _e('edit info', 'event_espresso'); ?></a>
61 61
 					<?php } ?>
62
-						<a class="ee-resend-reg-confirmation-email ee-icon-only-lnk" href="<?php echo add_query_arg( array( 'token'=>$registration->reg_url_link(), 'resend_reg_confirmation' => 'true' ), EE_Registry::instance()->CFG->core->thank_you_page_url() );?>" title="<?php esc_attr_e('Click here to resend the Registration Confirmation email', 'event_espresso');?>" rel="<?php echo $registration->reg_url_link();?>"><span class="dashicons dashicons-email-alt"></span><?php _e('resend email', 'event_espresso');?></a>
62
+						<a class="ee-resend-reg-confirmation-email ee-icon-only-lnk" href="<?php echo add_query_arg(array('token'=>$registration->reg_url_link(), 'resend_reg_confirmation' => 'true'), EE_Registry::instance()->CFG->core->thank_you_page_url()); ?>" title="<?php esc_attr_e('Click here to resend the Registration Confirmation email', 'event_espresso'); ?>" rel="<?php echo $registration->reg_url_link(); ?>"><span class="dashicons dashicons-email-alt"></span><?php _e('resend email', 'event_espresso'); ?></a>
63 63
 					</p>
64 64
 				</td>
65 65
 				<td width="25%" class="jst-left">
66 66
 					<?php $registration->e('REG_code') ?>
67 67
 				</td>
68 68
 				<td width="35%" class="jst-left">
69
-					<?php $registration->e_pretty_status( TRUE )?>
69
+					<?php $registration->e_pretty_status(TRUE)?>
70 70
 					<?php
71
-						if ( $registration->status_ID() === EEM_Registration::status_id_wait_list ) {
71
+						if ($registration->status_ID() === EEM_Registration::status_id_wait_list) {
72 72
 							$wait_list = true;
73 73
 						}
74 74
 					?>
75 75
 				</td>
76 76
 			</tr>
77
-            <?php  do_action( 'AHEE__thank_you_page_registration_details_template__after_registration_table_row', $registration ); ?>
77
+            <?php  do_action('AHEE__thank_you_page_registration_details_template__after_registration_table_row', $registration); ?>
78 78
         <?php
79 79
 			$event_name = $registration->event_name();
80 80
 
81 81
 		}
82
-		if ( $reg_cntr >= $reg_count ) {
82
+		if ($reg_cntr >= $reg_count) {
83 83
 			?>
84 84
 			</tbody>
85 85
 			</table>
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 }
90 90
 ?>
91
-<?php if ( $is_primary && $SPCO_attendee_information_url ) { ?>
91
+<?php if ($is_primary && $SPCO_attendee_information_url) { ?>
92 92
 	<p class="small-text jst-rght">
93 93
 		<a href='<?php echo $SPCO_attendee_information_url?>'><?php _e("Click here to edit All Attendee Information", 'event_espresso'); ?></a>
94 94
 	</p>
95 95
 <?php } ?>
96
-	<?php if ( $wait_list ) { ?>
96
+	<?php if ($wait_list) { ?>
97 97
 
98 98
 			<?php
99 99
 			echo apply_filters(
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	<?php } ?>
114 114
 
115 115
 
116
-	<?php  do_action( 'AHEE__thank_you_page_registration_details_template__after_registration_details' ); ?>
116
+	<?php  do_action('AHEE__thank_you_page_registration_details_template__after_registration_details'); ?>
117 117
 
118 118
 </div>
119 119
 <!-- end of .registration-details -->
Please login to merge, or discard this patch.
core/services/collections/Collection.php 2 patches
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 use  EventEspresso\core\exceptions\InvalidInterfaceException;
6 6
 use LimitIterator;
7 7
 
8
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
9
-	exit( 'No direct script access allowed' );
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10 10
 }
11 11
 /**
12 12
  * Class Collection
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	  * @param string $collection_interface
37 37
 	  * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
38 38
 	  */
39
-	 public function __construct( $collection_interface ) {
40
-		 $this->setCollectionInterface( $collection_interface );
39
+	 public function __construct($collection_interface) {
40
+		 $this->setCollectionInterface($collection_interface);
41 41
 	 }
42 42
 
43 43
 
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	  * @param  string $collection_interface
50 50
 	  * @throws \EventEspresso\core\exceptions\InvalidInterfaceException
51 51
 	  */
52
-	 protected function setCollectionInterface( $collection_interface ) {
53
-		 if ( ! ( interface_exists( $collection_interface ) || class_exists( $collection_interface ) ) ) {
54
-			 throw new InvalidInterfaceException( $collection_interface );
52
+	 protected function setCollectionInterface($collection_interface) {
53
+		 if ( ! (interface_exists($collection_interface) || class_exists($collection_interface))) {
54
+			 throw new InvalidInterfaceException($collection_interface);
55 55
 		 }
56 56
 		 $this->collection_interface = $collection_interface;
57 57
 	 }
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 	  * @return bool
71 71
 	  * @throws \EventEspresso\core\exceptions\InvalidEntityException
72 72
 	  */
73
-	 public function add( $object, $identifier = null ) {
74
-		 if ( ! $object instanceof $this->collection_interface ) {
75
-			 throw new InvalidEntityException( $object, $this->collection_interface );
73
+	 public function add($object, $identifier = null) {
74
+		 if ( ! $object instanceof $this->collection_interface) {
75
+			 throw new InvalidEntityException($object, $this->collection_interface);
76 76
 		 }
77
-		 $this->attach( $object );
78
-		 $this->setIdentifier( $object, $identifier );
79
-		 return $this->contains( $object );
77
+		 $this->attach($object);
78
+		 $this->setIdentifier($object, $identifier);
79
+		 return $this->contains($object);
80 80
 	 }
81 81
 
82 82
 
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 	  * @param  mixed $identifier
93 93
 	  * @return bool
94 94
 	  */
95
-	 public function setIdentifier( $object, $identifier = null ) {
96
-		 $identifier = ! empty( $identifier ) ? $identifier : spl_object_hash( $object );
95
+	 public function setIdentifier($object, $identifier = null) {
96
+		 $identifier = ! empty($identifier) ? $identifier : spl_object_hash($object);
97 97
 		 $this->rewind();
98
-		 while ( $this->valid() ) {
99
-			 if ( $object === $this->current() ) {
100
-				 $this->setInfo( $identifier );
98
+		 while ($this->valid()) {
99
+			 if ($object === $this->current()) {
100
+				 $this->setInfo($identifier);
101 101
 				 $this->rewind();
102 102
 				 return true;
103 103
 			 }
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 	  * @param mixed $identifier
118 118
 	  * @return mixed
119 119
 	  */
120
-	 public function get( $identifier ) {
120
+	 public function get($identifier) {
121 121
 		 $this->rewind();
122
-		 while ( $this->valid() ) {
123
-			 if ( $identifier === $this->getInfo() ) {
122
+		 while ($this->valid()) {
123
+			 if ($identifier === $this->getInfo()) {
124 124
 				 $object = $this->current();
125 125
 				 $this->rewind();
126 126
 				 return $object;
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
 	  * @param  mixed $identifier
143 143
 	  * @return bool
144 144
 	  */
145
-	 public function has( $identifier ) {
145
+	 public function has($identifier) {
146 146
 		 $this->rewind();
147
-		 while ( $this->valid() ) {
148
-			 if ( $identifier === $this->getInfo() ) {
147
+		 while ($this->valid()) {
148
+			 if ($identifier === $this->getInfo()) {
149 149
 				 $this->rewind();
150 150
 				 return true;
151 151
 			 }
@@ -164,8 +164,8 @@  discard block
 block discarded – undo
164 164
 	  * @param $object
165 165
 	  * @return bool
166 166
 	  */
167
-	 public function hasObject( $object ) {
168
-		 return $this->contains( $object );
167
+	 public function hasObject($object) {
168
+		 return $this->contains($object);
169 169
 	 }
170 170
 
171 171
 
@@ -178,8 +178,8 @@  discard block
 block discarded – undo
178 178
 	  * @param $object
179 179
 	  * @return bool
180 180
 	  */
181
-	 public function remove( $object ) {
182
-		 $this->detach( $object );
181
+	 public function remove($object) {
182
+		 $this->detach($object);
183 183
 		 return true;
184 184
 	 }
185 185
 
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 	  * @param mixed $identifier
194 194
 	  * @return boolean
195 195
 	  */
196
-	 public function setCurrent( $identifier ) {
196
+	 public function setCurrent($identifier) {
197 197
 		 $this->rewind();
198
-		 while ( $this->valid() ) {
199
-			 if ( $identifier === $this->getInfo() ) {
198
+		 while ($this->valid()) {
199
+			 if ($identifier === $this->getInfo()) {
200 200
 				 return true;
201 201
 			 }
202 202
 			 $this->next();
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 	  * @param $object
215 215
 	  * @return boolean
216 216
 	  */
217
-	 public function setCurrentUsingObject( $object ) {
217
+	 public function setCurrentUsingObject($object) {
218 218
 		 $this->rewind();
219
-		 while ( $this->valid() ) {
220
-			 if ( $this->current() === $object ) {
219
+		 while ($this->valid()) {
220
+			 if ($this->current() === $object) {
221 221
 				 return true;
222 222
 			 }
223 223
 			 $this->next();
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
 	  * @return mixed
235 235
 	  */
236 236
 	 public function previous() {
237
-		 $index = $this->indexOf( $this->current() );
238
-		 if ( $index === 0 ) {
237
+		 $index = $this->indexOf($this->current());
238
+		 if ($index === 0) {
239 239
 			 return $this->current();
240 240
 		 }
241 241
 		 $index--;
242
-		 return $this->objectAtIndex( $index );
242
+		 return $this->objectAtIndex($index);
243 243
 	 }
244 244
 
245 245
 
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 	  * @param $object
252 252
 	  * @return boolean|int|string
253 253
 	  */
254
-	 public function indexOf( $object ) {
255
-		 if ( ! $this->contains( $object ) ) {
254
+	 public function indexOf($object) {
255
+		 if ( ! $this->contains($object)) {
256 256
 			 return false;
257 257
 		 }
258
-		 foreach ( $this as $index => $obj ) {
259
-			 if ( $obj === $object ) {
258
+		 foreach ($this as $index => $obj) {
259
+			 if ($obj === $object) {
260 260
 				 return $index;
261 261
 			 }
262 262
 		 }
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
 	  * @param int $index
273 273
 	  * @return mixed
274 274
 	  */
275
-	 public function objectAtIndex( $index ) {
276
-		 $iterator = new LimitIterator( $this, $index, 1 );
275
+	 public function objectAtIndex($index) {
276
+		 $iterator = new LimitIterator($this, $index, 1);
277 277
 		 $iterator->rewind();
278 278
 		 return $iterator->current();
279 279
 	 }
@@ -288,10 +288,10 @@  discard block
 block discarded – undo
288 288
 	  * @param int $length
289 289
 	  * @return array
290 290
 	  */
291
-	 public function slice( $offset, $length ) {
291
+	 public function slice($offset, $length) {
292 292
 		 $slice = array();
293
-		 $iterator = new LimitIterator( $this, $offset, $length );
294
-		 foreach ( $iterator as $object ) {
293
+		 $iterator = new LimitIterator($this, $offset, $length);
294
+		 foreach ($iterator as $object) {
295 295
 			 $slice[] = $object;
296 296
 		 }
297 297
 		 return $slice;
@@ -306,35 +306,35 @@  discard block
 block discarded – undo
306 306
 	  * @param mixed $objects A single object or an array of objects
307 307
 	  * @param int $index
308 308
 	  */
309
-	 public function insertAt( $objects, $index ) {
310
-		 if ( ! is_array( $objects ) ) {
311
-			 $objects = array( $objects );
309
+	 public function insertAt($objects, $index) {
310
+		 if ( ! is_array($objects)) {
311
+			 $objects = array($objects);
312 312
 		 }
313 313
 		 // check to ensure that objects don't already exist in the collection
314
-		 foreach ( $objects as $key => $object ) {
315
-			 if ( $this->contains( $object ) ) {
316
-				 unset( $objects[ $key ] );
314
+		 foreach ($objects as $key => $object) {
315
+			 if ($this->contains($object)) {
316
+				 unset($objects[$key]);
317 317
 			 }
318 318
 		 }
319 319
 		 // do we have any objects left?
320
-		 if ( ! $objects ) {
320
+		 if ( ! $objects) {
321 321
 			 return;
322 322
 		 }
323 323
 		 // detach any objects at or past this index
324 324
 		 $remaining = array();
325
-		 if ( $index < $this->count() ) {
326
-			 $remaining = $this->slice( $index, $this->count() - $index );
327
-			 foreach ( $remaining as $object ) {
328
-				 $this->detach( $object );
325
+		 if ($index < $this->count()) {
326
+			 $remaining = $this->slice($index, $this->count() - $index);
327
+			 foreach ($remaining as $object) {
328
+				 $this->detach($object);
329 329
 			 }
330 330
 		 }
331 331
 		 // add the new objects we're splicing in
332
-		 foreach ( $objects as $object ) {
333
-			 $this->attach( $object );
332
+		 foreach ($objects as $object) {
333
+			 $this->attach($object);
334 334
 		 }
335 335
 		 // attach the objects we previously detached
336
-		 foreach ( $remaining as $object ) {
337
-			 $this->attach( $object );
336
+		 foreach ($remaining as $object) {
337
+			 $this->attach($object);
338 338
 		 }
339 339
 	 }
340 340
 
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
 	  * @see http://stackoverflow.com/a/8736013
347 347
 	  * @param int $index
348 348
 	  */
349
-	 public function removeAt( $index ) {
350
-		 $this->detach( $this->objectAtIndex( $index ) );
349
+	 public function removeAt($index) {
350
+		 $this->detach($this->objectAtIndex($index));
351 351
 	 }
352 352
 
353 353
 
Please login to merge, or discard this patch.
Indentation   +31 added lines, -32 removed lines patch added patch discarded remove patch
@@ -83,7 +83,6 @@  discard block
 block discarded – undo
83 83
 
84 84
 	 /**
85 85
 	  * setIdentifier
86
-
87 86
 	  * Sets the data associated with an object in the Collection
88 87
 	  * if no $identifier is supplied, then the spl_object_hash() is used
89 88
 	  *
@@ -172,9 +171,9 @@  discard block
 block discarded – undo
172 171
 
173 172
 	 /**
174 173
 	  * hasObjects
175
-      * returns true if there are objects within the Collection, and false if it is empty
176
-      *
177
-      * @access public
174
+	  * returns true if there are objects within the Collection, and false if it is empty
175
+	  *
176
+	  * @access public
178 177
 	  * @return bool
179 178
 	  */
180 179
 	 public function hasObjects() {
@@ -378,34 +377,34 @@  discard block
 block discarded – undo
378 377
 
379 378
 
380 379
 
381
-     /**
382
-      * detaches ALL objects from the Collection
383
-      */
384
-     public function detachAll()
385
-     {
386
-         $this->rewind();
387
-         while ($this->valid()) {
388
-             $object = $this->current();
389
-             $this->next();
390
-             $this->detach($object);
391
-         }
392
-     }
393
-
394
-
395
-
396
-     /**
397
-      * unsets and detaches ALL objects from the Collection
398
-      */
399
-     public function trashAndDetachAll()
400
-     {
401
-         $this->rewind();
402
-         while ($this->valid()) {
403
-             $object = $this->current();
404
-             $this->next();
405
-             $this->detach($object);
406
-             unset($object);
407
-         }
408
-     }
380
+	 /**
381
+	  * detaches ALL objects from the Collection
382
+	  */
383
+	 public function detachAll()
384
+	 {
385
+		 $this->rewind();
386
+		 while ($this->valid()) {
387
+			 $object = $this->current();
388
+			 $this->next();
389
+			 $this->detach($object);
390
+		 }
391
+	 }
392
+
393
+
394
+
395
+	 /**
396
+	  * unsets and detaches ALL objects from the Collection
397
+	  */
398
+	 public function trashAndDetachAll()
399
+	 {
400
+		 $this->rewind();
401
+		 while ($this->valid()) {
402
+			 $object = $this->current();
403
+			 $this->next();
404
+			 $this->detach($object);
405
+			 unset($object);
406
+		 }
407
+	 }
409 408
 
410 409
 
411 410
 
Please login to merge, or discard this patch.
core/services/container/ContainerInterface.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 namespace EventEspresso\core\services\container;
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,26 +18,26 @@  discard block
 block discarded – undo
18 18
 interface ContainerInterface
19 19
 {
20 20
 
21
-    /**
22
-     * Finds an entry of the container by its identifier and returns it.
23
-     *
24
-     * @param string $id Identifier of the entry to look for.
25
-     * @return mixed Entry.
26
-     */
27
-    public function get($id);
28
-
29
-
30
-
31
-    /**
32
-     * Returns true if the container can return an entry for the given identifier.
33
-     * Returns false otherwise.
34
-     * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
35
-     * It does however mean that `get($id)` will not throw a `NotFoundException`.
36
-     *
37
-     * @param string $id Identifier of the entry to look for.
38
-     * @return boolean
39
-     */
40
-    public function has($id);
21
+	/**
22
+	 * Finds an entry of the container by its identifier and returns it.
23
+	 *
24
+	 * @param string $id Identifier of the entry to look for.
25
+	 * @return mixed Entry.
26
+	 */
27
+	public function get($id);
28
+
29
+
30
+
31
+	/**
32
+	 * Returns true if the container can return an entry for the given identifier.
33
+	 * Returns false otherwise.
34
+	 * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
35
+	 * It does however mean that `get($id)` will not throw a `NotFoundException`.
36
+	 *
37
+	 * @param string $id Identifier of the entry to look for.
38
+	 * @return boolean
39
+	 */
40
+	public function has($id);
41 41
 
42 42
 
43 43
 }
Please login to merge, or discard this patch.
core/services/container/CoffeeMakerInterface.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 namespace EventEspresso\core\services\container;
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
 
@@ -17,33 +17,33 @@  discard block
 block discarded – undo
17 17
 interface CoffeeMakerInterface
18 18
 {
19 19
 
20
-    /**
21
-     * @return array
22
-     */
23
-    public static function getTypes();
20
+	/**
21
+	 * @return array
22
+	 */
23
+	public static function getTypes();
24 24
 
25 25
 
26 26
 
27
-    /**
28
-     * @param $type
29
-     */
30
-    public static function validateType($type);
27
+	/**
28
+	 * @param $type
29
+	 */
30
+	public static function validateType($type);
31 31
 
32 32
 
33 33
 
34
-    /**
35
-     * @param RecipeInterface $recipe
36
-     * @param array           $arguments
37
-     * @return mixed
38
-     */
39
-    public function brew(RecipeInterface $recipe, $arguments = array());
34
+	/**
35
+	 * @param RecipeInterface $recipe
36
+	 * @param array           $arguments
37
+	 * @return mixed
38
+	 */
39
+	public function brew(RecipeInterface $recipe, $arguments = array());
40 40
 
41 41
 
42 42
 
43
-    /**
44
-     * @return string
45
-     */
46
-    public function type();
43
+	/**
44
+	 * @return string
45
+	 */
46
+	public function type();
47 47
 
48 48
 }
49 49
 // End of file CoffeeMakerInterface.php
Please login to merge, or discard this patch.
core/services/container/exceptions/InstantiationException.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use BadMethodCallException;
5 5
 
6 6
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
7
-    exit('No direct script access allowed');
7
+	exit('No direct script access allowed');
8 8
 }
9 9
 
10 10
 
@@ -20,27 +20,27 @@  discard block
 block discarded – undo
20 20
 class InstantiationException extends BadMethodCallException
21 21
 {
22 22
 
23
-    /**
24
-     * InstantiationException constructor.
25
-     *
26
-     * @param string $identifier the name of the requested entity or service
27
-     * @param string     $message
28
-     * @param int        $code
29
-     * @param \Exception $previous
30
-     */
31
-    public function __construct($identifier, $message = '', $code = 0, \Exception $previous = null)
32
-    {
33
-        if (empty($message)) {
34
-            $message = sprintf(
35
-                __(
36
-                    'The "%1$s" class could not be constructed.',
37
-                    'event_espresso'
38
-                ),
39
-                $identifier
40
-            );
41
-        }
42
-        parent::__construct($message, $code, $previous);
43
-    }
23
+	/**
24
+	 * InstantiationException constructor.
25
+	 *
26
+	 * @param string $identifier the name of the requested entity or service
27
+	 * @param string     $message
28
+	 * @param int        $code
29
+	 * @param \Exception $previous
30
+	 */
31
+	public function __construct($identifier, $message = '', $code = 0, \Exception $previous = null)
32
+	{
33
+		if (empty($message)) {
34
+			$message = sprintf(
35
+				__(
36
+					'The "%1$s" class could not be constructed.',
37
+					'event_espresso'
38
+				),
39
+				$identifier
40
+			);
41
+		}
42
+		parent::__construct($message, $code, $previous);
43
+	}
44 44
 
45 45
 }
46 46
 // End of file InstantiationException.php
Please login to merge, or discard this patch.