Passed
Push — master ( 66df2e...d26ef1 )
by Paul
03:43
created
plugin/Controllers/ListTableController.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
 	{
55 55
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
56 56
 		foreach( $postTypeColumns as $key => &$value ) {
57
-			if( !array_key_exists( $key, $columns ) || !empty( $value ))continue;
57
+			if( !array_key_exists( $key, $columns ) || !empty( $value )) {
58
+				continue;
59
+			}
58 60
 			$value = $columns[$key];
59 61
 		}
60 62
 		if( count( glsr( Database::class )->getReviewsMeta( 'type' )) < 2 ) {
@@ -111,7 +113,9 @@  discard block
 block discarded – undo
111 113
 		$postTypeColumns = glsr()->postTypeColumns[Application::POST_TYPE];
112 114
 		unset( $postTypeColumns['cb'] );
113 115
 		foreach( $postTypeColumns as $key => $value ) {
114
-			if( glsr( Helper::class )->startsWith( 'taxonomy', $key ))continue;
116
+			if( glsr( Helper::class )->startsWith( 'taxonomy', $key )) {
117
+				continue;
118
+			}
115 119
 			$columns[$key] = $key;
116 120
 		}
117 121
 		return $columns;
@@ -135,7 +139,9 @@  discard block
 block discarded – undo
135 139
 				'Pending' => __( 'Unapproved', 'site-reviews' ),
136 140
 			];
137 141
 			foreach( $strings as $search => $replace ) {
138
-				if( strpos( $single, $search ) === false )continue;
142
+				if( strpos( $single, $search ) === false ) {
143
+					continue;
144
+				}
139 145
 				$translation = $this->getTranslation([
140 146
 					'number' => $number,
141 147
 					'plural' => str_replace( $search, $replace, $plural ),
@@ -186,7 +192,9 @@  discard block
 block discarded – undo
186 192
 	 */
187 193
 	public function saveBulkEditFields( $postId )
188 194
 	{
189
-		if( !current_user_can( 'edit_posts' ))return;
195
+		if( !current_user_can( 'edit_posts' )) {
196
+			return;
197
+		}
190 198
 		$assignedTo = filter_input( INPUT_GET, 'assigned_to' );
191 199
 		if( $assignedTo && get_post( $assignedTo )) {
192 200
 			update_post_meta( $postId, 'assigned_to', $assignedTo );
@@ -199,7 +207,9 @@  discard block
 block discarded – undo
199 207
 	 */
200 208
 	public function setQueryForColumn( WP_Query $query )
201 209
 	{
202
-		if( !$this->hasPermission( $query ))return;
210
+		if( !$this->hasPermission( $query )) {
211
+			return;
212
+		}
203 213
 		$this->setMetaQuery( $query, [
204 214
 			'rating', 'review_type',
205 215
 		]);
@@ -270,7 +280,9 @@  discard block
 block discarded – undo
270 280
 	protected function setMetaQuery( WP_Query $query, array $metaKeys )
271 281
 	{
272 282
 		foreach( $metaKeys as $key ) {
273
-			if( !( $value = filter_input( INPUT_GET, $key )))continue;
283
+			if( !( $value = filter_input( INPUT_GET, $key ))) {
284
+				continue;
285
+			}
274 286
 			$metaQuery = (array)$query->get( 'meta_query' );
275 287
 			$metaQuery[] = [
276 288
 				'key' => $key,
Please login to merge, or discard this patch.