Completed
Branch ENH-9108-remove-affiliate-prog... (1526ed)
by
unknown
68:12 queued 59:06
created
core/db_classes/EE_Registration_Payment.class.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	/**
41 41
 	 * registration_ID
42 42
 	 * @access 	public
43
-	 * @return 	int
43
+	 * @return 	boolean
44 44
 	 */
45 45
 	public function registration_ID() {
46 46
 		return $this->get( 'REG_ID' );
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	/**
52 52
 	 * payment_ID
53 53
 	 * @access 	public
54
-	 * @return    int
54
+	 * @return    boolean
55 55
 	 */
56 56
 	public function payment_ID() {
57 57
 		return $this->get( 'PAY_ID' );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	/**
63 63
 	 * amount
64 64
 	 * @access 	public
65
-	 * @return 	float
65
+	 * @return 	boolean
66 66
 	 */
67 67
 	public function amount() {
68 68
 		return $this->get( 'RPY_amount' );
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 	 * @param string $timezone
20 20
 	 * @return EE_Registration_Payment
21 21
 	 */
22
-	public static function new_instance( $props_n_values = array(), $timezone = '' ) {
23
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
24
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone );
22
+	public static function new_instance($props_n_values = array(), $timezone = '') {
23
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
24
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone);
25 25
 	}
26 26
 
27 27
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 * @param string $timezone
32 32
 	 * @return EE_Registration_Payment
33 33
 	 */
34
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) {
35
-		return new self( $props_n_values, true, $timezone );
34
+	public static function new_instance_from_db($props_n_values = array(), $timezone = '') {
35
+		return new self($props_n_values, true, $timezone);
36 36
 	}
37 37
 
38 38
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return 	int
44 44
 	 */
45 45
 	public function registration_ID() {
46
-		return $this->get( 'REG_ID' );
46
+		return $this->get('REG_ID');
47 47
 	}
48 48
 
49 49
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @return    int
55 55
 	 */
56 56
 	public function payment_ID() {
57
-		return $this->get( 'PAY_ID' );
57
+		return $this->get('PAY_ID');
58 58
 	}
59 59
 
60 60
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @return 	float
66 66
 	 */
67 67
 	public function amount() {
68
-		return $this->get( 'RPY_amount' );
68
+		return $this->get('RPY_amount');
69 69
 	}
70 70
 
71 71
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 * @access    public
76 76
 	 * @param float $amount
77 77
 	 */
78
-	public function set_amount( $amount = 0.000 ) {
79
-		$this->set( 'RPY_amount', $amount );
78
+	public function set_amount($amount = 0.000) {
79
+		$this->set('RPY_amount', $amount);
80 80
 	}
81 81
 
82 82
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return \EE_Registration
88 88
 	 */
89 89
 	public function registration() {
90
-		return $this->get_first_related( 'Registration' );
90
+		return $this->get_first_related('Registration');
91 91
 	}
92 92
 
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @return \EE_Payment
99 99
 	 */
100 100
 	public function payment() {
101
-		return $this->get_first_related( 'Payment' );
101
+		return $this->get_first_related('Payment');
102 102
 	}
103 103
 
104 104
 
Please login to merge, or discard this patch.
core/db_classes/EE_State.class.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 
52 52
 	/**
53
-	 * @return string
53
+	 * @return boolean
54 54
 	 */
55 55
 	public function country_iso() {
56 56
 		return $this->get( 'CNT_ISO' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
 
61 61
 	/**
62
-	 * @return string
62
+	 * @return boolean
63 63
 	 */
64 64
 	public function abbrev() {
65 65
 		return $this->get( 'STA_abbrev' );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 
79 79
 	/**
80
-	 * @return string
80
+	 * @return boolean
81 81
 	 */
82 82
 	public function name() {
83 83
 		return $this->get( 'STA_name' );
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 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
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 	 * @param array $props_n_values
33 33
 	 * @return EE_State|mixed
34 34
 	 */
35
-	public static function new_instance( $props_n_values = array() ) {
36
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
37
-		return $has_object ? $has_object : new self( $props_n_values );
35
+	public static function new_instance($props_n_values = array()) {
36
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
37
+		return $has_object ? $has_object : new self($props_n_values);
38 38
 	}
39 39
 
40 40
 
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @param array $props_n_values
44 44
 	 * @return EE_State
45 45
 	 */
46
-	public static function new_instance_from_db( $props_n_values = array() ) {
47
-		return new self( $props_n_values, TRUE );
46
+	public static function new_instance_from_db($props_n_values = array()) {
47
+		return new self($props_n_values, TRUE);
48 48
 	}
49 49
 
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @return string
54 54
 	 */
55 55
 	public function country_iso() {
56
-		return $this->get( 'CNT_ISO' );
56
+		return $this->get('CNT_ISO');
57 57
 	}
58 58
 
59 59
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @return string
63 63
 	 */
64 64
 	public function abbrev() {
65
-		return $this->get( 'STA_abbrev' );
65
+		return $this->get('STA_abbrev');
66 66
 	}
67 67
 
68 68
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @return bool
72 72
 	 */
73 73
 	public function active() {
74
-		return $this->get( 'STA_active' );
74
+		return $this->get('STA_active');
75 75
 	}
76 76
 
77 77
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @return string
81 81
 	 */
82 82
 	public function name() {
83
-		return $this->get( 'STA_name' );
83
+		return $this->get('STA_name');
84 84
 	}
85 85
 
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @return EE_Country
90 90
 	 */
91 91
 	public function country() {
92
-		return $this->get_first_related( 'Country' );
92
+		return $this->get_first_related('Country');
93 93
 	}
94 94
 
95 95
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 	/**
98 98
 	 * @param $iso
99 99
 	 */
100
-	public function set_country_iso( $iso ) {
101
-		$this->set( 'CNT_ISO', $iso );
100
+	public function set_country_iso($iso) {
101
+		$this->set('CNT_ISO', $iso);
102 102
 	}
103 103
 
104 104
 
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	/**
107 107
 	 * @param $abbrev
108 108
 	 */
109
-	public function set_abbrev( $abbrev ) {
110
-		$this->set( 'STA_abbrev', $abbrev );
109
+	public function set_abbrev($abbrev) {
110
+		$this->set('STA_abbrev', $abbrev);
111 111
 	}
112 112
 
113 113
 
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 	/**
116 116
 	 * @param $active
117 117
 	 */
118
-	public function set_active( $active ) {
119
-		$this->set( 'STA_active', $active );
118
+	public function set_active($active) {
119
+		$this->set('STA_active', $active);
120 120
 	}
121 121
 
122 122
 
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
 	/**
125 125
 	 * @param $name
126 126
 	 */
127
-	public function set_name( $name ) {
128
-		$this->set( 'STA_name', $name );
127
+	public function set_name($name) {
128
+		$this->set('STA_name', $name);
129 129
 	}
130 130
 }
131 131
 
Please login to merge, or discard this patch.
core/db_classes/EE_Status.class.php 2 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	/**
67 67
 	 * Sets code
68 68
 	 * @param string $code
69
-	 * @return boolean
69
+	 * @return boolean|null
70 70
 	 */
71 71
 	function set_code( $code ) {
72 72
 		$this->set( 'STS_code', $code );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 	/**
78 78
 	 * Gets desc
79
-	 * @return string
79
+	 * @return boolean
80 80
 	 */
81 81
 	function desc() {
82 82
 		return $this->get( 'STS_desc' );
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	/**
88 88
 	 * Sets desc
89 89
 	 * @param string $desc
90
-	 * @return boolean
90
+	 * @return boolean|null
91 91
 	 */
92 92
 	function set_desc( $desc ) {
93 93
 		$this->set( 'STS_desc', $desc );
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
 	/**
99 99
 	 * Gets type
100
-	 * @return string
100
+	 * @return boolean
101 101
 	 */
102 102
 	function type() {
103 103
 		return $this->get( 'STS_type' );
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	/**
109 109
 	 * Sets type
110 110
 	 * @param string $type
111
-	 * @return boolean
111
+	 * @return boolean|null
112 112
 	 */
113 113
 	function set_type( $type ) {
114 114
 		$this->set( 'STS_type', $type );
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	/**
130 130
 	 * Sets can_edit
131 131
 	 * @param boolean $can_edit
132
-	 * @return boolean
132
+	 * @return boolean|null
133 133
 	 */
134 134
 	function set_can_edit( $can_edit ) {
135 135
 		$this->set( 'STS_can_edit', $can_edit );
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	/**
151 151
 	 * Sets open
152 152
 	 * @param boolean $open
153
-	 * @return boolean
153
+	 * @return boolean|null
154 154
 	 */
155 155
 	function set_open( $open ) {
156 156
 		$this->set( 'STS_open', $open );
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 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
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 	 * @param array $props_n_values
33 33
 	 * @return EE_Status
34 34
 	 */
35
-	public static function new_instance( $props_n_values = array() ) {
36
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
37
-		return $has_object ? $has_object : new self( $props_n_values );
35
+	public static function new_instance($props_n_values = array()) {
36
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
37
+		return $has_object ? $has_object : new self($props_n_values);
38 38
 	}
39 39
 
40 40
 
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @param array $props_n_values
44 44
 	 * @return EE_Status
45 45
 	 */
46
-	public static function new_instance_from_db( $props_n_values = array() ) {
47
-		return new self( $props_n_values, TRUE );
46
+	public static function new_instance_from_db($props_n_values = array()) {
47
+		return new self($props_n_values, TRUE);
48 48
 	}
49 49
 
50 50
 
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 	 * @param string $schema
56 56
 	 * @return string
57 57
 	 */
58
-	function code( $plural = FALSE, $schema = 'upper' ) {
59
-		$id = $this->get( 'STS_ID' );
60
-		$code = EEM_Status::instance()->localized_status( array( $id => $this->get( 'STS_code' ) ), $plural, $schema );
61
-		return $code[ $id ];
58
+	function code($plural = FALSE, $schema = 'upper') {
59
+		$id = $this->get('STS_ID');
60
+		$code = EEM_Status::instance()->localized_status(array($id => $this->get('STS_code')), $plural, $schema);
61
+		return $code[$id];
62 62
 	}
63 63
 
64 64
 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 	 * @param string $code
69 69
 	 * @return boolean
70 70
 	 */
71
-	function set_code( $code ) {
72
-		$this->set( 'STS_code', $code );
71
+	function set_code($code) {
72
+		$this->set('STS_code', $code);
73 73
 	}
74 74
 
75 75
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @return string
80 80
 	 */
81 81
 	function desc() {
82
-		return $this->get( 'STS_desc' );
82
+		return $this->get('STS_desc');
83 83
 	}
84 84
 
85 85
 
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 	 * @param string $desc
90 90
 	 * @return boolean
91 91
 	 */
92
-	function set_desc( $desc ) {
93
-		$this->set( 'STS_desc', $desc );
92
+	function set_desc($desc) {
93
+		$this->set('STS_desc', $desc);
94 94
 	}
95 95
 
96 96
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 * @return string
101 101
 	 */
102 102
 	function type() {
103
-		return $this->get( 'STS_type' );
103
+		return $this->get('STS_type');
104 104
 	}
105 105
 
106 106
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 	 * @param string $type
111 111
 	 * @return boolean
112 112
 	 */
113
-	function set_type( $type ) {
114
-		$this->set( 'STS_type', $type );
113
+	function set_type($type) {
114
+		$this->set('STS_type', $type);
115 115
 	}
116 116
 
117 117
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 * @return boolean
122 122
 	 */
123 123
 	function can_edit() {
124
-		return $this->get( 'STS_can_edit' );
124
+		return $this->get('STS_can_edit');
125 125
 	}
126 126
 
127 127
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 	 * @param boolean $can_edit
132 132
 	 * @return boolean
133 133
 	 */
134
-	function set_can_edit( $can_edit ) {
135
-		$this->set( 'STS_can_edit', $can_edit );
134
+	function set_can_edit($can_edit) {
135
+		$this->set('STS_can_edit', $can_edit);
136 136
 	}
137 137
 
138 138
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * @return boolean
143 143
 	 */
144 144
 	function open() {
145
-		return $this->get( 'STS_open' );
145
+		return $this->get('STS_open');
146 146
 	}
147 147
 
148 148
 
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 	 * @param boolean $open
153 153
 	 * @return boolean
154 154
 	 */
155
-	function set_open( $open ) {
156
-		$this->set( 'STS_open', $open );
155
+	function set_open($open) {
156
+		$this->set('STS_open', $open);
157 157
 	}
158 158
 }
159 159
 
Please login to merge, or discard this patch.
core/db_classes/EE_Term.class.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 	/**
68 68
 	 * Gets name
69
-	 * @return string
69
+	 * @return boolean
70 70
 	 */
71 71
 	function name() {
72 72
 		return $this->get( 'name' );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	/**
78 78
 	 * Sets name
79 79
 	 * @param string $name
80
-	 * @return boolean
80
+	 * @return boolean|null
81 81
 	 */
82 82
 	function set_name( $name ) {
83 83
 		$this->set( 'name', $name );
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 	/**
89 89
 	 * Gets slug
90
-	 * @return string
90
+	 * @return boolean
91 91
 	 */
92 92
 	function slug() {
93 93
 		return $this->get( 'slug' );
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	/**
99 99
 	 * Sets slug
100 100
 	 * @param string $slug
101
-	 * @return boolean
101
+	 * @return boolean|null
102 102
 	 */
103 103
 	function set_slug( $slug ) {
104 104
 		$this->set( 'slug', $slug );
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 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
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 	 * @param bool $bydb
35 35
 	 * @param string $timezone
36 36
 	 */
37
-	protected function __construct( $fieldValues = array(), $bydb = FALSE, $timezone = '' ) {
38
-		if ( ! isset( $fieldValues[ 'slug' ] ) ) {
39
-			$fieldValues[ 'slug' ] = $fieldValues[ 'name' ];
37
+	protected function __construct($fieldValues = array(), $bydb = FALSE, $timezone = '') {
38
+		if ( ! isset($fieldValues['slug'])) {
39
+			$fieldValues['slug'] = $fieldValues['name'];
40 40
 		}
41
-		parent::__construct( $fieldValues, $bydb, $timezone );
41
+		parent::__construct($fieldValues, $bydb, $timezone);
42 42
 	}
43 43
 
44 44
 
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 	 * @param array $props_n_values
48 48
 	 * @return EE_Term|mixed
49 49
 	 */
50
-	public static function new_instance( $props_n_values = array() ) {
51
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
52
-		return $has_object ? $has_object : new self( $props_n_values );
50
+	public static function new_instance($props_n_values = array()) {
51
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
52
+		return $has_object ? $has_object : new self($props_n_values);
53 53
 	}
54 54
 
55 55
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 * @param array $props_n_values
59 59
 	 * @return EE_Term
60 60
 	 */
61
-	public static function new_instance_from_db( $props_n_values = array() ) {
62
-		return new self( $props_n_values, TRUE );
61
+	public static function new_instance_from_db($props_n_values = array()) {
62
+		return new self($props_n_values, TRUE);
63 63
 	}
64 64
 
65 65
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @return string
70 70
 	 */
71 71
 	function name() {
72
-		return $this->get( 'name' );
72
+		return $this->get('name');
73 73
 	}
74 74
 
75 75
 
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 * @param string $name
80 80
 	 * @return boolean
81 81
 	 */
82
-	function set_name( $name ) {
83
-		$this->set( 'name', $name );
82
+	function set_name($name) {
83
+		$this->set('name', $name);
84 84
 	}
85 85
 
86 86
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * @return string
91 91
 	 */
92 92
 	function slug() {
93
-		return $this->get( 'slug' );
93
+		return $this->get('slug');
94 94
 	}
95 95
 
96 96
 
@@ -100,8 +100,8 @@  discard block
 block discarded – undo
100 100
 	 * @param string $slug
101 101
 	 * @return boolean
102 102
 	 */
103
-	function set_slug( $slug ) {
104
-		$this->set( 'slug', $slug );
103
+	function set_slug($slug) {
104
+		$this->set('slug', $slug);
105 105
 	}
106 106
 }
107 107
 
Please login to merge, or discard this patch.
core/db_classes/EE_Term_Taxonomy.class.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 	/**
53 53
 	 * Gets taxonomy
54
-	 * @return string
54
+	 * @return boolean
55 55
 	 */
56 56
 	function taxonomy() {
57 57
 		return $this->get( 'taxonomy' );
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	/**
63 63
 	 * Sets taxonomy
64 64
 	 * @param string $taxonomy
65
-	 * @return boolean
65
+	 * @return boolean|null
66 66
 	 */
67 67
 	function set_taxonomy( $taxonomy ) {
68 68
 		$this->set( 'taxonomy', $taxonomy );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 	/**
74 74
 	 * Gets term_count
75
-	 * @return int
75
+	 * @return boolean
76 76
 	 */
77 77
 	function count() {
78 78
 		return $this->get( 'term_count' );
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	/**
84 84
 	 * Sets term_count
85 85
 	 * @param int $term_count
86
-	 * @return boolean
86
+	 * @return boolean|null
87 87
 	 */
88 88
 	function set_count( $term_count ) {
89 89
 		$this->set( 'term_count', $term_count );
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 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
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 	 * @param array $props_n_values
33 33
 	 * @return EE_Term_Taxonomy
34 34
 	 */
35
-	public static function new_instance( $props_n_values = array() ) {
36
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
37
-		return $has_object ? $has_object : new self( $props_n_values );
35
+	public static function new_instance($props_n_values = array()) {
36
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
37
+		return $has_object ? $has_object : new self($props_n_values);
38 38
 	}
39 39
 
40 40
 
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @param array $props_n_values
44 44
 	 * @return EE_Term_Taxonomy
45 45
 	 */
46
-	public static function new_instance_from_db( $props_n_values = array() ) {
47
-		return new self( $props_n_values, TRUE );
46
+	public static function new_instance_from_db($props_n_values = array()) {
47
+		return new self($props_n_values, TRUE);
48 48
 	}
49 49
 
50 50
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @return string
55 55
 	 */
56 56
 	function taxonomy() {
57
-		return $this->get( 'taxonomy' );
57
+		return $this->get('taxonomy');
58 58
 	}
59 59
 
60 60
 
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * @param string $taxonomy
65 65
 	 * @return boolean
66 66
 	 */
67
-	function set_taxonomy( $taxonomy ) {
68
-		$this->set( 'taxonomy', $taxonomy );
67
+	function set_taxonomy($taxonomy) {
68
+		$this->set('taxonomy', $taxonomy);
69 69
 	}
70 70
 
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 * @return int
76 76
 	 */
77 77
 	function count() {
78
-		return $this->get( 'term_count' );
78
+		return $this->get('term_count');
79 79
 	}
80 80
 
81 81
 
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 * @param int $term_count
86 86
 	 * @return boolean
87 87
 	 */
88
-	function set_count( $term_count ) {
89
-		$this->set( 'term_count', $term_count );
88
+	function set_count($term_count) {
89
+		$this->set('term_count', $term_count);
90 90
 	}
91 91
 
92 92
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @return EE_Term
97 97
 	 */
98 98
 	function term() {
99
-		return $this->get_first_related( 'Term' );
99
+		return $this->get_first_related('Term');
100 100
 	}
101 101
 
102 102
 
Please login to merge, or discard this patch.
core/db_classes/EE_Transaction.class.php 3 patches
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param array $props_n_values  incoming values from the database
50 50
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
51 51
 	 *                          		the website will be used.
52
-	 * @return EE_Attendee
52
+	 * @return EE_Transaction
53 53
 	 */
54 54
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
55 55
 		return new self( $props_n_values, TRUE, $timezone );
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	/**
213 213
 	 *        get Transaction Total
214 214
 	 * @access        public
215
-	 * @return float
215
+	 * @return boolean
216 216
 	 */
217 217
 	public function total() {
218 218
 		return $this->get( 'TXN_total' );
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 	/**
224 224
 	 *        get Total Amount Paid to Date
225 225
 	 * @access        public
226
-	 * @return float
226
+	 * @return boolean
227 227
 	 */
228 228
 	public function paid() {
229 229
 		return $this->get( 'TXN_paid' );
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	/**
327 327
 	 * Gets all the attendees for this transaction (handy for use with EE_Attendee's get_registrations_for_event function
328 328
 	 * for getting attendees and how many registrations they each have for an event)
329
-	 * @return mixed EE_Attendee[] by default, int if $output is set to 'COUNT'
329
+	 * @return EE_Base_Class[] EE_Attendee[] by default, int if $output is set to 'COUNT'
330 330
 	 */
331 331
 	public function attendees() {
332 332
 		return $this->get_many_related( 'Attendee', array( array( 'Registration.Transaction.TXN_ID' => $this->ID() ) ) );
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 	/**
572 572
 	 * Gets all the extra meta info on this payment
573 573
 	 * @param array $query_params like EEM_Base::get_all
574
-	 * @return EE_Extra_Meta
574
+	 * @return EE_Base_Class[]
575 575
 	 */
576 576
 	public function extra_meta( $query_params = array() ) {
577 577
 		return $this->get_many_related( 'Extra_Meta', $query_params );
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 
714 714
 	/**
715 715
 	 * Gets PMD_ID
716
-	 * @return int
716
+	 * @return boolean
717 717
 	 */
718 718
 	function payment_method_ID() {
719 719
 		return $this->get('PMD_ID');
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 	/**
725 725
 	 * Sets PMD_ID
726 726
 	 * @param int $PMD_ID
727
-	 * @return boolean
727
+	 * @return boolean|null
728 728
 	 */
729 729
 	function set_payment_method_ID($PMD_ID) {
730 730
 		$this->set('PMD_ID', $PMD_ID);
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -742,11 +742,11 @@
 block discarded – undo
742 742
 		$pm = $this->get_first_related('Payment_Method');
743 743
 		if( $pm instanceof EE_Payment_Method ){
744 744
 			return $pm;
745
-		}else{
745
+		} else{
746 746
 			$last_payment = $this->last_payment();
747 747
 			if( $last_payment instanceof EE_Payment && $last_payment->payment_method() ){
748 748
 				return $last_payment->payment_method();
749
-			}else{
749
+			} else{
750 750
 				return NULL;
751 751
 			}
752 752
 		}
Please login to merge, or discard this patch.
Spacing   +111 added lines, -111 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
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage 	includes/classes/EE_Transaction.class.php
27 27
  * @author 				Brent Christensen
28 28
  */
29
-class EE_Transaction extends EE_Base_Class implements EEI_Transaction{
29
+class EE_Transaction extends EE_Base_Class implements EEI_Transaction {
30 30
 
31 31
 
32 32
 	/**
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 *                             		    date_format and the second value is the time format
39 39
 	 * @return EE_Transaction
40 40
 	 */
41
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
42
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
43
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
41
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
42
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
43
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
44 44
 	}
45 45
 
46 46
 
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	 *                          		the website will be used.
52 52
 	 * @return EE_Attendee
53 53
 	 */
54
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
55
-		return new self( $props_n_values, TRUE, $timezone );
54
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
55
+		return new self($props_n_values, TRUE, $timezone);
56 56
 	}
57 57
 
58 58
 
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
 	 * @return 	void
68 68
 	 */
69 69
 	public function lock() {
70
-		$locked_transactions = get_option( 'ee_locked_transactions', array() );
71
-		$locked_transactions[ $this->ID() ] = true;
72
-		update_option( 'ee_locked_transactions', $locked_transactions );
70
+		$locked_transactions = get_option('ee_locked_transactions', array());
71
+		$locked_transactions[$this->ID()] = true;
72
+		update_option('ee_locked_transactions', $locked_transactions);
73 73
 	}
74 74
 
75 75
 
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 	 * @return 	void
84 84
 	 */
85 85
 	public function unlock() {
86
-		$locked_transactions = get_option( 'ee_locked_transactions', array() );
87
-		unset( $locked_transactions[ $this->ID() ] );
88
-		update_option( 'ee_locked_transactions', $locked_transactions );
86
+		$locked_transactions = get_option('ee_locked_transactions', array());
87
+		unset($locked_transactions[$this->ID()]);
88
+		update_option('ee_locked_transactions', $locked_transactions);
89 89
 	}
90 90
 
91 91
 	/**
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 	 * @return boolean
103 103
 	 */
104 104
 	public function is_locked() {
105
-		$locked_transactions = get_option( 'ee_locked_transactions', array() );
106
-		return isset( $locked_transactions[ $this->ID() ] ) ? true : false;
105
+		$locked_transactions = get_option('ee_locked_transactions', array());
106
+		return isset($locked_transactions[$this->ID()]) ? true : false;
107 107
 	}
108 108
 
109 109
 
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 	 * @access        public
115 115
 	 * @param        float $total total value of transaction
116 116
 	 */
117
-	public function set_total( $total = 0.00 ) {
118
-		$this->set( 'TXN_total', $total );
117
+	public function set_total($total = 0.00) {
118
+		$this->set('TXN_total', $total);
119 119
 	}
120 120
 
121 121
 
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	 * @access        public
127 127
 	 * @param        float $total_paid total amount paid to date (sum of all payments)
128 128
 	 */
129
-	public function set_paid( $total_paid = 0.00 ) {
130
-		$this->set( 'TXN_paid', $total_paid );
129
+	public function set_paid($total_paid = 0.00) {
130
+		$this->set('TXN_paid', $total_paid);
131 131
 	}
132 132
 
133 133
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 	 * @access        public
139 139
 	 * @param        string $status whether the transaction is open, declined, accepted, or any number of custom values that can be set
140 140
 	 */
141
-	public function set_status( $status = '' ) {
142
-		$this->set( 'STS_ID', $status );
141
+	public function set_status($status = '') {
142
+		$this->set('STS_ID', $status);
143 143
 	}
144 144
 
145 145
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 * @access        public
151 151
 	 * @param        string $hash_salt required for some payment gateways
152 152
 	 */
153
-	public function set_hash_salt( $hash_salt = '' ) {
154
-		$this->set( 'TXN_hash_salt', $hash_salt );
153
+	public function set_hash_salt($hash_salt = '') {
154
+		$this->set('TXN_hash_salt', $hash_salt);
155 155
 	}
156 156
 
157 157
 
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 	 * Sets TXN_reg_steps array
161 161
 	 * @param array $txn_reg_steps
162 162
 	 */
163
-	function set_reg_steps( $txn_reg_steps ) {
164
-		$this->set( 'TXN_reg_steps', $txn_reg_steps );
163
+	function set_reg_steps($txn_reg_steps) {
164
+		$this->set('TXN_reg_steps', $txn_reg_steps);
165 165
 	}
166 166
 
167 167
 
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 	 * @return array
172 172
 	 */
173 173
 	function reg_steps() {
174
-		$TXN_reg_steps = $this->get( 'TXN_reg_steps' );
175
-		return is_array( $TXN_reg_steps ) ? $TXN_reg_steps : array();
174
+		$TXN_reg_steps = $this->get('TXN_reg_steps');
175
+		return is_array($TXN_reg_steps) ? $TXN_reg_steps : array();
176 176
 	}
177 177
 
178 178
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * @return string of transaction's total cost, with currency symbol and decimal
183 183
 	 */
184 184
 	public function pretty_total() {
185
-		return $this->get_pretty( 'TXN_total' );
185
+		return $this->get_pretty('TXN_total');
186 186
 	}
187 187
 
188 188
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * @return string
193 193
 	 */
194 194
 	public function pretty_paid() {
195
-		return $this->get_pretty( 'TXN_paid' );
195
+		return $this->get_pretty('TXN_paid');
196 196
 	}
197 197
 
198 198
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 * @return float amount remaining
205 205
 	 */
206 206
 	public function remaining() {
207
-		return (float)( $this->total() - $this->paid() );
207
+		return (float) ($this->total() - $this->paid());
208 208
 	}
209 209
 
210 210
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 * @return float
216 216
 	 */
217 217
 	public function total() {
218
-		return $this->get( 'TXN_total' );
218
+		return $this->get('TXN_total');
219 219
 	}
220 220
 
221 221
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 * @return float
227 227
 	 */
228 228
 	public function paid() {
229
-		return $this->get( 'TXN_paid' );
229
+		return $this->get('TXN_paid');
230 230
 	}
231 231
 
232 232
 
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
 	 * @access        public
237 237
 	 */
238 238
 	public function get_cart_session() {
239
-		$session_data = $this->get( 'TXN_session_data' );
240
-		return isset( $session_data[ 'cart' ] ) && $session_data[ 'cart' ] instanceof EE_Cart ? $session_data[ 'cart' ] : NULL;
239
+		$session_data = $this->get('TXN_session_data');
240
+		return isset($session_data['cart']) && $session_data['cart'] instanceof EE_Cart ? $session_data['cart'] : NULL;
241 241
 	}
242 242
 
243 243
 
@@ -247,9 +247,9 @@  discard block
 block discarded – undo
247 247
 	 * @access        public
248 248
 	 */
249 249
 	public function session_data() {
250
-		$session_data = $this->get( 'TXN_session_data' );
251
-		if ( empty( $session_data ) ) {
252
-			$session_data = array( 'id' => NULL, 'user_id' => NULL, 'ip_address' => NULL, 'user_agent' => NULL, 'init_access' => NULL, 'last_access' => NULL, 'pages_visited' => array() );
250
+		$session_data = $this->get('TXN_session_data');
251
+		if (empty($session_data)) {
252
+			$session_data = array('id' => NULL, 'user_id' => NULL, 'ip_address' => NULL, 'user_agent' => NULL, 'init_access' => NULL, 'last_access' => NULL, 'pages_visited' => array());
253 253
 		}
254 254
 		return $session_data;
255 255
 	}
@@ -262,11 +262,11 @@  discard block
 block discarded – undo
262 262
 	 * @access        public
263 263
 	 * @param        EE_Session|array $session_data
264 264
 	 */
265
-	public function set_txn_session_data( $session_data ) {
266
-		if ( $session_data instanceof EE_Session ) {
267
-			$this->set( 'TXN_session_data', $session_data->get_session_data( NULL, TRUE ));
265
+	public function set_txn_session_data($session_data) {
266
+		if ($session_data instanceof EE_Session) {
267
+			$this->set('TXN_session_data', $session_data->get_session_data(NULL, TRUE));
268 268
 		} else {
269
-			$this->set( 'TXN_session_data', $session_data );
269
+			$this->set('TXN_session_data', $session_data);
270 270
 		}
271 271
 	}
272 272
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 * @access        public
278 278
 	 */
279 279
 	public function hash_salt_() {
280
-		return $this->get( 'TXN_hash_salt' );
280
+		return $this->get('TXN_hash_salt');
281 281
 	}
282 282
 
283 283
 
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
 	 * @param 	boolean 	$gmt - whether to return a unix timestamp with UTC offset applied (default) or no UTC offset applied
298 298
 	 * @return 	string | int
299 299
 	 */
300
-	public function datetime( $format = FALSE, $gmt = FALSE ) {
301
-		if ( $format ) {
302
-			return $this->get_pretty( 'TXN_timestamp' );
303
-		} else if ( $gmt ) {
304
-			return $this->get_raw( 'TXN_timestamp' );
300
+	public function datetime($format = FALSE, $gmt = FALSE) {
301
+		if ($format) {
302
+			return $this->get_pretty('TXN_timestamp');
303
+		} else if ($gmt) {
304
+			return $this->get_raw('TXN_timestamp');
305 305
 		} else {
306
-			return $this->get( 'TXN_timestamp' );
306
+			return $this->get('TXN_timestamp');
307 307
 		}
308 308
 	}
309 309
 
@@ -315,10 +315,10 @@  discard block
 block discarded – undo
315 315
 	 * @param        boolean $get_cached   TRUE to retrieve cached registrations or FALSE to pull from the db
316 316
 	 * @return EE_Registration[]
317 317
 	 */
318
-	public function registrations( $query_params = array(), $get_cached = FALSE ) {
319
-		$query_params = ( empty( $query_params ) || ! is_array( $query_params ) ) ? array( 'order_by' => array( 'Event.EVT_name' => 'ASC', 'Attendee.ATT_lname' => 'ASC', 'Attendee.ATT_fname' => 'ASC' ) ) : $query_params;
318
+	public function registrations($query_params = array(), $get_cached = FALSE) {
319
+		$query_params = (empty($query_params) || ! is_array($query_params)) ? array('order_by' => array('Event.EVT_name' => 'ASC', 'Attendee.ATT_lname' => 'ASC', 'Attendee.ATT_fname' => 'ASC')) : $query_params;
320 320
 		$query_params = $get_cached ? array() : $query_params;
321
-		return $this->get_many_related( 'Registration', $query_params );
321
+		return $this->get_many_related('Registration', $query_params);
322 322
 	}
323 323
 
324 324
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 	 * @return mixed EE_Attendee[] by default, int if $output is set to 'COUNT'
330 330
 	 */
331 331
 	public function attendees() {
332
-		return $this->get_many_related( 'Attendee', array( array( 'Registration.Transaction.TXN_ID' => $this->ID() ) ) );
332
+		return $this->get_many_related('Attendee', array(array('Registration.Transaction.TXN_ID' => $this->ID())));
333 333
 	}
334 334
 
335 335
 
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
 	 * @param array $query_params like EEM_Base::get_all
340 340
 	 * @return EE_Payment[]
341 341
 	 */
342
-	public function payments( $query_params = array() ) {
343
-		return $this->get_many_related( 'Payment', $query_params );
342
+	public function payments($query_params = array()) {
343
+		return $this->get_many_related('Payment', $query_params);
344 344
 	}
345 345
 
346 346
 
@@ -350,8 +350,8 @@  discard block
 block discarded – undo
350 350
 	 * @return EE_Payment[]
351 351
 	 */
352 352
 	public function approved_payments() {
353
-		EE_Registry::instance()->load_model( 'Payment' );
354
-		return $this->get_many_related( 'Payment', array( array( 'STS_ID' => EEM_Payment::status_id_approved ), 'order_by' => array( 'PAY_timestamp' => 'DESC' ) ) );
353
+		EE_Registry::instance()->load_model('Payment');
354
+		return $this->get_many_related('Payment', array(array('STS_ID' => EEM_Payment::status_id_approved), 'order_by' => array('PAY_timestamp' => 'DESC')));
355 355
 	}
356 356
 
357 357
 
@@ -361,8 +361,8 @@  discard block
 block discarded – undo
361 361
 	 * @param bool $show_icons
362 362
 	 * @return string
363 363
 	 */
364
-	public function e_pretty_status( $show_icons = FALSE ) {
365
-		echo $this->pretty_status( $show_icons );
364
+	public function e_pretty_status($show_icons = FALSE) {
365
+		echo $this->pretty_status($show_icons);
366 366
 	}
367 367
 
368 368
 
@@ -372,10 +372,10 @@  discard block
 block discarded – undo
372 372
 	 * @param bool $show_icons
373 373
 	 * @return string
374 374
 	 */
375
-	public function pretty_status( $show_icons = FALSE ) {
376
-		$status = EEM_Status::instance()->localized_status( array( $this->status_ID() => __( 'unknown', 'event_espresso' ) ), FALSE, 'sentence' );
375
+	public function pretty_status($show_icons = FALSE) {
376
+		$status = EEM_Status::instance()->localized_status(array($this->status_ID() => __('unknown', 'event_espresso')), FALSE, 'sentence');
377 377
 		$icon = '';
378
-		switch ( $this->status_ID() ) {
378
+		switch ($this->status_ID()) {
379 379
 			case EEM_Transaction::complete_status_code:
380 380
 				$icon = $show_icons ? '<span class="dashicons dashicons-yes ee-icon-size-24 green-text"></span>' : '';
381 381
 				break;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 				$icon = $show_icons ? '<span class="dashicons dashicons-plus ee-icon-size-16 orange-text"></span>' : '';
393 393
 				break;
394 394
 		}
395
-		return $icon . $status[ $this->status_ID() ];
395
+		return $icon.$status[$this->status_ID()];
396 396
 	}
397 397
 
398 398
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 	 * @access        public
403 403
 	 */
404 404
 	public function status_ID() {
405
-		return $this->get( 'STS_ID' );
405
+		return $this->get('STS_ID');
406 406
 	}
407 407
 
408 408
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 * @return boolean
413 413
 	 */
414 414
 	public function is_free() {
415
-		return (float)$this->get( 'TXN_total' ) == 0 ? TRUE : FALSE;
415
+		return (float) $this->get('TXN_total') == 0 ? TRUE : FALSE;
416 416
 	}
417 417
 
418 418
 
@@ -480,12 +480,12 @@  discard block
 block discarded – undo
480 480
 	 * @access public
481 481
 	 * @return string
482 482
 	 */
483
-	public function invoice_url( $type = 'html' ) {
483
+	public function invoice_url($type = 'html') {
484 484
 		$REG = $this->primary_registration();
485
-		if ( ! $REG instanceof EE_Registration ) {
485
+		if ( ! $REG instanceof EE_Registration) {
486 486
 			return '';
487 487
 		}
488
-		return $REG->invoice_url( $type );
488
+		return $REG->invoice_url($type);
489 489
 	}
490 490
 
491 491
 
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 	 * @return EE_Registration
496 496
 	 */
497 497
 	public function primary_registration() {
498
-		return $this->get_first_related( 'Registration', array( array( 'REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT ) ) );
498
+		return $this->get_first_related('Registration', array(array('REG_count' => EEM_Registration::PRIMARY_REGISTRANT_COUNT)));
499 499
 	}
500 500
 
501 501
 
@@ -505,12 +505,12 @@  discard block
 block discarded – undo
505 505
 	 * @param string $type 'pdf' or 'html' (default is 'html')
506 506
 	 * @return string
507 507
 	 */
508
-	public function receipt_url( $type = 'html' ) {
508
+	public function receipt_url($type = 'html') {
509 509
 		$REG = $this->primary_registration();
510
-		if ( ! $REG instanceof EE_Registration ) {
510
+		if ( ! $REG instanceof EE_Registration) {
511 511
 			return '';
512 512
 		}
513
-		return $REG->receipt_url( $type );
513
+		return $REG->receipt_url($type);
514 514
 	}
515 515
 
516 516
 
@@ -535,15 +535,15 @@  discard block
 block discarded – undo
535 535
 	 * @deprecated
536 536
 	 * @return boolean
537 537
 	 */
538
-	public function update_based_on_payments(){
538
+	public function update_based_on_payments() {
539 539
 		EE_Error::doing_it_wrong(
540
-			__CLASS__ . '::' . __FUNCTION__,
541
-			sprintf( __( 'This method is deprecated. Please use "%s" instead', 'event_espresso' ), 'EE_Transaction_Processor::update_transaction_and_registrations_after_checkout_or_payment()' ),
540
+			__CLASS__.'::'.__FUNCTION__,
541
+			sprintf(__('This method is deprecated. Please use "%s" instead', 'event_espresso'), 'EE_Transaction_Processor::update_transaction_and_registrations_after_checkout_or_payment()'),
542 542
 			'4.6.0'
543 543
 		);
544 544
 		/** @type EE_Transaction_Processor $transaction_processor */
545
-		$transaction_processor = EE_Registry::instance()->load_class( 'Transaction_Processor' );
546
-		return  $transaction_processor->update_transaction_and_registrations_after_checkout_or_payment( $this );
545
+		$transaction_processor = EE_Registry::instance()->load_class('Transaction_Processor');
546
+		return  $transaction_processor->update_transaction_and_registrations_after_checkout_or_payment($this);
547 547
 	}
548 548
 
549 549
 
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 	 * @return string
553 553
 	 */
554 554
 	public function gateway_response_on_transaction() {
555
-		$payment = $this->get_first_related( 'Payment' );
555
+		$payment = $this->get_first_related('Payment');
556 556
 		return $payment instanceof EE_Payment ? $payment->gateway_response() : '';
557 557
 	}
558 558
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 	 * @return EE_Status
564 564
 	 */
565 565
 	public function status_obj() {
566
-		return $this->get_first_related( 'Status' );
566
+		return $this->get_first_related('Status');
567 567
 	}
568 568
 
569 569
 
@@ -573,8 +573,8 @@  discard block
 block discarded – undo
573 573
 	 * @param array $query_params like EEM_Base::get_all
574 574
 	 * @return EE_Extra_Meta
575 575
 	 */
576
-	public function extra_meta( $query_params = array() ) {
577
-		return $this->get_many_related( 'Extra_Meta', $query_params );
576
+	public function extra_meta($query_params = array()) {
577
+		return $this->get_many_related('Extra_Meta', $query_params);
578 578
 	}
579 579
 
580 580
 
@@ -584,8 +584,8 @@  discard block
 block discarded – undo
584 584
 	 * @param EE_Registration $registration
585 585
 	 * @return EE_Base_Class the relation was added to
586 586
 	 */
587
-	public function add_registration( EE_Registration $registration ) {
588
-		return $this->_add_relation_to( $registration, 'Registration' );
587
+	public function add_registration(EE_Registration $registration) {
588
+		return $this->_add_relation_to($registration, 'Registration');
589 589
 	}
590 590
 
591 591
 
@@ -596,8 +596,8 @@  discard block
 block discarded – undo
596 596
 	 * @param int $registration_or_id
597 597
 	 * @return EE_Base_Class that was removed from being related
598 598
 	 */
599
-	public function remove_registration_with_id( $registration_or_id ) {
600
-		return $this->_remove_relation_to( $registration_or_id, 'Registration' );
599
+	public function remove_registration_with_id($registration_or_id) {
600
+		return $this->_remove_relation_to($registration_or_id, 'Registration');
601 601
 	}
602 602
 
603 603
 
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
 	 * @return EE_Line_Item[]
608 608
 	 */
609 609
 	public function items_purchased() {
610
-		return $this->line_items( array( array( 'LIN_type' => EEM_Line_Item::type_line_item ) ) );
610
+		return $this->line_items(array(array('LIN_type' => EEM_Line_Item::type_line_item)));
611 611
 	}
612 612
 
613 613
 
@@ -617,8 +617,8 @@  discard block
 block discarded – undo
617 617
 	 * @param EE_Line_Item $line_item
618 618
 	 * @return EE_Base_Class the relation was added to
619 619
 	 */
620
-	public function add_line_item( EE_Line_Item $line_item ) {
621
-		return $this->_add_relation_to( $line_item, 'Line_Item' );
620
+	public function add_line_item(EE_Line_Item $line_item) {
621
+		return $this->_add_relation_to($line_item, 'Line_Item');
622 622
 	}
623 623
 
624 624
 
@@ -628,8 +628,8 @@  discard block
 block discarded – undo
628 628
 	 * @param array $query_params
629 629
 	 * @return EE_Line_Item[]
630 630
 	 */
631
-	public function line_items( $query_params = array() ) {
632
-		return $this->get_many_related( 'Line_Item', $query_params );
631
+	public function line_items($query_params = array()) {
632
+		return $this->get_many_related('Line_Item', $query_params);
633 633
 	}
634 634
 
635 635
 
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 	 * @return EE_Line_Item[]
640 640
 	 */
641 641
 	public function tax_items() {
642
-		return $this->line_items( array( array( 'LIN_type' => EEM_Line_Item::type_tax ) ) );
642
+		return $this->line_items(array(array('LIN_type' => EEM_Line_Item::type_tax)));
643 643
 	}
644 644
 
645 645
 
@@ -650,10 +650,10 @@  discard block
 block discarded – undo
650 650
 	 * @return EE_Line_Item
651 651
 	 */
652 652
 	public function total_line_item() {
653
-		$item =  $this->get_first_related( 'Line_Item', array( array( 'LIN_type' => EEM_Line_Item::type_total ) ) );
654
-		if( ! $item ){
655
-			EE_Registry::instance()->load_helper( 'Line_Item' );
656
-			$item = EEH_Line_Item::create_total_line_item( $this );
653
+		$item = $this->get_first_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_total)));
654
+		if ( ! $item) {
655
+			EE_Registry::instance()->load_helper('Line_Item');
656
+			$item = EEH_Line_Item::create_total_line_item($this);
657 657
 		}
658 658
 		return $item;
659 659
 	}
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 	 */
668 668
 	public function tax_total() {
669 669
 		$tax_line_item = $this->tax_total_line_item();
670
-		if ( $tax_line_item ) {
670
+		if ($tax_line_item) {
671 671
 			return $tax_line_item->total();
672 672
 		} else {
673 673
 			return 0;
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
 	 * @return EE_Line_Item
682 682
 	 */
683 683
 	public function tax_total_line_item() {
684
-		return $this->get_first_related( 'Line_Item', array( array( 'LIN_type' => EEM_Line_Item::type_tax_sub_total ) ) );
684
+		return $this->get_first_related('Line_Item', array(array('LIN_type' => EEM_Line_Item::type_tax_sub_total)));
685 685
 	}
686 686
 
687 687
 
@@ -690,20 +690,20 @@  discard block
 block discarded – undo
690 690
 	 *  Gets the array of billing info for the gateway and for this transaction's primary registration's attendee.
691 691
 	 * @return EE_Form_Section_Proper
692 692
 	 */
693
-	public function billing_info(){
693
+	public function billing_info() {
694 694
 		$payment_method = $this->payment_method();
695
-		if ( !$payment_method){
695
+		if ( ! $payment_method) {
696 696
 			EE_Error::add_error(__("Could not find billing info for transaction because no gateway has been used for it yet", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
697 697
 			return false;
698 698
 		}
699 699
 		$primary_reg = $this->primary_registration();
700
-		if ( ! $primary_reg ) {
701
-			EE_Error::add_error( __( "Cannot get billing info for gateway %s on transaction because no primary registration exists", "event_espresso" ), __FILE__, __FUNCTION__, __LINE__ );
700
+		if ( ! $primary_reg) {
701
+			EE_Error::add_error(__("Cannot get billing info for gateway %s on transaction because no primary registration exists", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
702 702
 			return FALSE;
703 703
 		}
704 704
 		$attendee = $primary_reg->attendee();
705
-		if ( ! $attendee ) {
706
-			EE_Error::add_error( __( "Cannot get billing info for gateway %s on transaction because the primary registration has no attendee exists", "event_espresso" ), __FILE__, __FUNCTION__, __LINE__ );
705
+		if ( ! $attendee) {
706
+			EE_Error::add_error(__("Cannot get billing info for gateway %s on transaction because the primary registration has no attendee exists", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
707 707
 			return FALSE;
708 708
 		}
709 709
 		return $attendee->billing_info_for_payment_method($payment_method);
@@ -738,15 +738,15 @@  discard block
 block discarded – undo
738 738
 	 * offline ones, dont' create payments)
739 739
 	 * @return EE_Payment_Method
740 740
 	 */
741
-	function payment_method(){
741
+	function payment_method() {
742 742
 		$pm = $this->get_first_related('Payment_Method');
743
-		if( $pm instanceof EE_Payment_Method ){
743
+		if ($pm instanceof EE_Payment_Method) {
744 744
 			return $pm;
745
-		}else{
745
+		} else {
746 746
 			$last_payment = $this->last_payment();
747
-			if( $last_payment instanceof EE_Payment && $last_payment->payment_method() ){
747
+			if ($last_payment instanceof EE_Payment && $last_payment->payment_method()) {
748 748
 				return $last_payment->payment_method();
749
-			}else{
749
+			} else {
750 750
 				return NULL;
751 751
 			}
752 752
 		}
@@ -757,15 +757,15 @@  discard block
 block discarded – undo
757 757
 	 * @return EE_Payment
758 758
 	 */
759 759
 	public function last_payment() {
760
-		return $this->get_first_related( 'Payment', array( 'order_by' => array( 'PAY_ID' => 'desc' ) ) );
760
+		return $this->get_first_related('Payment', array('order_by' => array('PAY_ID' => 'desc')));
761 761
 	}
762 762
 
763 763
 	/**
764 764
 	 * Gets all the line items which are unrelated to tickets on this transaction
765 765
 	 * @return EE_Line_Item[]
766 766
 	 */
767
-	public function non_ticket_line_items(){
768
-		return EEM_Line_Item::instance()->get_all_non_ticket_line_items_for_transaction( $this->ID() );
767
+	public function non_ticket_line_items() {
768
+		return EEM_Line_Item::instance()->get_all_non_ticket_line_items_for_transaction($this->ID());
769 769
 	}
770 770
 
771 771
 
Please login to merge, or discard this patch.
core/db_classes/EE_Venue.class.php 2 patches
Doc Comments   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param array $props_n_values  incoming values from the database
49 49
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
50 50
 	 *                          		the website will be used.
51
-	 * @return EE_Attendee
51
+	 * @return EE_Venue
52 52
 	 */
53 53
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
54 54
 		return new self( $props_n_values, TRUE, $timezone );
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 	/**
60 60
 	 * Gets name
61
-	 * @return string
61
+	 * @return boolean
62 62
 	 */
63 63
 	function name() {
64 64
 		return $this->get( 'VNU_name' );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 	/**
69 69
 	 * Gets phone
70
-	 * @return string
70
+	 * @return boolean
71 71
 	 */
72 72
 	function phone() {
73 73
 		return $this->get( 'VNU_phone' );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 	/**
79 79
 	 * venue_url
80
-	 * @return string
80
+	 * @return boolean
81 81
 	 */
82 82
 	function venue_url() {
83 83
 		return $this->get( 'VNU_url' );
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
 	/**
88 88
 	 * Gets desc
89
-	 * @return string
89
+	 * @return boolean
90 90
 	 */
91 91
 	function description() {
92 92
 		return $this->get( 'VNU_desc' );
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 	/**
98 98
 	 * Gets short description (AKA: the excerpt)
99
-	 * @return string
99
+	 * @return boolean
100 100
 	 */
101 101
 	function excerpt() {
102 102
 		return $this->get( 'VNU_short_desc' );
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 	/**
108 108
 	 * Gets identifier
109
-	 * @return string
109
+	 * @return boolean
110 110
 	 */
111 111
 	function identifier() {
112 112
 		return $this->get( 'VNU_identifier' );
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
 	/**
118 118
 	 * Gets address
119
-	 * @return string
119
+	 * @return boolean
120 120
 	 */
121 121
 	function address() {
122 122
 		return $this->get( 'VNU_address' );
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
 	/**
128 128
 	 * Gets address2
129
-	 * @return string
129
+	 * @return boolean
130 130
 	 */
131 131
 	function address2() {
132 132
 		return $this->get( 'VNU_address2' );
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
 	/**
139 139
 	 * Gets city
140
-	 * @return string
140
+	 * @return boolean
141 141
 	 */
142 142
 	function city() {
143 143
 		return $this->get( 'VNU_city' );
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
 	/**
147 147
 	 * Gets state
148
-	 * @return int
148
+	 * @return boolean
149 149
 	 */
150 150
 	function state_ID() {
151 151
 		return $this->get( 'STA_ID' );
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
 	/**
201 201
 	 * country_ID
202
-	 * @return string
202
+	 * @return boolean
203 203
 	 */
204 204
 	function country_ID() {
205 205
 		return $this->get( 'CNT_ISO' );
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
 	/**
246 246
 	 * Gets zip
247
-	 * @return string
247
+	 * @return boolean
248 248
 	 */
249 249
 	function zip() {
250 250
 		return $this->get( 'VNU_zip' );
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
 	/**
266 266
 	 * Gets created
267
-	 * @return string
267
+	 * @return boolean
268 268
 	 */
269 269
 	function created() {
270 270
 		return $this->get( 'VNU_created' );
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
 	/**
276 276
 	 * Gets modified
277
-	 * @return string
277
+	 * @return boolean
278 278
 	 */
279 279
 	function modified() {
280 280
 		return $this->get( 'VNU_modified' );
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
 	/**
286 286
 	 * Gets order
287
-	 * @return int
287
+	 * @return boolean
288 288
 	 */
289 289
 	function order() {
290 290
 		return $this->get( 'VNU_order' );
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
 	/**
296 296
 	 * Gets wp_user
297
-	 * @return int
297
+	 * @return boolean
298 298
 	 */
299 299
 	function wp_user() {
300 300
 		return $this->get( 'VNU_wp_user' );
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 
304 304
 
305 305
 	/**
306
-	 * @return string
306
+	 * @return boolean
307 307
 	 */
308 308
 	function virtual_phone() {
309 309
 		return $this->get( 'VNU_virtual_phone' );
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 
313 313
 
314 314
 	/**
315
-	 * @return string
315
+	 * @return boolean
316 316
 	 */
317 317
 	function virtual_url() {
318 318
 		return $this->get( 'VNU_virtual_url' );
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
 
332 332
 	/**
333
-	 * @return string
333
+	 * @return boolean
334 334
 	 */
335 335
 	function google_map_link() {
336 336
 		return $this->get( 'VNU_google_map_link' );
Please login to merge, or discard this patch.
Spacing   +82 added lines, -82 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__ );
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__);
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
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @return string
158 158
 	 */
159 159
 	public function state_abbrev() {
160
-		return $this->state_obj() instanceof EE_State ? $this->state_obj()->abbrev() : __( 'Unknown', 'event_espresso' );
160
+		return $this->state_obj() instanceof EE_State ? $this->state_obj()->abbrev() : __('Unknown', 'event_espresso');
161 161
 	}
162 162
 
163 163
 
@@ -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() :  __( 'Unknown', 'event_espresso' );
169
+		return $this->state_obj() instanceof EE_State ? $this->state_obj()->name() : __('Unknown', 'event_espresso');
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() :  __( 'Unknown', 'event_espresso' );
214
+		return $this->country_obj() instanceof EE_Country ? $this->country_obj()->name() : __('Unknown', 'event_espresso');
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_Attendee.model.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
 	*
110 110
 	* 		@access		public
111 111
 	* 		@param		$ATT_ID
112
-	*		@return 		mixed		array on success, FALSE on fail
112
+	*		@return 		EE_Soft_Delete_Base_Class|null		array on success, FALSE on fail
113 113
 	 * 		@deprecated
114 114
 	*/
115 115
 	public function get_attendee_by_ID( $ATT_ID = FALSE ) {
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
 
107 107
 	/**
108
-	*		retrieve  a single attendee from db via their ID
109
-	*
110
-	* 		@access		public
111
-	* 		@param		$ATT_ID
112
-	*		@return 		mixed		array on success, FALSE on fail
108
+	 *		retrieve  a single attendee from db via their ID
109
+	 *
110
+	 * 		@access		public
111
+	 * 		@param		$ATT_ID
112
+	 *		@return 		mixed		array on success, FALSE on fail
113 113
 	 * 		@deprecated
114
-	*/
114
+	 */
115 115
 	public function get_attendee_by_ID( $ATT_ID = FALSE ) {
116 116
 		// retrieve a particular EE_Attendee
117 117
 		return $this->get_one_by_ID( $ATT_ID );
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 
122 122
 
123 123
 	/**
124
-	*		retrieve  a single attendee from db via their ID
125
-	*
126
-	* 		@access		public
127
-	* 		@param		array $where_cols_n_values
128
-	*		@return 		mixed		array on success, FALSE on fail
129
-	*/
124
+	 *		retrieve  a single attendee from db via their ID
125
+	 *
126
+	 * 		@access		public
127
+	 * 		@param		array $where_cols_n_values
128
+	 *		@return 		mixed		array on success, FALSE on fail
129
+	 */
130 130
 	public function get_attendee( $where_cols_n_values = array() ) {
131 131
 
132 132
 		if ( empty( $where_cols_n_values )) {
@@ -174,20 +174,20 @@  discard block
 block discarded – undo
174 174
 
175 175
 
176 176
 	/**
177
-             * Takes an incoming array of EE_Registration ids and sends back a list of corresponding non duplicate
178
-             * EE_Attendee objects.
179
-             *
180
-             * @since    4.3.0
181
-             * @param  array $ids array of EE_Registration ids
182
-             * @return  EE_Attendee[]
183
-             */
184
-            public function get_array_of_contacts_from_reg_ids( $ids ) {
185
-                $ids = (array) $ids;
186
-                $_where = array(
187
-                    'Registration.REG_ID' => array( 'in', $ids )
188
-                    );
189
-                return $this->get_all( array( $_where ) );
190
-            }
177
+	 * Takes an incoming array of EE_Registration ids and sends back a list of corresponding non duplicate
178
+	 * EE_Attendee objects.
179
+	 *
180
+	 * @since    4.3.0
181
+	 * @param  array $ids array of EE_Registration ids
182
+	 * @return  EE_Attendee[]
183
+	 */
184
+			public function get_array_of_contacts_from_reg_ids( $ids ) {
185
+				$ids = (array) $ids;
186
+				$_where = array(
187
+					'Registration.REG_ID' => array( 'in', $ids )
188
+					);
189
+				return $this->get_all( array( $_where ) );
190
+			}
191 191
 
192 192
 
193 193
 }
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
 require_once ( EE_MODELS . 'EEM_Base.model.php' );
3 5
 
4 6
 /**
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
2
+require_once (EE_MODELS.'EEM_Base.model.php');
3 3
 
4 4
 /**
5 5
  *
@@ -21,60 +21,60 @@  discard block
 block discarded – undo
21 21
 	 * Please instead use the EEM_Attendee::system_question_* constants
22 22
 	 * @deprecated
23 23
 	 */
24
-	const fname_question_id=1;
24
+	const fname_question_id = 1;
25 25
 
26 26
 	/**
27 27
 	 * @deprecated
28 28
 	 */
29
-	const lname_question_id=2;
29
+	const lname_question_id = 2;
30 30
 
31 31
 
32 32
 	/**
33 33
 	 * @deprecated
34 34
 	 */
35
-	const email_question_id=3;
35
+	const email_question_id = 3;
36 36
 
37 37
 
38 38
 	/**
39 39
 	 * @deprecated
40 40
 	 */
41
-	const address_question_id=4;
41
+	const address_question_id = 4;
42 42
 
43 43
 
44 44
 	/**
45 45
 	 * @deprecated
46 46
 	 */
47
-	const address2_question_id=5;
47
+	const address2_question_id = 5;
48 48
 
49 49
 
50 50
 	/**
51 51
 	 * @deprecated
52 52
 	 */
53
-	const city_question_id=6;
53
+	const city_question_id = 6;
54 54
 
55 55
 
56 56
 	/**
57 57
 	 * @deprecated
58 58
 	 */
59
-	const state_question_id=7;
59
+	const state_question_id = 7;
60 60
 
61 61
 
62 62
 	/**
63 63
 	 * @deprecated
64 64
 	 */
65
-	const country_question_id=8;
65
+	const country_question_id = 8;
66 66
 
67 67
 
68 68
 	/**
69 69
 	 * @deprecated
70 70
 	 */
71
-	const zip_question_id=9;
71
+	const zip_question_id = 9;
72 72
 
73 73
 
74 74
 	/**
75 75
 	 * @deprecated
76 76
 	 */
77
-	const phone_question_id=10;
77
+	const phone_question_id = 10;
78 78
 
79 79
 	/**
80 80
 	 * When looking for questions that correspond to attendee fields,
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * @access protected
120 120
 	 * @param null $timezone
121 121
 	 */
122
-	protected function __construct( $timezone = NULL ) {
123
-		$this->singular_item = __('Attendee','event_espresso');
124
-		$this->plural_item = __('Attendees','event_espresso');
122
+	protected function __construct($timezone = NULL) {
123
+		$this->singular_item = __('Attendee', 'event_espresso');
124
+		$this->plural_item = __('Attendees', 'event_espresso');
125 125
 		$this->_tables = array(
126 126
 			'Attendee_CPT'=> new EE_Primary_Table('posts', 'ID'),
127 127
 			'Attendee_Meta'=>new EE_Secondary_Table('esp_attendee_meta', 'ATTM_ID', 'ATT_ID')
@@ -135,36 +135,36 @@  discard block
 block discarded – undo
135 135
 				'ATT_created'=>new EE_Datetime_Field('post_date', __("Time Attendee Created", "event_espresso"), false, time()),
136 136
 				'ATT_short_bio'=>new EE_Simple_HTML_Field('post_excerpt', __("Attendee Short Biography", "event_espresso"), true, __("No Biography Provided", "event_espresso")),
137 137
 				'ATT_modified'=>new EE_Datetime_Field('post_modified', __("Time Attendee Last Modified", "event_espresso"), FALSE, time()),
138
-				'ATT_author'=>new EE_WP_User_Field('post_author', __("Creator ID of the first Event attended", "event_espresso"), false ),
138
+				'ATT_author'=>new EE_WP_User_Field('post_author', __("Creator ID of the first Event attended", "event_espresso"), false),
139 139
 				'ATT_parent'=>new EE_DB_Only_Int_Field('post_parent', __("Parent Attendee (unused)", "event_espresso"), false, 0),
140
-				'post_type'=>new EE_WP_Post_Type_Field('espresso_attendees'),// EE_DB_Only_Text_Field('post_type', __("Post Type of Attendee", "event_espresso"), false,'espresso_attendees'),
140
+				'post_type'=>new EE_WP_Post_Type_Field('espresso_attendees'), // EE_DB_Only_Text_Field('post_type', __("Post Type of Attendee", "event_espresso"), false,'espresso_attendees'),
141 141
 				'status' => new EE_WP_Post_Status_Field('post_status', __('Attendee Status', 'event_espresso'), false, 'publish')
142 142
 			),
143 143
 			'Attendee_Meta'=>array(
144
-				'ATTM_ID'=> new EE_DB_Only_Int_Field('ATTM_ID', __('Attendee Meta Row ID','event_espresso'), false),
144
+				'ATTM_ID'=> new EE_DB_Only_Int_Field('ATTM_ID', __('Attendee Meta Row ID', 'event_espresso'), false),
145 145
 				'ATT_ID_fk'=>new EE_DB_Only_Int_Field('ATT_ID', __("Foreign Key to Attendee in Post Table", "event_espresso"), false),
146
-				'ATT_fname'=>new EE_Plain_Text_Field('ATT_fname', __('First Name','event_espresso'), true, ''),
147
-				'ATT_lname'=>new EE_Plain_Text_Field('ATT_lname', __('Last Name','event_espresso'), true, ''),
148
-				'ATT_address'=>new EE_Plain_Text_Field('ATT_address', __('Address Part 1','event_espresso'), true, ''),
149
-				'ATT_address2'=>new EE_Plain_Text_Field('ATT_address2', __('Address Part 2','event_espresso'), true, ''),
150
-				'ATT_city'=>new EE_Plain_Text_Field('ATT_city', __('City','event_espresso'), true, ''),
151
-				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __('State','event_espresso'), true,0,'State'),
152
-				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __('Country','event_espresso'), true,'','Country'),
153
-				'ATT_zip'=>new EE_Plain_Text_Field('ATT_zip', __('ZIP/Postal Code','event_espresso'), true, ''),
154
-				'ATT_email'=>new EE_Email_Field('ATT_email', __('Email Address','event_espresso'), true, ''),
155
-				'ATT_phone'=>new EE_Plain_Text_Field('ATT_phone', __('Phone','event_espresso'), true, '')
146
+				'ATT_fname'=>new EE_Plain_Text_Field('ATT_fname', __('First Name', 'event_espresso'), true, ''),
147
+				'ATT_lname'=>new EE_Plain_Text_Field('ATT_lname', __('Last Name', 'event_espresso'), true, ''),
148
+				'ATT_address'=>new EE_Plain_Text_Field('ATT_address', __('Address Part 1', 'event_espresso'), true, ''),
149
+				'ATT_address2'=>new EE_Plain_Text_Field('ATT_address2', __('Address Part 2', 'event_espresso'), true, ''),
150
+				'ATT_city'=>new EE_Plain_Text_Field('ATT_city', __('City', 'event_espresso'), true, ''),
151
+				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __('State', 'event_espresso'), true, 0, 'State'),
152
+				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __('Country', 'event_espresso'), true, '', 'Country'),
153
+				'ATT_zip'=>new EE_Plain_Text_Field('ATT_zip', __('ZIP/Postal Code', 'event_espresso'), true, ''),
154
+				'ATT_email'=>new EE_Email_Field('ATT_email', __('Email Address', 'event_espresso'), true, ''),
155
+				'ATT_phone'=>new EE_Plain_Text_Field('ATT_phone', __('Phone', 'event_espresso'), true, '')
156 156
 			));
157 157
 		$this->_model_relations = array(
158 158
 			'Registration'=>new EE_Has_Many_Relation(),
159 159
 			'State'=>new EE_Belongs_To_Relation(),
160 160
 			'Country'=>new EE_Belongs_To_Relation(),
161
-			'Event'=>new EE_HABTM_Relation('Registration', FALSE ),
161
+			'Event'=>new EE_HABTM_Relation('Registration', FALSE),
162 162
 			'WP_User' => new EE_Belongs_To_Relation(),
163 163
 		);
164 164
 		require_once('strategies/EE_CPT_Where_Conditions.strategy.php');
165 165
 		$this->_default_where_conditions_strategy = new EE_CPT_Where_Conditions('espresso_attendees', 'ATTM_ID');
166 166
 		$this->_caps_slug = 'contacts';
167
-		parent::__construct( $timezone );
167
+		parent::__construct($timezone);
168 168
 
169 169
 	}
170 170
 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	 * @param string $system_question_string
175 175
 	 * @return string|null if not found
176 176
 	 */
177
-	public function get_attendee_field_for_system_question( $system_question_string ) {
178
-		return isset( $this->_system_question_to_attendee_field_name[ $system_question_string ] ) ? $this->_system_question_to_attendee_field_name[ $system_question_string ] : null;
177
+	public function get_attendee_field_for_system_question($system_question_string) {
178
+		return isset($this->_system_question_to_attendee_field_name[$system_question_string]) ? $this->_system_question_to_attendee_field_name[$system_question_string] : null;
179 179
 	}
180 180
 
181 181
 
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 	 * @param EE_Transaction/int $transaction_id_or_obj EE_Transaction or its ID
187 187
 	 * @return EE_Attendee[]
188 188
 	 */
189
-	public function get_attendees_for_transaction( $transaction_id_or_obj ){
190
-		return $this->get_all( array( array(
189
+	public function get_attendees_for_transaction($transaction_id_or_obj) {
190
+		return $this->get_all(array(array(
191 191
 			  'Registration.Transaction.TXN_ID' => $transaction_id_or_obj instanceof EE_Transaction ? $transaction_id_or_obj->ID() : $transaction_id_or_obj
192 192
 		  )));
193 193
 	}
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
 	*		@return 		mixed		array on success, FALSE on fail
203 203
 	 * 		@deprecated
204 204
 	*/
205
-	public function get_attendee_by_ID( $ATT_ID = FALSE ) {
205
+	public function get_attendee_by_ID($ATT_ID = FALSE) {
206 206
 		// retrieve a particular EE_Attendee
207
-		return $this->get_one_by_ID( $ATT_ID );
207
+		return $this->get_one_by_ID($ATT_ID);
208 208
 	}
209 209
 
210 210
 
@@ -217,14 +217,14 @@  discard block
 block discarded – undo
217 217
 	* 		@param		array $where_cols_n_values
218 218
 	*		@return 		mixed		array on success, FALSE on fail
219 219
 	*/
220
-	public function get_attendee( $where_cols_n_values = array() ) {
220
+	public function get_attendee($where_cols_n_values = array()) {
221 221
 
222
-		if ( empty( $where_cols_n_values )) {
222
+		if (empty($where_cols_n_values)) {
223 223
 			return FALSE;
224 224
 		}
225
-		$attendee = $this->get_all( array($where_cols_n_values ));
226
-		if ( ! empty( $attendee )) {
227
-			return array_shift( $attendee );
225
+		$attendee = $this->get_all(array($where_cols_n_values));
226
+		if ( ! empty($attendee)) {
227
+			return array_shift($attendee);
228 228
 		} else {
229 229
 			return FALSE;
230 230
 		}
@@ -240,20 +240,20 @@  discard block
 block discarded – undo
240 240
 	 * @param array $where_cols_n_values
241 241
 	 * @return bool|mixed
242 242
 	 */
243
-	public function find_existing_attendee( $where_cols_n_values = NULL ) {
243
+	public function find_existing_attendee($where_cols_n_values = NULL) {
244 244
 		// search by combo of first and last names plus the email address
245
-		$attendee_data_keys = array( 'ATT_fname' => $this->_ATT_fname, 'ATT_lname' => $this->_ATT_lname, 'ATT_email' => $this->_ATT_email );
245
+		$attendee_data_keys = array('ATT_fname' => $this->_ATT_fname, 'ATT_lname' => $this->_ATT_lname, 'ATT_email' => $this->_ATT_email);
246 246
 		// no search params means attendee object already exists.
247
-		$where_cols_n_values = is_array( $where_cols_n_values ) && ! empty( $where_cols_n_values ) ? $where_cols_n_values : $attendee_data_keys;
247
+		$where_cols_n_values = is_array($where_cols_n_values) && ! empty($where_cols_n_values) ? $where_cols_n_values : $attendee_data_keys;
248 248
 		$valid_data = TRUE;
249 249
 		// check for required values
250
-		$valid_data = isset( $where_cols_n_values['ATT_fname'] ) && ! empty( $where_cols_n_values['ATT_fname'] ) ? $valid_data : FALSE;
251
-		$valid_data = isset( $where_cols_n_values['ATT_lname'] ) && ! empty( $where_cols_n_values['ATT_lname'] ) ? $valid_data : FALSE;
252
-		$valid_data = isset( $where_cols_n_values['ATT_email'] ) && ! empty( $where_cols_n_values['ATT_email'] ) ? $valid_data : FALSE;
250
+		$valid_data = isset($where_cols_n_values['ATT_fname']) && ! empty($where_cols_n_values['ATT_fname']) ? $valid_data : FALSE;
251
+		$valid_data = isset($where_cols_n_values['ATT_lname']) && ! empty($where_cols_n_values['ATT_lname']) ? $valid_data : FALSE;
252
+		$valid_data = isset($where_cols_n_values['ATT_email']) && ! empty($where_cols_n_values['ATT_email']) ? $valid_data : FALSE;
253 253
 
254
-		if ( $valid_data ) {
255
-			$attendee = $this->get_attendee( $where_cols_n_values );
256
-			if ( $attendee instanceof EE_Attendee ) {
254
+		if ($valid_data) {
255
+			$attendee = $this->get_attendee($where_cols_n_values);
256
+			if ($attendee instanceof EE_Attendee) {
257 257
 				return $attendee;
258 258
 			}
259 259
 		}
@@ -271,12 +271,12 @@  discard block
 block discarded – undo
271 271
              * @param  array $ids array of EE_Registration ids
272 272
              * @return  EE_Attendee[]
273 273
              */
274
-            public function get_array_of_contacts_from_reg_ids( $ids ) {
274
+            public function get_array_of_contacts_from_reg_ids($ids) {
275 275
                 $ids = (array) $ids;
276 276
                 $_where = array(
277
-                    'Registration.REG_ID' => array( 'in', $ids )
277
+                    'Registration.REG_ID' => array('in', $ids)
278 278
                     );
279
-                return $this->get_all( array( $_where ) );
279
+                return $this->get_all(array($_where));
280 280
             }
281 281
 
282 282
 
Please login to merge, or discard this patch.
core/db_models/EEM_Change_Log.model.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param string $log_type !see the acceptable values of LOG_type in EEM__Change_Log::__construct
118 118
 	 * @param mixed $message array|string of the message you want to record
119 119
 	 * @param EE_Base_Class $related_model_obj
120
-	 * @return EE_Change_Log
120
+	 * @return EE_Attendee
121 121
 	 */
122 122
 	public function log($log_type,$message,$related_model_obj){
123 123
 		if($related_model_obj instanceof EE_Base_Class){
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	 * @param mixed $related_obj_id
146 146
 	 * @param string $related_obj_type
147 147
 	 * @throws EE_Error
148
-	 * @return EE_Change_Log
148
+	 * @return EE_Attendee
149 149
 	 */
150 150
 	public function gateway_log( $message, $related_obj_id, $related_obj_type ){
151 151
 		if( ! EE_Registry::instance()->is_model_name($related_obj_type)){
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EEM_Change_Log extends EEM_Base{
28
+class EEM_Change_Log extends EEM_Base {
29 29
 
30 30
 	/**
31 31
 	 * the related object was created log type
@@ -68,19 +68,19 @@  discard block
 block discarded – undo
68 68
 	 *	@access protected
69 69
 	 *	@return EEM_Change_Log
70 70
 	 */
71
-	protected function __construct( $timezone = null ){
71
+	protected function __construct($timezone = null) {
72 72
 		global $current_user;
73
-		$this->singular_item = __('Log','event_espresso');
74
-		$this->plural_item = __('Logs','event_espresso');
73
+		$this->singular_item = __('Log', 'event_espresso');
74
+		$this->plural_item = __('Logs', 'event_espresso');
75 75
 		$this->_tables = array(
76 76
 			'Log'=> new EE_Primary_Table('esp_log', 'LOG_ID')
77 77
 		);
78 78
 		$models_this_can_attach_to = array_keys(EE_Registry::instance()->non_abstract_db_models);
79 79
 		$this->_fields = array(
80 80
 			'Log'=>array(
81
-				'LOG_ID'=> new EE_Primary_Key_Int_Field('LOG_ID', __('Log ID','event_espresso')),
81
+				'LOG_ID'=> new EE_Primary_Key_Int_Field('LOG_ID', __('Log ID', 'event_espresso')),
82 82
 				'LOG_time'=>new EE_Datetime_Field('LOG_time', __("Log Time", 'event_espresso'), false, time()),
83
-				'OBJ_ID'=>new EE_Foreign_Key_String_Field('OBJ_ID', __("Object ID (int or string)", 'event_espresso'), true, NULL,$models_this_can_attach_to),
83
+				'OBJ_ID'=>new EE_Foreign_Key_String_Field('OBJ_ID', __("Object ID (int or string)", 'event_espresso'), true, NULL, $models_this_can_attach_to),
84 84
 				'OBJ_type'=>new EE_Any_Foreign_Model_Name_Field('OBJ_type', __("Object Type", 'event_espresso'), true, NULL, $models_this_can_attach_to),
85 85
 				'LOG_type'=>new EE_Enum_Text_Field('LOG_type', __("Type of log entry", "event_espresso"), false, self::type_debug,
86 86
 						array(
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
 							self::type_gateway=> __("Gateway Interaction (IPN or Direct Payment)", 'event_espresso'),
93 93
 							)),
94 94
 				'LOG_message'=>new EE_Maybe_Serialized_Text_Field('LOG_message', __("Log Message (body)", 'event_espresso'), true),
95
-				'LOG_wp_user' => new EE_WP_User_Field('LOG_wp_user', __("User who was logged in while this occurred", 'event_espresso'), true ),
95
+				'LOG_wp_user' => new EE_WP_User_Field('LOG_wp_user', __("User who was logged in while this occurred", 'event_espresso'), true),
96 96
 
97 97
 			));
98 98
 		$this->_model_relations = array();
99
-		foreach($models_this_can_attach_to as $model){
100
-			if( $model == 'WP_User' ){
101
-				$this->_model_relations[ $model ] = new EE_Belongs_To_Relation();
102
-			}elseif( $model != 'Change_Log' ) {
99
+		foreach ($models_this_can_attach_to as $model) {
100
+			if ($model == 'WP_User') {
101
+				$this->_model_relations[$model] = new EE_Belongs_To_Relation();
102
+			}elseif ($model != 'Change_Log') {
103 103
 				$this->_model_relations[$model] = new EE_Belongs_To_Any_Relation();
104 104
 			}
105 105
 		}
106 106
 		//use completely custom caps for this
107 107
 		$this->_cap_restriction_generators = false;
108 108
 		//caps-wise this is all-or-nothing: if you have the default role you can access anything, otherwise nothing
109
-		foreach( $this->_cap_contexts_to_cap_action_map as $cap_context => $action ) {
110
-			$this->_cap_restrictions[ $cap_context ][ EE_Restriction_Generator_Base::get_default_restrictions_cap() ] = new EE_Return_None_Where_Conditions();
109
+		foreach ($this->_cap_contexts_to_cap_action_map as $cap_context => $action) {
110
+			$this->_cap_restrictions[$cap_context][EE_Restriction_Generator_Base::get_default_restrictions_cap()] = new EE_Return_None_Where_Conditions();
111 111
 		}
112
-		parent::__construct( $timezone );
112
+		parent::__construct($timezone);
113 113
 	}
114 114
 
115 115
 	/**
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 	 * @param EE_Base_Class $related_model_obj
120 120
 	 * @return EE_Change_Log
121 121
 	 */
122
-	public function log($log_type,$message,$related_model_obj){
123
-		if($related_model_obj instanceof EE_Base_Class){
122
+	public function log($log_type, $message, $related_model_obj) {
123
+		if ($related_model_obj instanceof EE_Base_Class) {
124 124
 			$obj_id = $related_model_obj->ID();
125 125
 			$obj_type = $related_model_obj->get_model()->get_this_model_name();
126
-		}else{
126
+		} else {
127 127
 			$obj_id = NULL;
128 128
 			$obj_type = NULL;
129 129
 		}
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 	 * @throws EE_Error
148 148
 	 * @return EE_Change_Log
149 149
 	 */
150
-	public function gateway_log( $message, $related_obj_id, $related_obj_type ){
151
-		if( ! EE_Registry::instance()->is_model_name($related_obj_type)){
152
-			throw new EE_Error(sprintf(__("'%s' is not a model name. A model name must be provided when making a gateway log. Eg, 'Payment', 'Payment_Method', etc", "event_espresso"),$related_obj_type));
150
+	public function gateway_log($message, $related_obj_id, $related_obj_type) {
151
+		if ( ! EE_Registry::instance()->is_model_name($related_obj_type)) {
152
+			throw new EE_Error(sprintf(__("'%s' is not a model name. A model name must be provided when making a gateway log. Eg, 'Payment', 'Payment_Method', etc", "event_espresso"), $related_obj_type));
153 153
 		}
154 154
 		$log = EE_Change_Log::new_instance(array(
155 155
 				'LOG_type'=>EEM_Change_Log::type_gateway,
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @param array $query_params @see EEM_Base::get_all
169 169
 	 * @return array of arrays
170 170
 	 */
171
-	public function get_all_efficiently($query_params){
171
+	public function get_all_efficiently($query_params) {
172 172
 		return $this->_get_all_wpdb_results($query_params);
173 173
 	}
174 174
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -99,7 +100,7 @@  discard block
 block discarded – undo
99 100
 		foreach($models_this_can_attach_to as $model){
100 101
 			if( $model == 'WP_User' ){
101 102
 				$this->_model_relations[ $model ] = new EE_Belongs_To_Relation();
102
-			}elseif( $model != 'Change_Log' ) {
103
+			} elseif( $model != 'Change_Log' ) {
103 104
 				$this->_model_relations[$model] = new EE_Belongs_To_Any_Relation();
104 105
 			}
105 106
 		}
@@ -123,7 +124,7 @@  discard block
 block discarded – undo
123 124
 		if($related_model_obj instanceof EE_Base_Class){
124 125
 			$obj_id = $related_model_obj->ID();
125 126
 			$obj_type = $related_model_obj->get_model()->get_this_model_name();
126
-		}else{
127
+		} else{
127 128
 			$obj_id = NULL;
128 129
 			$obj_type = NULL;
129 130
 		}
Please login to merge, or discard this patch.