Completed
Branch BUG/10539/add-a11y-to-ticket-s... (796c93)
by
unknown
50:07 queued 39:57
created
core/db_classes/EE_Currency.class.php 3 patches
Spacing   +9 added lines, -9 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 EE_Currency extends EE_Base_Class{
28
+class EE_Currency extends EE_Base_Class {
29 29
 
30 30
 		/** Currency COde @var CUR_code*/ protected $_CUR_code = NULL;
31 31
 		/** Currency Name Singular @var CUR_single*/ protected $_CUR_single = NULL;
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 	 *                             		    date_format and the second value is the time format
44 44
 	 * @return EE_Attendee
45 45
 	 */
46
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
47
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
48
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
46
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
47
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
48
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
49 49
 	}
50 50
 
51 51
 
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 	 *                          		the website will be used.
57 57
 	 * @return EE_Attendee
58 58
 	 */
59
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
60
-		return new self( $props_n_values, TRUE, $timezone );
59
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
60
+		return new self($props_n_values, TRUE, $timezone);
61 61
 	}
62 62
 	/**
63 63
 	 * Gets code
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 	 * Gets a prettier name
160 160
 	 * @return string
161 161
 	 */
162
-	function name(){
163
-		return sprintf(__("%s (%s)", "event_espresso"),$this->code(),$this->plural_name());
162
+	function name() {
163
+		return sprintf(__("%s (%s)", "event_espresso"), $this->code(), $this->plural_name());
164 164
 	}
165 165
 
166 166
 }
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @param array $props_n_values  incoming values from the database
55 55
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
56 56
 	 *                          		the website will be used.
57
-	 * @return EE_Attendee
57
+	 * @return EE_Currency
58 58
 	 */
59 59
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
60 60
 		return new self( $props_n_values, TRUE, $timezone );
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 * Sets code
72 72
 	 * @param string $code
73
-	 * @return boolean
73
+	 * @return boolean|null
74 74
 	 */
