Completed
Push — master ( e6493a...80733a )
by Zack
25:25 queued 12:31
created
future/includes/class-gv-oembed.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		wp_embed_register_handler( 'gravityview_entry', self::get_entry_regex(), array( __CLASS__, 'render' ), 20000 );
27 27
 		wp_oembed_add_provider( self::get_entry_regex(), self::$provider_url, true );
28 28
 
29
-		if ( ! empty( $_GET['gv_oembed_provider'] ) && ! empty( $_GET['url'] ) ) {
29
+		if ( ! empty( $_GET[ 'gv_oembed_provider' ] ) && ! empty( $_GET[ 'url' ] ) ) {
30 30
 			add_action( 'template_redirect', array( __CLASS__, 'render_provider_request' ) );
31 31
 		}
32 32
 
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
 	 * @return void
44 44
 	 */
45 45
 	public static function render_provider_request() {
46
-		if ( ! empty( $_GET['url'] ) ) {
47
-			$url = $_GET['url'];
46
+		if ( ! empty( $_GET[ 'url' ] ) ) {
47
+			$url = $_GET[ 'url' ];
48 48
 		} else {
49 49
 			header( 'HTTP/1.0 404 Not Found' );
50 50
 			exit;
@@ -111,18 +111,18 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	private static function parse_matches( $matches, $url ) {
113 113
 		// If not using permalinks, re-assign values for matching groups
114
-		if ( ! empty( $matches['entry_slug2'] ) ) {
115
-			$matches['is_cpt'] = $matches['is_cpt2'];
116
-			$matches['slug'] = $matches['slug2'];
117
-			$matches['entry_slug'] = $matches['entry_slug2'];
118
-			unset( $matches['is_cpt2'], $matches['slug2'], $matches['entry_slug2'] );
114
+		if ( ! empty( $matches[ 'entry_slug2' ] ) ) {
115
+			$matches[ 'is_cpt' ] = $matches[ 'is_cpt2' ];
116
+			$matches[ 'slug' ] = $matches[ 'slug2' ];
117
+			$matches[ 'entry_slug' ] = $matches[ 'entry_slug2' ];
118
+			unset( $matches[ 'is_cpt2' ], $matches[ 'slug2' ], $matches[ 'entry_slug2' ] );
119 119
 		}
120 120
 
121
-		if ( empty( $matches['entry_slug'] ) ) {
121
+		if ( empty( $matches[ 'entry_slug' ] ) ) {
122 122
 			gravityview()->log->error( 'Entry slug not parsed by regex.', array( 'data' => $matches ) );
123 123
 			return null;
124 124
 		} else {
125
-			$entry_id = $matches['entry_slug'];
125
+			$entry_id = $matches[ 'entry_slug' ];
126 126
 		}
127 127
 
128 128
 		if ( ! $entry = \GV\GF_Entry::by_id( $entry_id ) ) {
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 		if ( ! $view ) {
141 141
 
142 142
 			// If the slug doesn't work, maybe using Plain permalinks and not the slug, only ID
143
-			if( is_numeric( $matches['slug'] ) ) {
144
-				$view = \GV\View::by_id( $matches['slug'] );
143
+			if ( is_numeric( $matches[ 'slug' ] ) ) {
144
+				$view = \GV\View::by_id( $matches[ 'slug' ] );
145 145
 			}
146 146
 
147
-			if( ! $view ) {
148
-				$view = \GV\View::from_post( get_page_by_path( $matches['slug'], OBJECT, 'gravityview' ) );
147
+			if ( ! $view ) {
148
+				$view = \GV\View::from_post( get_page_by_path( $matches[ 'slug' ], OBJECT, 'gravityview' ) );
149 149
 			}
150 150
 		}
151 151
 
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
 
177 177
 		return '
178 178
 		<div class="loading-placeholder" style="background-color:#e6f0f5;">
179
-			<h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image.$embed_heading.'</h3>
179
+			<h3 style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">'.$image . $embed_heading . '</h3>
180 180
 			<p style="margin:0; padding:0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">
181
-				'.$embed_text.'
181
+				'.$embed_text . '
182 182
 			</p>
183 183
 			<br style="clear: both;">
184 184
 		</div>';
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 	private static function render_preview_notice() {
193 193
 		$floaty = \GravityView_Admin::get_floaty();
194 194
 		$title = esc_html__( 'This will look better when it is embedded.', 'gravityview' );
195
-		$message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview');
196
-		return '<div class="updated notice">'.$floaty.'<h3>'.$title.'</h3><p>'.$message.'</p><br style="clear:both;" /></div>';
195
+		$message = esc_html__( 'Styles don\'t get loaded when being previewed, so the content below will look strange. Don\'t be concerned!', 'gravityview' );
196
+		return '<div class="updated notice">' . $floaty . '<h3>' . $title . '</h3><p>' . $message . '</p><br style="clear:both;" /></div>';
197 197
 	}
198 198
 
199 199
 	/**
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 			return __( 'You are not allowed to view this content.', 'gravityview' );
213 213
 		}
214 214
 
215
-		if ( $entry && 'active' !== $entry['status'] ) {
215
+		if ( $entry && 'active' !== $entry[ 'status' ] ) {
216 216
 			gravityview()->log->notice( 'Entry ID #{entry_id} is not active', array( 'entry_id' => $entry->ID ) );
217 217
 			return __( 'You are not allowed to view this content.', 'gravityview' );
218 218
 		}
219 219
 
220 220
 		if ( $view->settings->get( 'show_only_approved' ) ) {
221
-			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) )  ) {
221
+			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) {
222 222
 				gravityview()->log->error( 'Entry ID #{entry_id} is not approved for viewing', array( 'entry_id' => $entry->ID ) );
223 223
 				return __( 'You are not allowed to view this content.', 'gravityview' );
224 224
 			}
@@ -249,9 +249,9 @@  discard block
 block discarded – undo
249 249
 			 * Mocks old context, etc.
250 250
 			 */
251 251
 			$loader = \GravityView_Edit_Entry::getInstance();
252
-			$render = $loader->instances['render'];
252
+			$render = $loader->instances[ 'render' ];
253 253
 
254
-			$form = \GFAPI::get_form( $entry['form_id'] );
254
+			$form = \GFAPI::get_form( $entry[ 'form_id' ] );
255 255
 
256 256
 			// @todo We really need to rewrite Edit Entry soon
257 257
 			\GravityView_View::$instance = null;
@@ -260,13 +260,13 @@  discard block
 block discarded – undo
260 260
 			$data = \GravityView_View_Data::getInstance( get_post( $view->ID ) );
261 261
 			$template = \GravityView_View::getInstance( array(
262 262
 				'form' => $form,
263
-				'form_id' => $form['id'],
263
+				'form_id' => $form[ 'id' ],
264 264
 				'view_id' => $view->ID,
265 265
 				'entries' => array( $entry->as_entry() ),
266 266
 				'atts' => \GVCommon::get_template_settings( $view->ID ),
267 267
 			) );
268 268
 
269
-			ob_start() && $render->init( $data, \GV\Entry::by_id( $entry['id'] ), $view );
269
+			ob_start() && $render->init( $data, \GV\Entry::by_id( $entry[ 'id' ] ), $view );
270 270
 			$output = ob_get_clean(); // Render :)
271 271
 		} else {
272 272
 			/** Remove the back link. */
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 		// Catch either
311 311
 		$match_regex = "(?:{$using_permalinks}|{$not_using_permalinks})";
312 312
 
313
-		return '#'.$match_regex.'#i';
313
+		return '#' . $match_regex . '#i';
314 314
 	}
315 315
 
316 316
 	/**
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry-locking.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
 		$result = array();
68 68
 		if ( ! $lock_holder_user_id ) {
69 69
 			$this->set_lock( $object_id );
70
-			$result['html']   = __( 'You now have control', 'gravityview' );
71
-			$result['status'] = 'lock_obtained';
70
+			$result[ 'html' ]   = __( 'You now have control', 'gravityview' );
71
+			$result[ 'status' ] = 'lock_obtained';
72 72
 		} else {
73 73
 
74
-			if( GVCommon::has_cap( 'gravityforms_edit_entries' ) ) {
74
+			if ( GVCommon::has_cap( 'gravityforms_edit_entries' ) ) {
75 75
 				$user = get_userdata( $lock_holder_user_id );
76
-				$result['html']   = sprintf( __( 'Your request has been sent to %s.', 'gravityview' ), $user->display_name );
76
+				$result[ 'html' ]   = sprintf( __( 'Your request has been sent to %s.', 'gravityview' ), $user->display_name );
77 77
 			} else {
78
-				$result['html']   = __( 'Your request has been sent.', 'gravityview' );
78
+				$result[ 'html' ]   = __( 'Your request has been sent.', 'gravityview' );
79 79
 			}
80 80
 
81 81
 			$this->update_lock_request_meta( $object_id, $user_id );
82 82
 
83
-			$result['status'] = 'lock_requested';
83
+			$result[ 'status' ] = 'lock_requested';
84 84
 		}
85 85
 
86 86
 		return $result;
@@ -122,19 +122,19 @@  discard block
 block discarded – undo
122 122
 		$continue_enqueuing = false;
123 123
 
124 124
 		// If any Views being loaded have entry locking, enqueue the scripts
125
-		foreach( $views->all() as $view ) {
125
+		foreach ( $views->all() as $view ) {
126 126
 
127 127
 			// Make sure the View has edit locking enabled
128
-			if( ! $view->settings->get( 'edit_locking' ) ) {
128
+			if ( ! $view->settings->get( 'edit_locking' ) ) {
129 129
 				continue;
130 130
 			}
131 131
 
132 132
 			// Make sure that the entry belongs to one of the forms connected to one of the Views in this request
133 133
 			$joined_forms = $view::get_joined_forms( $view->ID );
134 134
 
135
-			$entry_form_id = $entry_array['form_id'];
135
+			$entry_form_id = $entry_array[ 'form_id' ];
136 136
 
137
-			if( ! isset( $joined_forms[ $entry_form_id ] ) ) {
137
+			if ( ! isset( $joined_forms[ $entry_form_id ] ) ) {
138 138
 				continue;
139 139
 			}
140 140
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			break;
144 144
 		}
145 145
 
146
-		if( ! $continue_enqueuing ) {
146
+		if ( ! $continue_enqueuing ) {
147 147
 			return;
148 148
 		}
149 149
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	protected function enqueue_scripts( $entry ) {
165 165
 
166
-		$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET['gform_debug'] ) ? '' : '.min';
166
+		$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || isset( $_GET[ 'gform_debug' ] ) ? '' : '.min';
167 167
 		$locking_path = GFCommon::get_base_url() . '/includes/locking/';
168 168
 
169 169
 		wp_enqueue_script( 'gforms_locking', $locking_path . "js/locking{$min}.js", array( 'jquery', 'heartbeat' ), GFCommon::$version );
@@ -172,20 +172,20 @@  discard block
 block discarded – undo
172 172
 		$translations = array_map( 'wp_strip_all_tags', $this->get_strings() );
173 173
 
174 174
 		$strings = array(
175
-			'noResponse'    => $translations['no_response'],
176
-			'requestAgain'  => $translations['request_again'],
177
-			'requestError'  => $translations['request_error'],
178
-			'gainedControl' => $translations['gained_control'],
179
-			'rejected'      => $translations['request_rejected'],
180
-			'pending'       => $translations['request_pending'],
175
+			'noResponse'    => $translations[ 'no_response' ],
176
+			'requestAgain'  => $translations[ 'request_again' ],
177
+			'requestError'  => $translations[ 'request_error' ],
178
+			'gainedControl' => $translations[ 'gained_control' ],
179
+			'rejected'      => $translations[ 'request_rejected' ],
180
+			'pending'       => $translations[ 'request_pending' ],
181 181
 		);
182 182
 
183
-		$lock_user_id = $this->check_lock( $entry['id'] );
183
+		$lock_user_id = $this->check_lock( $entry[ 'id' ] );
184 184
 
185 185
 		$vars = array(
186 186
 			'hasLock'    => ! $lock_user_id ? 1 : 0,
187 187
 			'lockUI'     => $this->get_lock_ui( $lock_user_id ),
188
-			'objectID'   => $entry['id'],
188
+			'objectID'   => $entry[ 'id' ],
189 189
 			'objectType' => 'entry',
190 190
 			'strings'    => $strings,
191 191
 		);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		$hidden = $locked ? '' : ' hidden';
216 216
 		if ( $locked ) {
217 217
 
218
-			if( GVCommon::has_cap( 'gravityforms_edit_entries' ) ) {
218
+			if ( GVCommon::has_cap( 'gravityforms_edit_entries' ) ) {
219 219
 				$avatar = get_avatar( $user->ID, 64 );
220 220
 				$person_editing_text = $user->display_name;
221 221
 			} else {
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
 
323 323
 		$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
324 324
 
325
-		if ( isset( $_GET['get-edit-lock'] ) ) {
325
+		if ( isset( $_GET[ 'get-edit-lock' ] ) ) {
326 326
 			$this->set_lock( $entry_id );
327 327
 			echo '<script>window.location = ' . json_encode( remove_query_arg( 'get-edit-lock', $current_url ) ) . ';</script>';
328 328
 			exit();
329
-		} else if ( isset( $_GET['release-edit-lock'] ) ) {
329
+		} else if ( isset( $_GET[ 'release-edit-lock' ] ) ) {
330 330
 			$this->delete_lock_meta( $entry_id );
331 331
 			$current_url = remove_query_arg( 'edit', $current_url );
332 332
 			echo '<script>window.location = ' . json_encode( remove_query_arg( 'release-edit-lock', $current_url ) ) . ';</script>';
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-hidden.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	function edit_entry_fix_hidden_fields( $fields ) {
50 50
 
51 51
 		/** @var GF_Field $field */
52
-		foreach( $fields as &$field ) {
52
+		foreach ( $fields as &$field ) {
53 53
 
54 54
 			if ( 'hidden' === $field->type ) {
55 55
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				 */
63 63
 				$reveal_hidden_field = apply_filters( 'gravityview/edit_entry/reveal_hidden_field', false, $field );
64 64
 
65
-				if( ! $reveal_hidden_field ) {
65
+				if ( ! $reveal_hidden_field ) {
66 66
 					continue;
67 67
 				}
68 68
 
Please login to merge, or discard this patch.
includes/class-gravityview-admin-bar.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 		/** @var WP_Admin_Bar $wp_admin_bar */
39 39
 		global $wp_admin_bar;
40 40
 
41
-		if( is_admin() || ! GVCommon::has_cap( array( 'edit_gravityviews', 'gravityview_edit_entry', 'gravityforms_edit_forms' ) ) ) {
41
+		if ( is_admin() || ! GVCommon::has_cap( array( 'edit_gravityviews', 'gravityview_edit_entry', 'gravityforms_edit_forms' ) ) ) {
42 42
 			return;
43 43
 		}
44 44
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				'meta' => array(
104 104
 					'title' => sprintf( __( 'Edit Entry %s', 'gravityview' ), $entry->get_slug() ),
105 105
 				),
106
-				'href' => esc_url_raw( admin_url( sprintf( 'admin.php?page=gf_entries&amp;screen_mode=edit&amp;view=entry&amp;id=%d&lid=%d', $entry['form_id'], $entry['id'] ) ) ),
106
+				'href' => esc_url_raw( admin_url( sprintf( 'admin.php?page=gf_entries&amp;screen_mode=edit&amp;view=entry&amp;id=%d&lid=%d', $entry[ 'form_id' ], $entry[ 'id' ] ) ) ),
107 107
 			) );
108 108
 
109 109
 		}
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		/** @var WP_Admin_Bar $wp_admin_bar */
120 120
 		global $wp_admin_bar;
121 121
 
122
-		if( GVCommon::has_cap( array( 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ) ) ) {
122
+		if ( GVCommon::has_cap( array( 'edit_gravityviews', 'edit_gravityview', 'gravityforms_edit_forms' ) ) ) {
123 123
 
124 124
 			$view_data = GravityView_View_Data::getInstance();
125 125
 			$views = $view_data->get_views();
@@ -131,21 +131,21 @@  discard block
 block discarded – undo
131 131
 				$added_views = array();
132 132
 
133 133
 				foreach ( $views as $view ) {
134
-					$view = \GV\View::by_id( $view['id'] );
134
+					$view = \GV\View::by_id( $view[ 'id' ] );
135 135
 					$view_id = $view->ID;
136 136
 					$form_id = $view->form ? $view->form->ID : null;
137 137
 
138 138
 					$edit_view_title = __( 'Edit View', 'gravityview' );
139 139
 					$edit_form_title = __( 'Edit Form', 'gravityview' );
140 140
 
141
-					if( sizeof( $views ) > 1 ) {
141
+					if ( sizeof( $views ) > 1 ) {
142 142
 						$edit_view_title = sprintf( _x( 'Edit View #%d', 'Edit View with the ID of %d', 'gravityview' ), $view_id );
143 143
 						$edit_form_title = sprintf( __( 'Edit Form #%d', 'Edit Form with the ID of %d', 'gravityview' ), $form_id );
144 144
 					}
145 145
 
146
-					if( GVCommon::has_cap( 'edit_gravityview', $view_id ) && ! in_array( $view_id, $added_views ) ) {
146
+					if ( GVCommon::has_cap( 'edit_gravityview', $view_id ) && ! in_array( $view_id, $added_views ) ) {
147 147
 
148
-						$added_views[] = $view_id;
148
+						$added_views[ ] = $view_id;
149 149
 
150 150
 						$wp_admin_bar->add_menu( array(
151 151
 							'id'    => 'edit-view-' . $view_id,
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 						) );
156 156
 					}
157 157
 
158
-					if ( ! empty( $form_id ) && GVCommon::has_cap( array( 'gravityforms_edit_forms' ), $form_id ) && ! in_array( $form_id, $added_forms )  ) {
158
+					if ( ! empty( $form_id ) && GVCommon::has_cap( array( 'gravityforms_edit_forms' ), $form_id ) && ! in_array( $form_id, $added_forms ) ) {
159 159
 
160
-						$added_forms[] = $form_id;
160
+						$added_forms[ ] = $form_id;
161 161
 
162 162
 						$wp_admin_bar->add_menu( array(
163 163
 							'id'    => 'edit-form-' . $form_id,
Please login to merge, or discard this patch.
future/includes/class-gv-entry.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		$args = array();
115 115
 
116
-		$view_id = is_null ( $view ) ? null : $view->ID;
116
+		$view_id = is_null( $view ) ? null : $view->ID;
117 117
 
118 118
 		$permalink = null;
119 119
 
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 
127 127
 				$view_collection = View_Collection::from_post( $post );
128 128
 
129
-				if( 1 < $view_collection->count() ) {
130
-					$args['gvid'] = $view_id;
129
+				if ( 1 < $view_collection->count() ) {
130
+					$args[ 'gvid' ] = $view_id;
131 131
 				}
132 132
 			}
133 133
 		}
@@ -157,21 +157,21 @@  discard block
 block discarded – undo
157 157
 			 */
158 158
 			$link_parts = explode( '?', $permalink );
159 159
 
160
-			$query = ! empty( $link_parts[1] ) ? '?' . $link_parts[1] : '';
160
+			$query = ! empty( $link_parts[ 1 ] ) ? '?' . $link_parts[ 1 ] : '';
161 161
 
162
-			$permalink = trailingslashit( $link_parts[0] ) . $entry_endpoint_name . '/'. $entry_slug .'/' . $query;
162
+			$permalink = trailingslashit( $link_parts[ 0 ] ) . $entry_endpoint_name . '/' . $entry_slug . '/' . $query;
163 163
 		} else {
164 164
 			$args[ $entry_endpoint_name ] = $entry_slug;
165 165
 		}
166 166
 
167 167
 		if ( $track_directory ) {
168
-			if ( ! empty( $_GET['pagenum'] ) ) {
169
-				$args['pagenum'] = intval( $_GET['pagenum'] );
168
+			if ( ! empty( $_GET[ 'pagenum' ] ) ) {
169
+				$args[ 'pagenum' ] = intval( $_GET[ 'pagenum' ] );
170 170
 			}
171 171
 
172 172
 			if ( $sort = Utils::_GET( 'sort' ) ) {
173
-				$args['sort'] = $sort;
174
-				$args['dir'] = Utils::_GET( 'dir' );
173
+				$args[ 'sort' ] = $sort;
174
+				$args[ 'dir' ] = Utils::_GET( 'dir' );
175 175
 			}
176 176
 		}
177 177
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$entry_slug = \GravityView_API::get_entry_slug( $this->ID, $this->as_entry() );
211 211
 
212
-		if( ! $apply_filter ) {
212
+		if ( ! $apply_filter ) {
213 213
 			return $entry_slug;
214 214
 		}
215 215
 
Please login to merge, or discard this patch.
future/includes/class-gv-entry-gravityforms.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
 	 * @return \GV\GF_Entry|null An instance of this entry or null if not found.
107 107
 	 */
108 108
 	public static function from_entry( $entry ) {
109
-		if ( empty( $entry['id'] ) ) {
109
+		if ( empty( $entry[ 'id' ] ) ) {
110 110
 			return null;
111 111
 		}
112 112
 
113 113
 		$self = new self();
114 114
 		$self->entry = $entry;
115 115
 
116
-		$self->ID = $self->entry['id'];
116
+		$self->ID = $self->entry[ 'id' ];
117 117
 		$self->slug = $self->get_slug();
118 118
 
119 119
 		return $self;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * @return bool Whether the offset exists or not.
129 129
 	 */
130 130
 	public function offsetExists( $offset ) {
131
-		return isset( $this->entry[$offset] );
131
+		return isset( $this->entry[ $offset ] );
132 132
 	}
133 133
 
134 134
 	/**
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * @return mixed The value of the requested entry data.
144 144
 	 */
145 145
 	public function offsetGet( $offset ) {
146
-		return $this->entry[$offset];
146
+		return $this->entry[ $offset ];
147 147
 	}
148 148
 
149 149
 	/**
Please login to merge, or discard this patch.