Completed
Branch BUG-6292-conflict-legacy-wp-me... (9adae4)
by
unknown
44:46 queued 30:08
created
core/data_migration_scripts/EE_Data_Migration_Script_Stage.core.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  * _migration_step() (ie, it its a count of rows in the old attendees table in _count_records_to_migrate(), it should also be OLD attendee rows migrated
35 35
  * on each call to _migration_step().
36 36
  */
37
-abstract class EE_Data_Migration_Script_Stage extends EE_Data_Migration_Class_Base{
37
+abstract class EE_Data_Migration_Script_Stage extends EE_Data_Migration_Class_Base {
38 38
 	/**
39 39
 	 * The migration script this is a stage of
40 40
 	 * @var EE_Data_Migration_Script_Base
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * called by EE_Data_Migration_Script_Base's __construct() method so children don't have to
48 48
 	 * @param EE_Data_Migration_Script_Base $migration_script
49 49
 	 */
50
-	public function _construct_finalize($migration_script){
50
+	public function _construct_finalize($migration_script) {
51 51
 		$this->_migration_script = $migration_script;
52 52
 	}
53 53
 
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 	 * @param int $num_items_to_migrate
59 59
 	 * @return int
60 60
 	 */
61
-	public function migration_step($num_items_to_migrate=50){
61
+	public function migration_step($num_items_to_migrate = 50) {
62 62
 		//before we run the migration step, we want ot take note of warnings that get outputted
63 63
 		ob_start();
64 64
 		$items_migrated = $this->_migration_step($num_items_to_migrate);
65 65
 		$output = ob_get_contents();
66 66
 		ob_end_clean();
67
-		if( $output ){
67
+		if ($output) {
68 68
 			$this->add_error($output);
69 69
 		}
70 70
 		$this->_records_migrated += $items_migrated;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	 * @param int $num_items_to_migrate
83 83
 	 * @return int number of items ACTUALLY migrated
84 84
 	 */
85
-	abstract protected function _migration_step($num_items_to_migrate=50);
85
+	abstract protected function _migration_step($num_items_to_migrate = 50);
86 86
 
87 87
 	/**
88 88
 	 * Counts the records that have been migrated so far
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * returns an array of strings describing errors
97 97
 	 * @return array
98 98
 	 */
99
-	public function get_errors(){
99
+	public function get_errors() {
100 100
 		return $this->_errors;
101 101
 	}
102 102
 
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 	 * to have been made from the properties_as_array() function.
107 107
 	 * @param array $array_of_properties like what's produced from properties_as_array() method
108 108
 	 */
109
-	public function instantiate_from_array_of_properties($array_of_properties){
109
+	public function instantiate_from_array_of_properties($array_of_properties) {
110 110
 		unset($array_of_properties['class']);
111
-		foreach($array_of_properties as $property_name => $property_value){
111
+		foreach ($array_of_properties as $property_name => $property_value) {
112 112
 			$this->$property_name = $property_value;
113 113
 		}
114 114
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * Gets the script this is a stage of
118 118
 	 * @return EE_Data_Migration_Script_Base
119 119
 	 */
120
-	protected function get_migration_script(){
120
+	protected function get_migration_script() {
121 121
 		return $this->_migration_script;
122 122
 	}
123 123
 }
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_Data_Migration_Script_Stage_Table.core.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
 	protected $_old_table;
22 22
 
23 23
 /**
24
-	 * Set in the constructor to add this sql to both the counting query in
25
-	 * EE_Data_Migration_Script_Stage_Table::_count_records_to_migrate() and
26
-	 * EE_Data_Migration_Script_Stage_Table::_get_rows().
27
-	 * Eg "where column_name like '%some_value%'"
28
-	 * @var string
29
-	 */
24
+ * Set in the constructor to add this sql to both the counting query in
25
+ * EE_Data_Migration_Script_Stage_Table::_count_records_to_migrate() and
26
+ * EE_Data_Migration_Script_Stage_Table::_get_rows().
27
+ * Eg "where column_name like '%some_value%'"
28
+ * @var string
29
+ */
30 30
 	protected $_extra_where_sql;
31 31
 
32 32
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 	 * @param int $num_items
42 42
 	 * @return int number of items ACTUALLY migrated
43 43
 	 */
44
-	function _migration_step($num_items=50){
45
-		$rows = $this->_get_rows( $num_items );
44
+	function _migration_step($num_items = 50) {
45
+		$rows = $this->_get_rows($num_items);
46 46
 		$items_actually_migrated = 0;
47
-		foreach($rows as $old_row){
47
+		foreach ($rows as $old_row) {
48 48
 			$this->_migrate_old_row($old_row);
49 49
 			$items_actually_migrated++;
50 50
 		}
51
-		if($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()){
51
+		if ($this->count_records_migrated() + $items_actually_migrated >= $this->count_records_to_migrate()) {
52 52
 			$this->set_completed();
53 53
 		}
54 54
 		return $items_actually_migrated;
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 	 * @param int $limit
61 61
 	 * @return array of arrays like $wpdb->get_results($sql, ARRAY_A)
62 62
 	 */
63
-	protected function _get_rows( $limit ){
63
+	protected function _get_rows($limit) {
64 64
 		global $wpdb;
65 65
 		$start_at_record = $this->count_records_migrated();
66
-		$query = "SELECT * FROM {$this->_old_table} {$this->_extra_where_sql} " . $wpdb->prepare("LIMIT %d, %d",$start_at_record,$limit);
67
-		return $wpdb->get_results($query,ARRAY_A);
66
+		$query = "SELECT * FROM {$this->_old_table} {$this->_extra_where_sql} ".$wpdb->prepare("LIMIT %d, %d", $start_at_record, $limit);
67
+		return $wpdb->get_results($query, ARRAY_A);
68 68
 	}
69 69
 
70 70
 
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	function _count_records_to_migrate() {
77 77
 		global $wpdb;
78
-		$query =  "SELECT COUNT(*) FROM {$this->_old_table} {$this->_extra_where_sql}";
79
-		$count = $wpdb->get_var( $query );
78
+		$query = "SELECT COUNT(*) FROM {$this->_old_table} {$this->_extra_where_sql}";
79
+		$count = $wpdb->get_var($query);
80 80
 		return $count;
81 81
 	}
82 82
 
Please login to merge, or discard this patch.
core/db_classes/EE_CPT_Base.class.php 3 patches
Spacing   +56 added lines, -56 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
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param int    $parent_term_taxonomy_id optional
48 48
 	 * @return EE_Term_Taxonomy
49 49
 	 */
50
-	function add_event_category( $category_name, $category_description = NULL, $parent_term_taxonomy_id = NULL ) {
51
-		return $this->get_model()->add_event_category( $this, $category_name, $category_description, $parent_term_taxonomy_id );
50
+	function add_event_category($category_name, $category_description = NULL, $parent_term_taxonomy_id = NULL) {
51
+		return $this->get_model()->add_event_category($this, $category_name, $category_description, $parent_term_taxonomy_id);
52 52
 	}
53 53
 
54 54
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 * @param string $category_name
59 59
 	 * @return bool
60 60
 	 */
61
-	function remove_event_category( $category_name ) {
62
-		return $this->get_model()->remove_event_category( $this, $category_name );
61
+	function remove_event_category($category_name) {
62
+		return $this->get_model()->remove_event_category($this, $category_name);
63 63
 	}
64 64
 
65 65
 
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 	 * @param EE_Term_Taxonomy $term_taxonomy
71 71
 	 * @return EE_Base_Class the relation was removed from
72 72
 	 */
73
-	function remove_relation_to_term_taxonomy( $term_taxonomy ) {
74
-		if ( !$term_taxonomy ) {
75
-			EE_Error::add_error( sprintf( __( "No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso" ), get_class( $this ), $this->ID() ), __FILE__, __FUNCTION__, __LINE__ );
73
+	function remove_relation_to_term_taxonomy($term_taxonomy) {
74
+		if ( ! $term_taxonomy) {
75
+			EE_Error::add_error(sprintf(__("No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso"), get_class($this), $this->ID()), __FILE__, __FUNCTION__, __LINE__);
76 76
 			return NULL;
77 77
 		}
78
-		$term_taxonomy->set_count( $term_taxonomy->count() - 1 );
78
+		$term_taxonomy->set_count($term_taxonomy->count() - 1);
79 79
 		$term_taxonomy->save();
80
-		return $this->_remove_relation_to( $term_taxonomy, 'Term_Taxonomy' );
80
+		return $this->_remove_relation_to($term_taxonomy, 'Term_Taxonomy');
81 81
 	}
82 82
 
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @return int
102 102
 	 */
103 103
 	public function parent() {
104
-		return $this->get( 'parent' );
104
+		return $this->get('parent');
105 105
 	}
106 106
 
107 107
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @return string
112 112
 	 */
113 113
 	public function status() {
114
-		return $this->get( 'status' );
114
+		return $this->get('status');
115 115
 	}
116 116
 
117 117
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 	/**
120 120
 	 * @param string $status
121 121
 	 */
122
-	public function set_status( $status ) {
123
-		$this->set( 'status', $status );
122
+	public function set_status($status) {
123
+		$this->set('status', $status);
124 124
 	}
125 125
 
126 126
 
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
 	 * @param string|array $attr Optional. Query string or array of attributes.
135 135
 	 * @return string HTML image element
136 136
 	 */
137
-	protected function _get_feature_image( $size, $attr ) {
137
+	protected function _get_feature_image($size, $attr) {
138 138
 		//first let's see if we already have the _feature_image property set AND if it has a cached element on it FOR the given size
139
-		$attr_key = is_array( $attr ) ? implode( '_', $attr ) : $attr;
140
-		$cache_key = is_array( $size ) ? implode( '_', $size ) . $attr_key : $size . $attr_key;
141
-		$this->_feature_image[ $cache_key ] = isset( $this->_feature_image[ $cache_key ] ) ? $this->_feature_image[ $cache_key ] : $this->get_model()->get_feature_image( $this->ID(), $size, $attr );
142
-		return $this->_feature_image[ $cache_key ];
139
+		$attr_key = is_array($attr) ? implode('_', $attr) : $attr;
140
+		$cache_key = is_array($size) ? implode('_', $size).$attr_key : $size.$attr_key;
141
+		$this->_feature_image[$cache_key] = isset($this->_feature_image[$cache_key]) ? $this->_feature_image[$cache_key] : $this->get_model()->get_feature_image($this->ID(), $size, $attr);
142
+		return $this->_feature_image[$cache_key];
143 143
 	}
144 144
 
145 145
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 * @param string|array $attr
151 151
 	 * @return string of html
152 152
 	 */
153
-	public function feature_image( $size = 'thumbnail', $attr = '' ) {
154
-		return $this->_get_feature_image( $size, $attr );
153
+	public function feature_image($size = 'thumbnail', $attr = '') {
154
+		return $this->_get_feature_image($size, $attr);
155 155
 	}
156 156
 
157 157
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 * @param  string|array $size can either be a string: 'thumbnail', 'medium', 'large', 'full' OR 2-item array representing width and height in pixels eg. array(32,32).
162 162
 	 * @return string|boolean          the url of the image or false if not found
163 163
 	 */
164
-	public function feature_image_url( $size = 'thumbnail' ) {
165
-		$attachment = wp_get_attachment_image_src( get_post_thumbnail_id( $this->ID() ), $size );
166
-		return !empty( $attachment ) ? $attachment[ 0 ] : FALSE;
164
+	public function feature_image_url($size = 'thumbnail') {
165
+		$attachment = wp_get_attachment_image_src(get_post_thumbnail_id($this->ID()), $size);
166
+		return ! empty($attachment) ? $attachment[0] : FALSE;
167 167
 	}
168 168
 
169 169
 
@@ -176,37 +176,37 @@  discard block
 block discarded – undo
176 176
 	 * @internal param array|string $related_obj_names if included this will be used to restore for related obj if not included then we just do restore on the meta.  We will accept an array of related_obj_names for restoration here.
177 177
 	 * @return void
178 178
 	 */
179
-	public function restore_revision( $revision_id, $related_obj_names = array(), $where_query = array() ) {
179
+	public function restore_revision($revision_id, $related_obj_names = array(), $where_query = array()) {
180 180
 		//get revision object
181
-		$revision_obj = $this->get_model()->get_one_by_ID( $revision_id );
182
-		if ( $revision_obj instanceof EE_CPT_Base ) {
181
+		$revision_obj = $this->get_model()->get_one_by_ID($revision_id);
182
+		if ($revision_obj instanceof EE_CPT_Base) {
183 183
 			//no related_obj_name so we assume we're saving a revision on this object.
184
-			if ( empty( $related_obj_names ) ) {
184
+			if (empty($related_obj_names)) {
185 185
 				$fields = $this->get_model()->get_meta_table_fields();
186
-				foreach ( $fields as $field ) {
187
-					$this->set( $field, $revision_obj->get( $field ) );
186
+				foreach ($fields as $field) {
187
+					$this->set($field, $revision_obj->get($field));
188 188
 				}
189 189
 				$this->save();
190 190
 			}
191
-			$related_obj_names = (array)$related_obj_names;
192
-			foreach ( $related_obj_names as $related_name ) {
191
+			$related_obj_names = (array) $related_obj_names;
192
+			foreach ($related_obj_names as $related_name) {
193 193
 				//related_obj_name so we're saving a revision on an object related to this object
194 194
 				//do we have $where_query params for this related object?  If we do then we include that.
195
-				$cols_n_values = isset( $where_query[ $related_name ] ) ? $where_query[ $related_name ] : array();
196
-				$where_params = !empty( $cols_n_values ) ? array( $cols_n_values ) : array();
197
-				$related_objs = $this->get_many_related( $related_name, $where_params );
198
-				$revision_related_objs = $revision_obj->get_many_related( $related_name, $where_params );
195
+				$cols_n_values = isset($where_query[$related_name]) ? $where_query[$related_name] : array();
196
+				$where_params = ! empty($cols_n_values) ? array($cols_n_values) : array();
197
+				$related_objs = $this->get_many_related($related_name, $where_params);
198
+				$revision_related_objs = $revision_obj->get_many_related($related_name, $where_params);
199 199
 				//load helper
200
-				EE_Registry::instance()->load_helper( 'Array' );
200
+				EE_Registry::instance()->load_helper('Array');
201 201
 				//remove related objs from this object that are not in revision
202 202
 				//array_diff *should* work cause I think objects are indexed by ID?
203
-				$related_to_remove = EEH_Array::object_array_diff( $related_objs, $revision_related_objs );
204
-				foreach ( $related_to_remove as $rr ) {
205
-					$this->_remove_relation_to( $rr, $related_name, $cols_n_values );
203
+				$related_to_remove = EEH_Array::object_array_diff($related_objs, $revision_related_objs);
204
+				foreach ($related_to_remove as $rr) {
205
+					$this->_remove_relation_to($rr, $related_name, $cols_n_values);
206 206
 				}
207 207
 				//add all related objs attached to revision to this object
208
-				foreach ( $revision_related_objs as $r_obj ) {
209
-					$this->_add_relation_to( $r_obj, $related_name, $cols_n_values );
208
+				foreach ($revision_related_objs as $r_obj) {
209
+					$this->_add_relation_to($r_obj, $related_name, $cols_n_values);
210 210
 				}
211 211
 			}
212 212
 		}
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 	 * <li>If $single is set to false, or left blank, the function returns an array containing all values of the specified key.</li>
223 223
 	 * <li>If $single is set to true, the function returns the first value of the specified key (not in an array</li></ul>
224 224
 	 */
225
-	public function get_post_meta( $meta_key = NULL, $single = FALSE ) {
226
-		return get_post_meta( $this->ID(), $meta_key, $single );
225
+	public function get_post_meta($meta_key = NULL, $single = FALSE) {
226
+		return get_post_meta($this->ID(), $meta_key, $single);
227 227
 	}
228 228
 
229 229
 
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
 	 * @throws EE_Error
237 237
 	 * @return mixed Returns meta_id if the meta doesn't exist, otherwise returns true on success and false on failure. NOTE: If the meta_value passed to this function is the same as the value that is already in the database, this function returns false.
238 238
 	 */
239
-	public function update_post_meta( $meta_key, $meta_value, $prev_value = NULL ) {
240
-		if ( !$this->ID() ) {
241
-			throw new EE_Error( sprintf( __( "You must save this custom post type before adding or updating a post meta field", "event_espresso" ) ) );
239
+	public function update_post_meta($meta_key, $meta_value, $prev_value = NULL) {
240
+		if ( ! $this->ID()) {
241
+			throw new EE_Error(sprintf(__("You must save this custom post type before adding or updating a post meta field", "event_espresso")));
242 242
 		}
243
-		return update_post_meta( $this->ID(), $meta_key, $meta_value, $prev_value );
243
+		return update_post_meta($this->ID(), $meta_key, $meta_value, $prev_value);
244 244
 	}
245 245
 
246 246
 
@@ -253,11 +253,11 @@  discard block
 block discarded – undo
253 253
 	 * @throws EE_Error
254 254
 	 * @return boolean Boolean true, except if the $unique argument was set to true and a custom field with the given key already exists, in which case false is returned.
255 255
 	 */
256
-	public function add_post_meta( $meta_key, $meta_value, $unique = FALSE ) {
257
-		if ( !$this->ID() ) {
258
-			throw new EE_Error( sprintf( __( "You must save this custom post type before adding or updating a post meta field", "event_espresso" ) ) );
256
+	public function add_post_meta($meta_key, $meta_value, $unique = FALSE) {
257
+		if ( ! $this->ID()) {
258
+			throw new EE_Error(sprintf(__("You must save this custom post type before adding or updating a post meta field", "event_espresso")));
259 259
 		}
260
-		return add_post_meta( $this->ID(), $meta_key, $meta_value, $unique );
260
+		return add_post_meta($this->ID(), $meta_key, $meta_value, $unique);
261 261
 	}
262 262
 
263 263
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @return string
268 268
 	 */
269 269
 	public function get_permalink() {
270
-		return get_permalink( $this->ID() );
270
+		return get_permalink($this->ID());
271 271
 	}
272 272
 
273 273
 
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
 	 * @param array $query_params
278 278
 	 * @return EE_Term_Taxonomy
279 279
 	 */
280
-	public function term_taxonomies( $query_params = array() ) {
281
-		return $this->get_many_related( 'Term_Taxonomy', $query_params );
280
+	public function term_taxonomies($query_params = array()) {
281
+		return $this->get_many_related('Term_Taxonomy', $query_params);
282 282
 	}
283 283
 
284 284
 
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 	exit( 'No direct script access allowed' );
3 3
 }
4 4
 /**
5
- * Event Espresso
6
- *
7
- * Event Registration and Management Plugin for WordPress
8
- *
9
- * @ package        Event Espresso
10
- * @ author        Event Espresso
11
- * @ copyright    (c) 2008-2011 Event Espresso  All Rights Reserved.
12
- * @ license        {@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
13
- * @ link                {@link http://www.eventespresso.com}
14
- * @ since            4.0
15
- *
16
- */
5
+	 * Event Espresso
6
+	 *
7
+	 * Event Registration and Management Plugin for WordPress
8
+	 *
9
+	 * @ package        Event Espresso
10
+	 * @ author        Event Espresso
11
+	 * @ copyright    (c) 2008-2011 Event Espresso  All Rights Reserved.
12
+	 * @ license        {@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
13
+	 * @ link                {@link http://www.eventespresso.com}
14
+	 * @ since            4.0
15
+	 *
16
+	 */
17 17
 
18 18
 
19 19
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * The main purpose of this method is to return the parent for the model object
99 99
 	 *
100 100
 	 * @access public
101
-	 * @return int
101
+	 * @return boolean
102 102
 	 */
103 103
 	public function parent() {
104 104
 		return $this->get( 'parent' );
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
 	/**
110 110
 	 * return the _status property
111
-	 * @return string
111
+	 * @return boolean
112 112
 	 */
113 113
 	public function status() {
114 114
 		return $this->get( 'status' );
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 *
131 131
 	 * @link   http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
132 132
 	 * @access protected
133
-	 * @param string|array $size (optional) Image size. Defaults to 'post-thumbnail' but can also be a 2-item array representing width and height in pixels (i.e. array(32,32) ).
133
+	 * @param string $size (optional) Image size. Defaults to 'post-thumbnail' but can also be a 2-item array representing width and height in pixels (i.e. array(32,32) ).
134 134
 	 * @param string|array $attr Optional. Query string or array of attributes.
135 135
 	 * @return string HTML image element
136 136
 	 */
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 	/**
160 160
 	 * This uses the wp "wp_get_attachment_image_src()" function to return the feature image for the current class using the given size params.
161
-	 * @param  string|array $size can either be a string: 'thumbnail', 'medium', 'large', 'full' OR 2-item array representing width and height in pixels eg. array(32,32).
161
+	 * @param  integer[] $size can either be a string: 'thumbnail', 'medium', 'large', 'full' OR 2-item array representing width and height in pixels eg. array(32,32).
162 162
 	 * @return string|boolean          the url of the image or false if not found
163 163
 	 */
164 164
 	public function feature_image_url( $size = 'thumbnail' ) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 * This is a method for restoring this_obj using details from the given $revision_id
173 173
 	 *
174 174
 	 * @param int $revision_id 		ID of the revision we're getting data from
175
-	 * @param array $related_obj_names if included this will be used to restore for related obj
175
+	 * @param string[] $related_obj_names if included this will be used to restore for related obj
176 176
 	 *                                 if not included then we just do restore on the meta.
177 177
 	 *                                 We will accept an array of related_obj_names for restoration here.
178 178
 	 * @param array $where_query       You can optionally include an array of key=>value pairs
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 * Wrapper for get_post_meta, http://codex.wordpress.org/Function_Reference/get_post_meta
228 228
 	 * @param string  $meta_key
229 229
 	 * @param boolean $single
230
-	 * @return mixed <ul><li>If only $id is set it will return all meta values in an associative array.</li>
230
+	 * @return string|null <ul><li>If only $id is set it will return all meta values in an associative array.</li>
231 231
 	 * <li>If $single is set to false, or left blank, the function returns an array containing all values of the specified key.</li>
232 232
 	 * <li>If $single is set to true, the function returns the first value of the specified key (not in an array</li></ul>
233 233
 	 */
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 	/**
285 285
 	 * Gets all the term-taxonomies for this CPT
286 286
 	 * @param array $query_params
287
-	 * @return EE_Term_Taxonomy
287
+	 * @return EE_Base_Class[]
288 288
 	 */
289 289
 	public function term_taxonomies( $query_params = array() ) {
290 290
 		return $this->get_many_related( 'Term_Taxonomy', $query_params );
Please login to merge, or discard this patch.
core/db_classes/EE_Event_Message_Template.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	 * @param null  $timezone
23 23
 	 * @return EE_Event_Message_Template|mixed
24 24
 	 */
25
-	public static function new_instance( $props_n_values = array(), $timezone = NULL ) {
26
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone );
27
-		return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone );
25
+	public static function new_instance($props_n_values = array(), $timezone = NULL) {
26
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone);
27
+		return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone);
28 28
 	}
29 29
 
30 30
 
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	 * @param null  $timezone
35 35
 	 * @return EE_Event_Message_Template
36 36
 	 */
37
-	public static function new_instance_from_db ( $props_n_values = array(), $timezone = NULL ) {
38
-		return new self( $props_n_values, TRUE, $timezone );
37
+	public static function new_instance_from_db($props_n_values = array(), $timezone = NULL) {
38
+		return new self($props_n_values, TRUE, $timezone);
39 39
 	}
40 40
 
41 41
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
core/db_classes/EE_Event_Question_Group.class.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@  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
  * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
6 6
  */
7
-class EE_Event_Question_Group extends EE_Base_Class{
7
+class EE_Event_Question_Group extends EE_Base_Class {
8 8
 
9 9
 	/**
10 10
 	 * @param array $props_n_values
11 11
 	 * @return EE_Event_Question_Group|mixed
12 12
 	 */
13
-	public static function new_instance( $props_n_values = array() ) {
14
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
15
-		return $has_object ? $has_object : new self( $props_n_values);
13
+	public static function new_instance($props_n_values = array()) {
14
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
15
+		return $has_object ? $has_object : new self($props_n_values);
16 16
 	}
17 17
 
18 18
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 * @param array $props_n_values
22 22
 	 * @return EE_Event_Question_Group
23 23
 	 */
24
-	public static function new_instance_from_db ( $props_n_values = array() ) {
25
-		return new self( $props_n_values, TRUE );
24
+	public static function new_instance_from_db($props_n_values = array()) {
25
+		return new self($props_n_values, TRUE);
26 26
 	}
27 27
 }
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
4
- */
3
+	 * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
4
+	 */
5 5
 class EE_Event_Venue extends EE_Base_Class{
6 6
 
7 7
 	/**
Please login to merge, or discard this patch.
core/db_classes/EE_Event_Venue.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
4
- */
3
+	 * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
4
+	 */
5 5
 class EE_Event_Venue extends EE_Base_Class{
6 6
 
7 7
 	/**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * Required  by EEM_Event_Question_Group in case someone queries for all its model objects
4 4
  */
5
-class EE_Event_Venue extends EE_Base_Class{
5
+class EE_Event_Venue extends EE_Base_Class {
6 6
 
7 7
 	/**
8 8
 	 * @param array $props_n_values
9 9
 	 * @return EE_Event_Venue|mixed
10 10
 	 */
11
-	public static function new_instance( $props_n_values = array() ) {
12
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
13
-		return $has_object ? $has_object : new self( $props_n_values);
11
+	public static function new_instance($props_n_values = array()) {
12
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
13
+		return $has_object ? $has_object : new self($props_n_values);
14 14
 	}
15 15
 
16 16
 
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	 * @param array $props_n_values
20 20
 	 * @return EE_Event_Venue
21 21
 	 */
22
-	public static function new_instance_from_db ( $props_n_values = array() ) {
23
-		return new self( $props_n_values, TRUE );
22
+	public static function new_instance_from_db($props_n_values = array()) {
23
+		return new self($props_n_values, TRUE);
24 24
 	}
25 25
 
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
core/db_classes/EE_Payment_Method.class.php 3 patches
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if (!defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2
-do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2
+do_action('AHEE_log', __FILE__, __FUNCTION__, '');
3 3
 /**
4 4
  * Event Espresso
5 5
  *
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * ------------------------------------------------------------------------
25 25
  */
26
-class EE_Payment_Method extends EE_Base_Class{
26
+class EE_Payment_Method extends EE_Base_Class {
27 27
 
28 28
 	/**
29 29
 	 * Payment Method type object, which has all the info about this type of payment method,
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	 * @param array $props_n_values
40 40
 	 * @return EE_Payment_Method
41 41
 	 */
42
-	public static function new_instance( $props_n_values = array()) {
43
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
44
-		return $has_object ? $has_object : new self( $props_n_values, FALSE );
42
+	public static function new_instance($props_n_values = array()) {
43
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
44
+		return $has_object ? $has_object : new self($props_n_values, FALSE);
45 45
 	}
46 46
 
47 47
 
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	 * @param array $props_n_values
52 52
 	 * @return EE_Payment_Method
53 53
 	 */
54
-	public static function new_instance_from_db ( $props_n_values = array()) {
55
-		return new self( $props_n_values, TRUE );
54
+	public static function new_instance_from_db($props_n_values = array()) {
55
+		return new self($props_n_values, TRUE);
56 56
 	}
57 57
 
58 58
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return boolean
82 82
 	 */
83 83
 	function active() {
84
-		return array_intersect(array_keys(EEM_Payment_Method::instance()->scopes()),$this->scope());
84
+		return array_intersect(array_keys(EEM_Payment_Method::instance()->scopes()), $this->scope());
85 85
 	}
86 86
 
87 87
 
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 	 * Sets this PM as active by making it usable within the CART scope. Offline gateways
91 91
 	 * are also usable from the admin-scope as well. DOES NOT SAVE it
92 92
 	 */
93
-	function set_active(){
93
+	function set_active() {
94 94
 		$default_scopes = array(EEM_Payment_Method::scope_cart);
95
-		if($this->type_obj() &&
96
-			$this->type_obj()->payment_occurs() == EE_PMT_Base::offline){
95
+		if ($this->type_obj() &&
96
+			$this->type_obj()->payment_occurs() == EE_PMT_Base::offline) {
97 97
 			$default_scopes[] = EEM_Payment_Method::scope_admin;
98 98
 		}
99 99
 		$this->set_scope($default_scopes);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * Makes this payment method apply to NO scopes at all. DOES NOT SAVE it.
106 106
 	 */
107
-	function deactivate(){
107
+	function deactivate() {
108 108
 		$this->set_scope(array());
109 109
 	}
110 110
 
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
 	 * @param type $field_value
296 296
 	 * @param type $use_default
297 297
 	 */
298
-	function set( $field_name, $field_value, $use_default = FALSE ){
299
-		if( $field_name == 'PMD_type' ){
298
+	function set($field_name, $field_value, $use_default = FALSE) {
299
+		if ($field_name == 'PMD_type') {
300 300
 			//the type has probably changed, so forget about its old type object
301 301
 			$this->_type_obj = NULL;
302 302
 		}
@@ -370,26 +370,26 @@  discard block
 block discarded – undo
370 370
 	 * @return EE_PMT_Base
371 371
 	 * @throws EE_Error
372 372
 	 */
373
-	public function type_obj(){
374
-		if( ! $this->_type_obj ) {
375
-			EE_Registry::instance()->load_lib( 'Payment_Method_Manager' );
376
-			if ( EE_Payment_Method_Manager::instance()->payment_method_type_exists( $this->type() )) {
377
-				$class_name = EE_Payment_Method_Manager::instance()->payment_method_class_from_type( $this->type() );
378
-				if ( ! class_exists( $class_name )) {
373
+	public function type_obj() {
374
+		if ( ! $this->_type_obj) {
375
+			EE_Registry::instance()->load_lib('Payment_Method_Manager');
376
+			if (EE_Payment_Method_Manager::instance()->payment_method_type_exists($this->type())) {
377
+				$class_name = EE_Payment_Method_Manager::instance()->payment_method_class_from_type($this->type());
378
+				if ( ! class_exists($class_name)) {
379 379
 					throw new EE_Error(
380 380
 						sprintf(
381
-							__( 'An attempt to use the "%1$s" payment method failed, so it was deactivated.%2$sWas the "%1$s" Plugin recently deactivated? It can be reactivated on the %3$sPlugins Admin Page%4$s', 'event_espresso' ),
381
+							__('An attempt to use the "%1$s" payment method failed, so it was deactivated.%2$sWas the "%1$s" Plugin recently deactivated? It can be reactivated on the %3$sPlugins Admin Page%4$s', 'event_espresso'),
382 382
 							$class_name,
383 383
 							'<br />',
384
-							'<a href="' . admin_url('plugins.php') . '">',
384
+							'<a href="'.admin_url('plugins.php').'">',
385 385
 							'</a>'
386 386
 						)
387 387
 					);
388 388
 				}
389
-				$r = new ReflectionClass( $class_name );
390
-					$this->_type_obj = $r->newInstanceArgs( array( $this ));
389
+				$r = new ReflectionClass($class_name);
390
+					$this->_type_obj = $r->newInstanceArgs(array($this));
391 391
 			} else {
392
-				throw new EE_Error( sprintf( __( 'A payment method of type "%1$s" does not exist. Only ones existing are: %2$s', 'event_espresso' ), $this->type(), implode(',', EE_Payment_Method_Manager::instance()->payment_method_type_names() ) ) );
392
+				throw new EE_Error(sprintf(__('A payment method of type "%1$s" does not exist. Only ones existing are: %2$s', 'event_espresso'), $this->type(), implode(',', EE_Payment_Method_Manager::instance()->payment_method_type_names())));
393 393
 			}
394 394
 		}
395 395
 		return $this->_type_obj;
@@ -402,18 +402,18 @@  discard block
 block discarded – undo
402 402
 	 * and the extra meta. Mostly used for passing off ot gateways.	 *
403 403
 	 * @return array
404 404
 	 */
405
-	public function settings_array(){
405
+	public function settings_array() {
406 406
 		$fields = $this->model_field_array();
407 407
 		$extra_meta = $this->all_extra_meta_array();
408 408
 		//remove the model's prefix from the fields
409 409
 		$combined_settings_array = array();
410
-		foreach($fields as $key => $value){
411
-			if(strpos($key, 'PMD_')===0){
410
+		foreach ($fields as $key => $value) {
411
+			if (strpos($key, 'PMD_') === 0) {
412 412
 				$key_sans_model_prefix = str_replace('PMD_', '', $key);
413 413
 				$combined_settings_array [$key_sans_model_prefix] = $value;
414 414
 			}
415 415
 		}
416
-		$combined_settings_array = array_merge( $extra_meta,$combined_settings_array );
416
+		$combined_settings_array = array_merge($extra_meta, $combined_settings_array);
417 417
 		return $combined_settings_array;
418 418
 	}
419 419
 
@@ -425,12 +425,12 @@  discard block
 block discarded – undo
425 425
 	 * @param string $css_class
426 426
 	 * @return string of HTML for displaying the button
427 427
 	 */
428
-	public function button_html( $url = '', $css_class = '' ){
428
+	public function button_html($url = '', $css_class = '') {
429 429
 		$payment_occurs = $this->type_obj()->payment_occurs();
430 430
 		return '
431
-		 <div id="' . $this->slug() . '-payment-option-dv" class="'. $payment_occurs .'-payment-gateway reg-page-payment-option-dv' . $css_class . '">
432
-			<a id="payment-gateway-button-' . $this->slug() . '" class="reg-page-payment-option-lnk" rel="' . $this->slug() . '" href="' . $url . '" >
433
-				<img src="' . $this->button_url() . '" alt="' . sprintf( esc_attr__( 'Pay using %s', 'event_espresso' ), $this->get_pretty('PMD_name','form_input') ) . '" />
431
+		 <div id="' . $this->slug().'-payment-option-dv" class="'.$payment_occurs.'-payment-gateway reg-page-payment-option-dv'.$css_class.'">
432
+			<a id="payment-gateway-button-' . $this->slug().'" class="reg-page-payment-option-lnk" rel="'.$this->slug().'" href="'.$url.'" >
433
+				<img src="' . $this->button_url().'" alt="'.sprintf(esc_attr__('Pay using %s', 'event_espresso'), $this->get_pretty('PMD_name', 'form_input')).'" />
434 434
 			</a>
435 435
 		</div>
436 436
 ';
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 * (as defined by the gateway and the currently active currencies)
444 444
 	 * @return EE_Currency[]
445 445
 	 */
446
-	public function get_all_usable_currencies(){
446
+	public function get_all_usable_currencies() {
447 447
 		return EEM_Currency::instance()->get_all_currencies_usable_by($this->type_obj());
448 448
 	}
449 449
 
@@ -452,9 +452,9 @@  discard block
 block discarded – undo
452 452
 	 * @param string $currency_code currency ID (code)
453 453
 	 * @return boolean
454 454
 	 */
455
-	public function usable_for_currency( $currency_code ) {
456
-		foreach( $this->get_all_usable_currencies() as $currency_obj ) {
457
-			if( $currency_obj->ID() == $currency_code ){
455
+	public function usable_for_currency($currency_code) {
456
+		foreach ($this->get_all_usable_currencies() as $currency_obj) {
457
+			if ($currency_obj->ID() == $currency_code) {
458 458
 				return TRUE;
459 459
 			}
460 460
 		}
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	 * Returns TRUE if this payment method's gateway is an instance of EE_Onsite_Gateway
468 468
 	 * @return bool
469 469
 	 */
470
-	public function is_on_site(){
470
+	public function is_on_site() {
471 471
 		return $this->type_obj()->payment_occurs() == EE_PMT_Base::onsite;
472 472
 	}
473 473
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 	 * Returns TRUE if this payment method's gateway is an instance of EE_Offsite_Gateway
478 478
 	 * @return bool
479 479
 	 */
480
-	public function is_off_site(){
480
+	public function is_off_site() {
481 481
 		return $this->type_obj()->payment_occurs() == EE_PMT_Base::offsite;
482 482
 	}
483 483
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 	 * Returns TRUE if this payment method does not utilize a gateway
488 488
 	 * @return bool
489 489
 	 */
490
-	public function is_off_line(){
490
+	public function is_off_line() {
491 491
 		return $this->type_obj()->payment_occurs() == EE_PMT_Base::offline;
492 492
 	}
493 493
 
@@ -497,10 +497,10 @@  discard block
 block discarded – undo
497 497
 	 * to load the required classes, and don't need them at the time of unserialization
498 498
 	 * @return array
499 499
 	 */
500
-	public function __sleep(){
501
-		$properties =  get_object_vars( $this );
502
-		unset( $properties[ '_type_obj' ] );
503
-		return array_keys( $properties );
500
+	public function __sleep() {
501
+		$properties = get_object_vars($this);
502
+		unset($properties['_type_obj']);
503
+		return array_keys($properties);
504 504
 	}
505 505
 
506 506
 
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
 do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
3 5
 /**
4 6
  * Event Espresso
Please login to merge, or discard this patch.
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 	/**
114 114
 	 * Gets button_url
115
-	 * @return string
115
+	 * @return boolean
116 116
 	 */
117 117
 	function button_url() {
118 118
 		return $this->get('PMD_button_url');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 	/**
154 154
 	 * Gets description
155
-	 * @return string
155
+	 * @return boolean
156 156
 	 */
157 157
 	function description() {
158 158
 		return $this->get('PMD_desc');
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
 	/**
174 174
 	 * Gets name
175
-	 * @return string
175
+	 * @return boolean
176 176
 	 */
177 177
 	function name() {
178 178
 		return $this->get('PMD_name');
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
 	/**
214 214
 	 * Gets order
215
-	 * @return int
215
+	 * @return boolean
216 216
 	 */
217 217
 	function order() {
218 218
 		return $this->get('PMD_order');
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 
233 233
 	/**
234 234
 	 * Gets slug
235
-	 * @return string
235
+	 * @return boolean
236 236
 	 */
237 237
 	function slug() {
238 238
 		return $this->get('PMD_slug');
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
 	/**
254 254
 	 * Gets type
255
-	 * @return string
255
+	 * @return boolean
256 256
 	 */
257 257
 	function type() {
258 258
 		return $this->get('PMD_type');
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
 	/**
274 274
 	 * Gets wp_user
275
-	 * @return int
275
+	 * @return boolean
276 276
 	 */
277 277
 	function wp_user() {
278 278
 		return $this->get('PMD_wp_user');
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
 	/**
309 309
 	 * Gets admin_name
310
-	 * @return string
310
+	 * @return boolean
311 311
 	 */
312 312
 	function admin_name() {
313 313
 		return $this->get('PMD_admin_name');
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
 	/**
329 329
 	 * Gets admin_desc
330
-	 * @return string
330
+	 * @return boolean
331 331
 	 */
332 332
 	function admin_desc() {
333 333
 		return $this->get('PMD_admin_desc');
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
 	/**
349 349
 	 * Gets scope
350
-	 * @return array
350
+	 * @return boolean
351 351
 	 */
352 352
 	function scope() {
353 353
 		return $this->get('PMD_scope');
Please login to merge, or discard this patch.
core/db_classes/EE_Question_Group_Question.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Required  by EEM_Question_Group_Question in case someone queries for all its model objects
4
- */
3
+	 * Required  by EEM_Question_Group_Question in case someone queries for all its model objects
4
+	 */
5 5
 class EE_Question_Group_Question extends EE_Base_Class{
6 6
 
7 7
 	/**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,15 +2,15 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * Required  by EEM_Question_Group_Question in case someone queries for all its model objects
4 4
  */
5
-class EE_Question_Group_Question extends EE_Base_Class{
5
+class EE_Question_Group_Question extends EE_Base_Class {
6 6
 
7 7
 	/**
8 8
 	 * @param array $props_n_values
9 9
 	 * @return EE_Question_Group_Question|mixed
10 10
 	 */
11
-	public static function new_instance( $props_n_values = array() ) {
12
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__ );
13
-		return $has_object ? $has_object : new self( $props_n_values );
11
+	public static function new_instance($props_n_values = array()) {
12
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
13
+		return $has_object ? $has_object : new self($props_n_values);
14 14
 	}
15 15
 
16 16
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	 * @param array $props_n_values
20 20
 	 * @return EE_Question_Group_Question
21 21
 	 */
22
-	public static function new_instance_from_db ( $props_n_values = array() ) {
23
-		return new self( $props_n_values, TRUE );
22
+	public static function new_instance_from_db($props_n_values = array()) {
23
+		return new self($props_n_values, TRUE);
24 24
 	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
core/db_classes/EE_Soft_Delete_Base_Class.class.php 2 patches
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
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @return boolean success
34 34
 	 */
35 35
 	public function delete() {
36
-		return $this->delete_or_restore( TRUE );
36
+		return $this->delete_or_restore(TRUE);
37 37
 	}
38 38
 
39 39
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return boolean success
44 44
 	 */
45 45
 	public function delete_permanently() {
46
-		return $this->get_model()->delete_permanently_by_ID( $this->ID() );
46
+		return $this->get_model()->delete_permanently_by_ID($this->ID());
47 47
 	}
48 48
 
49 49
 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @param bool $delete true=>delete, false=>restore
54 54
 	 * @return bool
55 55
 	 */
56
-	public function delete_or_restore( $delete = TRUE ) {
56
+	public function delete_or_restore($delete = TRUE) {
57 57
 		$model = $this->get_model();
58
-		return $model->delete_or_restore_by_ID( $delete, $this->ID() );
58
+		return $model->delete_or_restore_by_ID($delete, $this->ID());
59 59
 	}
60 60
 
61 61
 
@@ -65,6 +65,6 @@  discard block
 block discarded – undo
65 65
 	 * @return boolean
66 66
 	 */
67 67
 	public function restore() {
68
-		return $this->delete_or_restore( FALSE );
68
+		return $this->delete_or_restore(FALSE);
69 69
 	}
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,18 +2,18 @@
 block discarded – undo
2 2
 	exit( 'No direct script access allowed' );
3 3
 }
4 4
 /**
5
- * Event Espresso
6
- *
7
- * Event Registration and Management Plugin for WordPress
8
- *
9
- * @ package 		Event Espresso
10
- * @ author 		Event Espresso
11
- * @ copyright 	(c) 2008-2011 Event Espresso  All Rights Reserved.
12
- * @ license 		{@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
13
- * @ link 				{@link http://www.eventespresso.com}
14
- * @ since 			4.0
15
- *
16
- */
5
+	 * Event Espresso
6
+	 *
7
+	 * Event Registration and Management Plugin for WordPress
8
+	 *
9
+	 * @ package 		Event Espresso
10
+	 * @ author 		Event Espresso
11
+	 * @ copyright 	(c) 2008-2011 Event Espresso  All Rights Reserved.
12
+	 * @ license 		{@link http://eventespresso.com/support/terms-conditions/}   * see Plugin Licensing *
13
+	 * @ link 				{@link http://www.eventespresso.com}
14
+	 * @ since 			4.0
15
+	 *
16
+	 */
17 17
 
18 18
 
19 19
 
Please login to merge, or discard this patch.