75 75
 	function set_code($code) {
76 76
 		return $this->set('CUR_code', $code);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	/**
87 87
 	 * Sets active
88 88
 	 * @param boolean $active
89
-	 * @return boolean
89
+	 * @return boolean|null
90 90
 	 */
91 91
 	function set_active($active) {
92 92
 		return $this->set('CUR_active', $active);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	/**
103 103
 	 * Sets dec_plc
104 104
 	 * @param int $dec_plc
105
-	 * @return boolean
105
+	 * @return boolean|null
106 106
 	 */
107 107
 	function set_dec_plc($dec_plc) {
108 108
 		return $this->set('CUR_dec_plc', $dec_plc);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	/**
119 119
 	 * Sets plural
120 120
 	 * @param string $plural
121
-	 * @return boolean
121
+	 * @return boolean|null
122 122
 	 */
123 123
 	function set_plural_name($plural) {
124 124
 		return $this->set('CUR_plural', $plural);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	/**
135 135
 	 * Sets sign
136 136
 	 * @param string $sign
137
-	 * @return boolean
137
+	 * @return boolean|null
138 138
 	 */
139 139
 	function set_sign($sign) {
140 140
 		return $this->set('CUR_sign', $sign);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	/**
151 151
 	 * Sets single
152 152
 	 * @param string $single
153
-	 * @return boolean
153
+	 * @return boolean|null
154 154
 	 */
155 155
 	function set_singular_name($single) {
156 156
 		return $this->set('CUR_single', $single);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 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
Please login to merge, or discard this patch.
core/db_classes/EE_Price.class.php 3 patches
Spacing   +32 added lines, -32 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
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 *                             		    date_format and the second value is the time format
36 36
 	 * @return EE_Attendee
37 37
 	 */
38
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
39
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
40
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
38
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
39
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
40
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
41 41
 	}
42 42
 
43 43
 
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	 *                          		the website will be used.
49 49
 	 * @return EE_Attendee
50 50
 	 */
51
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
52
-		return new self( $props_n_values, TRUE, $timezone );
51
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
52
+		return new self($props_n_values, TRUE, $timezone);
53 53
 	}
54 54
 
55 55
 
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	 * @access        public
61 61
 	 * @param        int $PRT_ID
62 62
 	 */
63
-	public function set_type( $PRT_ID = 0 ) {
64
-		$this->set( 'PRT_ID', $PRT_ID );
63
+	public function set_type($PRT_ID = 0) {
64
+		$this->set('PRT_ID', $PRT_ID);
65 65
 	}
66 66
 
67 67
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	 * @access        public
73 73
 	 * @param        float $PRC_amount
74 74
 	 */
75
-	public function set_amount( $PRC_amount = 0.00 ) {
76
-		$this->set( 'PRC_amount', $PRC_amount );
75
+	public function set_amount($PRC_amount = 0.00) {
76
+		$this->set('PRC_amount', $PRC_amount);
77 77
 	}
78 78
 
79 79
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	 * @access        public
85 85
 	 * @param        string $PRC_name
86 86
 	 */
87
-	public function set_name( $PRC_name = '' ) {
88
-		$this->set( 'PRC_name', $PRC_name );
87
+	public function set_name($PRC_name = '') {
88
+		$this->set('PRC_name', $PRC_name);
89 89
 	}
90 90
 
91 91
 
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 	 * @access        public
97 97
 	 * @param        string $PRC_desc
98 98
 	 */
99
-	public function set_description( $PRC_desc = '' ) {
100
-		$this->Set( 'PRC_desc', $PRC_desc );
99
+	public function set_description($PRC_desc = '') {
100
+		$this->Set('PRC_desc', $PRC_desc);
101 101
 	}
102 102
 
103 103
 
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 	* 		@access		public
109 109
 	*		@param		bool		$PRC_is_default
110 110
 	*/
111
-	public function set_is_default( $PRC_is_default = FALSE ) {
112
-		$this->set( 'PRC_is_default', $PRC_is_default );
111
+	public function set_is_default($PRC_is_default = FALSE) {
112
+		$this->set('PRC_is_default', $PRC_is_default);
113 113
 	}
114 114
 
115 115
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 	* 		@access		public
121 121
 	*		@param		bool		$PRC_deleted
122 122
 	*/
123
-	public function set_deleted( $PRC_deleted = NULL ) {
124
-		$this->set( 'PRC_deleted', $PRC_deleted );
123
+	public function set_deleted($PRC_deleted = NULL) {
124
+		$this->set('PRC_deleted', $PRC_deleted);
125 125
 	}
126 126
 
127 127
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * @return        int
133 133
 	 */
134 134
 	public function type() {
135
-		return $this->get( 'PRT_ID' );
135
+		return $this->get('PRT_ID');
136 136
 	}
137 137
 
138 138
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return        float
144 144
 	 */
145 145
 	public function amount() {
146
-		return $this->get( 'PRC_amount' );
146
+		return $this->get('PRC_amount');
147 147
 	}
148 148
 
149 149
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * @return        string
155 155
 	 */
156 156
 	public function name() {
157
-		return $this->get( 'PRC_name' );
157
+		return $this->get('PRC_name');
158 158
 	}
159 159
 
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @return        string
166 166
 	 */
167 167
 	public function desc() {
168
-		return $this->get( 'PRC_desc' );
168
+		return $this->get('PRC_desc');
169 169
 	}
170 170
 
171 171
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @return        int
177 177
 	 */
178 178
 	public function overrides() {
179
-		return $this->get( 'PRC_overrides' );
179
+		return $this->get('PRC_overrides');
180 180
 	}
181 181
 
182 182
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @return        int
188 188
 	 */
189 189
 	public function order() {
190
-		return $this->get( 'PRC_order' );
190
+		return $this->get('PRC_order');
191 191
 	}
192 192
 
193 193
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @return        bool
212 212
 	 */
213 213
 	public function is_default() {
214
-		return $this->get( 'PRC_is_default' );
214
+		return $this->get('PRC_is_default');
215 215
 	}
216 216
 
217 217
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * @return        bool
223 223
 	 */
224 224
 	public function deleted() {
225
-		return $this->get( 'PRC_deleted' );
225
+		return $this->get('PRC_deleted');
226 226
 	}
227 227
 
228 228
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	 * @return bool
232 232
 	 */
233 233
 	public function parent() {
234
-		return $this->get( 'PRC_parent' );
234
+		return $this->get('PRC_parent');
235 235
 	}
236 236
 
237 237
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 	 * @return EE_Price_Type
254 254
 	 */
255 255
 	public function type_obj() {
256
-		return $this->get_first_related( 'Price_Type' );
256
+		return $this->get_first_related('Price_Type');
257 257
 	}
258 258
 
259 259
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 	 */
276 276
 	public function is_percent() {
277 277
 		$price_type = $this->type_obj();
278
-		return $price_type->get( 'PRT_is_percent' );
278
+		return $price_type->get('PRT_is_percent');
279 279
 	}
280 280
 
281 281
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * @return string
288 288
 	 */
289 289
 	public function pretty_price() {
290
-		return ! $this->is_percent() ? $this->get_pretty('PRC_amount') : $this->get('PRC_amount') . '%';
290
+		return ! $this->is_percent() ? $this->get_pretty('PRC_amount') : $this->get('PRC_amount').'%';
291 291
 	}
292 292
 
293 293
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 	 * @return mixed
297 297
 	 */
298 298
 	public function get_price_without_currency_symbol() {
299
-		return str_replace( EE_Registry::instance()->CFG->currency->sign, '', $this->get_pretty( 'PRC_amount' ) );
299
+		return str_replace(EE_Registry::instance()->CFG->currency->sign, '', $this->get_pretty('PRC_amount'));
300 300
 	}
301 301
 }
302 302
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 * @param array $props_n_values  incoming values from the database
47 47
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
48 48
 	 *                          		the website will be used.
49
-	 * @return EE_Attendee
49
+	 * @return EE_Price
50 50
 	 */
51 51
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
52 52
 		return new self( $props_n_values, TRUE, $timezone );
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 
104 104
 
105 105
 	/**
106
-	*		set is_default
107
-	*
108
-	* 		@access		public
109
-	*		@param		bool		$PRC_is_default
110
-	*/
106
+	 *		set is_default
107
+	 *
108
+	 * 		@access		public
109
+	 *		@param		bool		$PRC_is_default
110
+	 */
111 111
 	public function set_is_default( $PRC_is_default = FALSE ) {
112 112
 		$this->set( 'PRC_is_default', $PRC_is_default );
113 113
 	}
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
 
116 116
 
117 117
 	/**
118
-	*		set deleted
119
-	*
120
-	* 		@access		public
121
-	*		@param		bool		$PRC_deleted
122
-	*/
118
+	 *		set deleted
119
+	 *
120
+	 * 		@access		public
121
+	 *		@param		bool		$PRC_deleted
122
+	 */
123 123
 	public function set_deleted( $PRC_deleted = NULL ) {
124 124
 		$this->set( 'PRC_deleted', $PRC_deleted );
125 125
 	}
Please login to merge, or discard this patch.
core/db_classes/EE_Question_Option.class.php 2 patches
Spacing   +28 added lines, -28 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
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 *                             		    date_format and the second value is the time format
46 46
 	 * @return EE_Attendee
47 47
 	 */
48
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
49
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
50
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
48
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
49
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
50
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
51 51
 	}
52 52
 
53 53
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 *                          		the website will be used.
59 59
 	 * @return EE_Attendee
60 60
 	 */
61
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
62
-		return new self( $props_n_values, TRUE, $timezone );
61
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
62
+		return new self($props_n_values, TRUE, $timezone);
63 63
 	}
64 64
 
65 65
 
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 	 * @param string $value
70 70
 	 * @return bool success
71 71
 	 */
72
-	public function set_value( $value ) {
73
-		$this->set( 'QSO_value', $value );
72
+	public function set_value($value) {
73
+		$this->set('QSO_value', $value);
74 74
 	}
75 75
 
76 76
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @param string $text
81 81
 	 * @return bool success
82 82
 	 */
83
-	public function set_desc( $text ) {
84
-		$this->set( 'QSO_desc', $text );
83
+	public function set_desc($text) {
84
+		$this->set('QSO_desc', $text);
85 85
 	}
86 86
 
87 87
 
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 	 * @param integer $order
94 94
 	 * @return bool      $success
95 95
 	 */
96
-	public function set_order( $order ) {
97
-		$this->set( 'QSO_order', $order );
96
+	public function set_order($order) {
97
+		$this->set('QSO_order', $order);
98 98
 	}
99 99
 
100 100
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 	 * @param int $question_ID
105 105
 	 * @return bool success
106 106
 	 */
107
-	public function set_question_ID( $question_ID ) {
108
-		$this->set( 'QST_ID', $question_ID );
107
+	public function set_question_ID($question_ID) {
108
+		$this->set('QST_ID', $question_ID);
109 109
 	}
110 110
 
111 111
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * @param string $text
116 116
 	 * @return bool success
117 117
 	 */
118
-	public function set_opt_group( $text ) {
118
+	public function set_opt_group($text) {
119 119
 		return $this->_QSO_opt_group = $text;
120 120
 	}
121 121
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	 * @return string
127 127
 	 */
128 128
 	public function value() {
129
-		return $this->get( 'QSO_value' );
129
+		return $this->get('QSO_value');
130 130
 	}
131 131
 
132 132
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 * @return string
137 137
 	 */
138 138
 	public function desc() {
139
-		return $this->get( 'QSO_desc' );
139
+		return $this->get('QSO_desc');
140 140
 	}
141 141
 
142 142
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return boolean
147 147
 	 */
148 148
 	public function deleted() {
149
-		return $this->get( 'QSO_deleted' );
149
+		return $this->get('QSO_deleted');
150 150
 	}
151 151
 
152 152
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 * @return integer
159 159
 	 */
160 160
 	public function order() {
161
-		return $this->get( 'QSO_option' );
161
+		return $this->get('QSO_option');
162 162
 	}
163 163
 
164 164
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 * @return int
169 169
 	 */
170 170
 	public function question_ID() {
171
-		return $this->get( 'QST_ID' );
171
+		return $this->get('QST_ID');
172 172
 	}
173 173
 
174 174
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 * @return EE_Question
179 179
 	 */
180 180
 	public function question() {
181
-		return $this->get_first_related( 'Question' );
181
+		return $this->get_first_related('Question');
182 182
 	}
183 183
 
184 184
 
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
 	 * @param array $options {
198 198
 	 *	@type int $QST_ID the QST_ID attribute of this question option, otherwise it will be for the same question as the original
199 199
 	 */
200
-	public function duplicate( $options = array() ) {
200
+	public function duplicate($options = array()) {
201 201
 		$new_question_option = clone $this;
202
-		$new_question_option->set( 'QSO_ID', null );
203
-		if( array_key_exists( 'QST_ID', $options ) ) {//use array_key_exists instead of isset because NULL might be a valid value
204
-			$new_question_option->set_question_ID( $options[ 'QST_ID' ] );
202
+		$new_question_option->set('QSO_ID', null);
203
+		if (array_key_exists('QST_ID', $options)) {//use array_key_exists instead of isset because NULL might be a valid value
204
+			$new_question_option->set_question_ID($options['QST_ID']);
205 205
 		}
206 206
 		$new_question_option->save();
207 207
 	}
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
 	 * @param string $QSO_system
220 220
 	 * @return bool
221 221
 	 */
222
-	public function set_system( $QSO_system ) {
223
-		return $this->set( 'QSO_system', $QSO_system );
222
+	public function set_system($QSO_system) {
223
+		return $this->set('QSO_system', $QSO_system);
224 224
 	}
225 225
 }
226 226
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @param array $props_n_values  incoming values from the database
57 57
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
58 58
 	 *                          		the website will be used.
59
-	 * @return EE_Attendee
59
+	 * @return EE_Question_Option
60 60
 	 */
61 61
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
62 62
 		return new self( $props_n_values, TRUE, $timezone );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	/**
68 68
 	 * Sets the option's key value
69 69
 	 * @param string $value
70
-	 * @return bool success
70
+	 * @return boolean|null success
71 71
 	 */
72 72
 	public function set_value( $value ) {
73 73
 		$this->set( 'QSO_value', $value );
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * Sets the option's Display Text
80 80
 	 * @param string $text
81
-	 * @return bool success
81
+	 * @return boolean|null success
82 82
 	 */
83 83
 	public function set_desc( $text ) {
84 84
 		$this->set( 'QSO_desc', $text );
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @access public
93 93
 	 * @param integer $order
94
-	 * @return bool      $success
94
+	 * @return boolean|null      $success
95 95
 	 */
96 96
 	public function set_order( $order ) {
97 97
 		$this->set( 'QSO_order', $order );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	/**
103 103
 	 * Sets the ID of the related question
104 104
 	 * @param int $question_ID
105
-	 * @return bool success
105
+	 * @return boolean|null success
106 106
 	 */
107 107
 	public function set_question_ID( $question_ID ) {
108 108
 		$this->set( 'QST_ID', $question_ID );
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	/**
114 114
 	 * Sets the option's opt_group
115 115
 	 * @param string $text
116
-	 * @return bool success
116
+	 * @return string success
117 117
 	 */
118 118
 	public function set_opt_group( $text ) {
119 119
 		return $this->_QSO_opt_group = $text;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	/**
218 218
 	 * Sets QSO_system
219 219
 	 * @param string $QSO_system
220
-	 * @return bool
220
+	 * @return boolean|null
221 221
 	 */
222 222
 	public function set_system( $QSO_system ) {
223 223
 		return $this->set( 'QSO_system', $QSO_system );
Please login to merge, or discard this patch.
core/db_classes/EE_Registration_Payment.class.php 1 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 = '', $date_formats = array() ) {
23
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
24
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
22
+	public static function new_instance($props_n_values = array(), $timezone = '', $date_formats = array()) {
23
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
24
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
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_Ticket_Price.class.php 1 patch
Spacing   +7 added lines, -7 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
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @param string $timezone
36 36
 	 * @return EE_Ticket_Price|mixed
37 37
 	 */
38
-	public static function new_instance( $props_n_values = array(), $timezone = '', $date_formats = array() ) {
39
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
40
-		return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone, $date_formats );
38
+	public static function new_instance($props_n_values = array(), $timezone = '', $date_formats = array()) {
39
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
40
+		return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone, $date_formats);
41 41
 	}
42 42
 
43 43
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param string $timezone
48 48
 	 * @return EE_Ticket_Price
49 49
 	 */
50
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) {
51
-		return new self( $props_n_values, TRUE, $timezone );
50
+	public static function new_instance_from_db($props_n_values = array(), $timezone = '') {
51
+		return new self($props_n_values, TRUE, $timezone);
52 52
 	}
53 53
 
54 54
 
Please login to merge, or discard this patch.
core/db_models/strategies/EE_Default_Where_Conditions.strategy.php 2 patches
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
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  *
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @since		 	    4.6.0
16 16
  *
17 17
  */
18
-class EE_Default_Where_Conditions{
18
+class EE_Default_Where_Conditions {
19 19
 
20 20
 	/**
21 21
 	 * This const can be used in EE_Default_Where_Conditions values, and at the time of querying it will be
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * onto any field names
49 49
 	 * @param array $custom_where_conditions
50 50
 	 */
51
-	public function __construct( $custom_where_conditions = array() ) {
51
+	public function __construct($custom_where_conditions = array()) {
52 52
 		$this->_where_conditions_provided = $custom_where_conditions;
53 53
 	}
54 54
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * for querying of the model.
60 60
 	 * @param EEM_Base $model
61 61
 	 */
62
-	function _finalize_construct(EEM_Base $model){
62
+	function _finalize_construct(EEM_Base $model) {
63 63
 		$this->_model = $model;
64 64
 	}
65 65
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 	 * @param string $model_relation_chain
81 81
 	 * @return array like what's expected in EEM_Base::get_all()'s $query_params[0]
82 82
 	 */
83
-	function get_default_where_conditions( $model_relation_chain = '' ){
84
-		return $this->prepare_where_conditions_for_querying( array_merge( $this->_get_default_where_conditions(), $this->get_where_conditions_provided() ), $model_relation_chain );
83
+	function get_default_where_conditions($model_relation_chain = '') {
84
+		return $this->prepare_where_conditions_for_querying(array_merge($this->_get_default_where_conditions(), $this->get_where_conditions_provided()), $model_relation_chain);
85 85
 	}
86 86
 
87 87
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * Adding model relation chains is handled by the public method get_default_where_conditions
92 92
 	 * @return array
93 93
 	 */
94
-	protected function _get_default_where_conditions(){
94
+	protected function _get_default_where_conditions() {
95 95
 		return array();
96 96
 	}
97 97
 
@@ -105,36 +105,36 @@  discard block
 block discarded – undo
105 105
 	 * @return array
106 106
 	 * @throws \EE_Error
107 107
 	 */
108
-	public function prepare_where_conditions_for_querying( $where_conditions, $model_relation_chain ) {
108
+	public function prepare_where_conditions_for_querying($where_conditions, $model_relation_chain) {
109 109
 		$where_conditions_with_model_relation_chain_prefixes = array();
110
-		if ( ! is_array( $where_conditions ) ) {
110
+		if ( ! is_array($where_conditions)) {
111 111
 			$where_conditions = array();
112 112
 		}
113
-		foreach ( $where_conditions as $key => $value ) {
113
+		foreach ($where_conditions as $key => $value) {
114 114
 			if (
115
-				in_array( $key, array( 'OR', 'AND', 'NOT' ) )
116
-				|| strpos( $key, 'OR*' ) !== false
117
-				|| strpos( $key, 'AND*' ) !== false
118
-				|| strpos( $key, 'NOT*' ) !== false
115
+				in_array($key, array('OR', 'AND', 'NOT'))
116
+				|| strpos($key, 'OR*') !== false
117
+				|| strpos($key, 'AND*') !== false
118
+				|| strpos($key, 'NOT*') !== false
119 119
 			) {
120
-				$where_conditions_with_model_relation_chain_prefixes[ $key ] = $this->prepare_where_conditions_for_querying(
120
+				$where_conditions_with_model_relation_chain_prefixes[$key] = $this->prepare_where_conditions_for_querying(
121 121
 					$value,
122 122
 					$model_relation_chain
123 123
 				);
124 124
 			} else {
125 125
 				if (
126 126
 					$model_relation_chain != ''
127
-					&& $model_relation_chain[ strlen( $model_relation_chain ) - 1 ] != '.'
127
+					&& $model_relation_chain[strlen($model_relation_chain) - 1] != '.'
128 128
 				) {
129
-					$model_relation_chain = $model_relation_chain . ".";
129
+					$model_relation_chain = $model_relation_chain.".";
130 130
 				}
131 131
 				//check for the current user id place holder, and if present change it
132
-				if ( $value === self::current_user_placeholder ) {
132
+				if ($value === self::current_user_placeholder) {
133 133
 					$value = get_current_user_id();
134 134
 				}
135 135
 				//check for user field placeholder
136
-				if ( $key == self::user_field_name_placeholder ) {
137
-					if ( ! $this->_model->wp_user_field_name() ) {
136
+				if ($key == self::user_field_name_placeholder) {
137
+					if ( ! $this->_model->wp_user_field_name()) {
138 138
 						throw new EE_Error(
139 139
 							sprintf(
140 140
 								__(
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 					}
148 148
 					$key = $this->_model->wp_user_field_name();
149 149
 				}
150
-				$where_conditions_with_model_relation_chain_prefixes[ $model_relation_chain . $key ] = $value;
150
+				$where_conditions_with_model_relation_chain_prefixes[$model_relation_chain.$key] = $value;
151 151
 			}
152 152
 		}
153 153
 		return $where_conditions_with_model_relation_chain_prefixes;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 /**
6 6
  *
7 7
  * Class EE_Default_Where_Conditions
8
-  *
8
+ *
9 9
  * Strategy to be used for getting default where conditions for EEM_Base children.
10 10
  * Should be initialized and set on construction of model
11 11
  *
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Generated_From_Token.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 	 *                                                This is then used to populate the properties in here.
37 37
 	 * @param   EE_Message_Resource_Manager $message_resource_manager
38 38
 	 */
39
-	public function __construct( $token, $sending_messenger_slug = 'html', EE_Message_Resource_Manager $message_resource_manager ) {
39
+	public function __construct($token, $sending_messenger_slug = 'html', EE_Message_Resource_Manager $message_resource_manager) {
40 40
 		$this->token = $token;
41
-		$this->_sending_messenger = $this->_set_sending_messenger( $sending_messenger_slug, $message_resource_manager );
41
+		$this->_sending_messenger = $this->_set_sending_messenger($sending_messenger_slug, $message_resource_manager);
42 42
 		$this->_message = $this->_generate_message();
43 43
 		//set params for parent from the message object
44 44
 		parent::__construct(
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		$sending_messenger_slug,
62 62
 		EE_Message_Resource_Manager $message_resource_manager
63 63
 	) {
64
-		$sending_messenger = $message_resource_manager->get_active_messenger( $sending_messenger_slug );
64
+		$sending_messenger = $message_resource_manager->get_active_messenger($sending_messenger_slug);
65 65
 		return $sending_messenger instanceof EE_messenger ? $sending_messenger : $sending_messenger_slug;
66 66
 	}
67 67
 
@@ -83,27 +83,27 @@  discard block
 block discarded – undo
83 83
 	 * @return EE_Message
84 84
 	 * @throws \EE_Error
85 85
 	 */
86
-	protected function _generate_message( $properties = array() ) {
86
+	protected function _generate_message($properties = array()) {
87 87
 		// a message was generated immediately but the parent class will call this again
88
-		if ( $this->_message instanceof EE_Message ) {
88
+		if ($this->_message instanceof EE_Message) {
89 89
 			return $this->_message;
90 90
 		}
91
-		$message = EEM_Message::instance()->get_one_by_token( $this->token );
92
-		if ( ! $message instanceof EE_Message ) {
91
+		$message = EEM_Message::instance()->get_one_by_token($this->token);
92
+		if ( ! $message instanceof EE_Message) {
93 93
 			throw new EE_Error(
94 94
 				sprintf(
95
-					__( 'Unable to retrieve generated message from DB using given token: "%1$s"', 'event_espresso' ),
95
+					__('Unable to retrieve generated message from DB using given token: "%1$s"', 'event_espresso'),
96 96
 					$this->token
97 97
 				)
98 98
 			);
99 99
 		}
100
-		$message->set_STS_ID( EEM_Message::status_idle );
100
+		$message->set_STS_ID(EEM_Message::status_idle);
101 101
 
102
-		if ( ! $this->_sending_messenger instanceof EE_messenger ) {
103
-			$message->set_STS_ID( EEM_Message::status_failed );
102
+		if ( ! $this->_sending_messenger instanceof EE_messenger) {
103
+			$message->set_STS_ID(EEM_Message::status_failed);
104 104
 			$message->set_error_message(
105 105
 				sprintf(
106
-					__( 'Unable to send message because the "%1$s" messenger is not active or not installed', 'event_espresso' ),
106
+					__('Unable to send message because the "%1$s" messenger is not active or not installed', 'event_espresso'),
107 107
 					$this->_sending_messenger
108 108
 				)
109 109
 			);
Please login to merge, or discard this patch.
core/libraries/messages/EE_Message_Type_Collection_Loader.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 	 *
32 32
 	 * @param EE_Message_Type_Collection $message_types
33 33
 	 */
34
-	public function __construct( EE_Message_Type_Collection $message_types ) {
35
-		$this->set_message_type_collection( $message_types );
34
+	public function __construct(EE_Message_Type_Collection $message_types) {
35
+		$this->set_message_type_collection($message_types);
36 36
 	}
37 37
 
38 38
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	/**
50 50
 	 * @param mixed $message_types
51 51
 	 */
52
-	public function set_message_type_collection( EE_Message_Type_Collection $message_types ) {
52
+	public function set_message_type_collection(EE_Message_Type_Collection $message_types) {
53 53
 		$this->_message_type_collection = $message_types;
54 54
 	}
55 55
 
@@ -62,41 +62,41 @@  discard block
 block discarded – undo
62 62
 	 * @param  string $folder
63 63
 	 * @throws \EE_Error
64 64
 	 */
65
-	public function load_message_types_from_folder( $folder = '' ) {
65
+	public function load_message_types_from_folder($folder = '') {
66 66
 		//make sure autoloaders are set (fail-safe)
67 67
 		EED_Messages::set_autoloaders();
68
-		$folder = ! empty( $folder ) ? $folder : EE_LIBRARIES . 'messages' . DS . 'message_type';
69
-		$folder .= $folder[ strlen( $folder ) - 1 ] != DS ? DS : '';
68
+		$folder = ! empty($folder) ? $folder : EE_LIBRARIES.'messages'.DS.'message_type';
69
+		$folder .= $folder[strlen($folder) - 1] != DS ? DS : '';
70 70
 		// get all the files in that folder that end in ".class.php
71 71
 		$filepaths = apply_filters(
72 72
 			'FHEE__EE_messages__get_installed__messagetype_files',
73
-			glob( $folder . '*.class.php' )
73
+			glob($folder.'*.class.php')
74 74
 		);
75
-		if ( empty( $filepaths ) ) {
75
+		if (empty($filepaths)) {
76 76
 			return;
77 77
 		}
78
-		foreach ( (array) $filepaths as $file_path ) {
78
+		foreach ((array) $filepaths as $file_path) {
79 79
 			// extract filename from path
80
-			$file_path = basename( $file_path );
80
+			$file_path = basename($file_path);
81 81
 			// now remove any file extensions
82
-			$message_type_class_name = substr( $file_path, 0, strpos( $file_path, '.' ) );
82
+			$message_type_class_name = substr($file_path, 0, strpos($file_path, '.'));
83 83
 
84 84
 			//if this class name doesn't represent a message type class, then we just skip.
85
-			if ( strpos( strtolower( $message_type_class_name ), 'message_type' ) === false ) {
85
+			if (strpos(strtolower($message_type_class_name), 'message_type') === false) {
86 86
 				continue;
87 87
 			}
88 88
 
89
-			if ( ! class_exists( $message_type_class_name ) ) {
89
+			if ( ! class_exists($message_type_class_name)) {
90 90
 				throw new EE_Error(
91 91
 					sprintf(
92
-						__( 'The "%1$s" message type class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso' ),
92
+						__('The "%1$s" message type class can\'t be loaded from %2$s. Likely there is a typo in the class name or the file name.', 'event_espresso'),
93 93
 						$message_type_class_name,
94 94
 						$file_path
95 95
 					)
96 96
 				);
97 97
 			}
98 98
 
99
-			$this->_load_message_type( new $message_type_class_name );
99
+			$this->_load_message_type(new $message_type_class_name);
100 100
 		}
101 101
 	}
102 102
 
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 	 * @param EE_message_type $message_type
107 107
 	 * @return bool
108 108
 	 */
109
-	protected function _load_message_type( EE_message_type $message_type ) {
110
-		if ( $this->message_type_collection()->has_by_name( $message_type->name ) ) {
109
+	protected function _load_message_type(EE_message_type $message_type) {
110
+		if ($this->message_type_collection()->has_by_name($message_type->name)) {
111 111
 			return true;
112 112
 		}
113 113
 		return $this->message_type_collection()->add(
Please login to merge, or discard this patch.
core/libraries/messages/EE_Messages_Base.lib.php 3 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
 	 * @access protected
185 185
 	 * @param string $messenger
186 186
 	 */
187
-	protected function _set_existing_admin_settings( $messenger = '' ) {
187
+	protected function _set_existing_admin_settings($messenger = '') {
188 188
 		/** @var EE_Message_Resource_Manager $Message_Resource_Manager */
189
-		$Message_Resource_Manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
189
+		$Message_Resource_Manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
190 190
 		$active_messengers = $Message_Resource_Manager->get_active_messengers_option();
191 191
 		$settings_to_use = $active_messengers;
192 192
 
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
 		 * This determines what will be used for the getting the settings.
195 195
 		 */
196 196
 		if (
197
-			! empty( $messenger )
198
-			&& $Message_Resource_Manager->is_message_type_active_for_messenger( $messenger, $this->name )
197
+			! empty($messenger)
198
+			&& $Message_Resource_Manager->is_message_type_active_for_messenger($messenger, $this->name)
199 199
 		) {
200
-			$settings_to_use = $active_messengers[ $messenger ]['settings'][ $messenger . '-message_types' ];
200
+			$settings_to_use = $active_messengers[$messenger]['settings'][$messenger.'-message_types'];
201 201
 		}
202 202
 
203
-		$this->_existing_admin_settings = isset( $settings_to_use[ $this->name ]['settings'] )
204
-			? $settings_to_use[ $this->name ]['settings']
203
+		$this->_existing_admin_settings = isset($settings_to_use[$this->name]['settings'])
204
+			? $settings_to_use[$this->name]['settings']
205 205
 			: null;
206 206
 	}
207 207
 
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
 	 * @param string $messenger
219 219
 	 * @return array          settings
220 220
 	 */
221
-	public function get_existing_admin_settings( $messenger = '' ) {
221
+	public function get_existing_admin_settings($messenger = '') {
222 222
 		// if admin_settings property empty lets try setting it.
223
-		if ( method_exists($this, '_set_existing_admin_settings') && empty( $this->_existing_admin_settings ) ) {
224
-			$this->_set_existing_admin_settings( $messenger );
223
+		if (method_exists($this, '_set_existing_admin_settings') && empty($this->_existing_admin_settings)) {
224
+			$this->_set_existing_admin_settings($messenger);
225 225
 		}
226
-		return property_exists( $this, '_existing_admin_settings' )
226
+		return property_exists($this, '_existing_admin_settings')
227 227
 			? $this->_existing_admin_settings
228 228
 			: null;
229 229
 	}
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
 	 */
240 240
 	public function get_valid_shortcodes() {
241 241
 		$valid_shortcodes = apply_filters(
242
-			'FHEE__' . get_class( $this ) . '__get_valid_shortcodes',
242
+			'FHEE__'.get_class($this).'__get_valid_shortcodes',
243 243
 			$this->_valid_shortcodes,
244 244
 			$this
245 245
 		);
246 246
 		//The below filter applies to ALL messengers and message types so use with care!
247
-		$valid_shortcodes = apply_filters( 'FHEE__EE_Messages_Base__get_valid_shortcodes', $valid_shortcodes, $this );
247
+		$valid_shortcodes = apply_filters('FHEE__EE_Messages_Base__get_valid_shortcodes', $valid_shortcodes, $this);
248 248
 		return $valid_shortcodes;
249 249
 	}
250 250
 
@@ -278,23 +278,23 @@  discard block
 block discarded – undo
278 278
 	 * @access protected
279 279
 	 * @return string $content for page.
280 280
 	 */
281
-	protected function _get_admin_page_content( $page, $action, $extra, $actives ) {
281
+	protected function _get_admin_page_content($page, $action, $extra, $actives) {
282 282
 		//we can also further refine the context by action (if present).
283
-		if ( !empty($action) ) {
284
-			$page = $page . '_' . $action;
283
+		if ( ! empty($action)) {
284
+			$page = $page.'_'.$action;
285 285
 		}
286 286
 
287
-		if ( !isset( $this->admin_registered_pages[$page]) ){
287
+		if ( ! isset($this->admin_registered_pages[$page])) {
288 288
 			// todo: a place to throw an exception?
289 289
 			// We need to indicate there is no registered page so this function is not being called correctly.
290 290
 			return false;
291 291
 		}
292 292
 		//k made it here so let's call the method
293 293
 		$content = call_user_func_array(
294
-			array( $this, '_get_admin_content_' . $page ),
295
-			array( $actives, $extra )
294
+			array($this, '_get_admin_content_'.$page),
295
+			array($actives, $extra)
296 296
 		);
297
-		if ( $content === false ) {
297
+		if ($content === false) {
298 298
 			// todo this needs to be an exception once we've got exceptions in place.
299 299
 			return false;
300 300
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * EE_Messages_Base class
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -300,20 +300,20 @@
 block discarded – undo
300 300
 	}
301 301
 
302 302
 
303
-    /**
304
-     * Allows a message type to specifically exclude template fields for the provided messenger.
305
-     * Filtered so this can be programmatically altered as well.
306
-     * @param string $messenger_name name of messenger
307
-     * @return array
308
-     */
303
+	/**
304
+	 * Allows a message type to specifically exclude template fields for the provided messenger.
305
+	 * Filtered so this can be programmatically altered as well.
306
+	 * @param string $messenger_name name of messenger
307
+	 * @return array
308
+	 */
309 309
 	public function excludedFieldsForMessenger($messenger_name)
310
-    {
311
-        return apply_filters(
312
-            'FHEE__EE_Messages_Base__excludedFieldForMessenger',
313
-            array(),
314
-            $messenger_name,
315
-            $this->name,
316
-            $this
317
-        );
318
-    }
310
+	{
311
+		return apply_filters(
312
+			'FHEE__EE_Messages_Base__excludedFieldForMessenger',
313
+			array(),
314
+			$messenger_name,
315
+			$this->name,
316
+			$this
317
+		);
318
+	}
319 319
 }
Please login to merge, or discard this patch.