Index: src/wp-admin/install-helper.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/wp-admin/install-helper.php	(revision b57b486d96bf75d569d7e86e9c844ec1f4b7a024)
+++ src/wp-admin/install-helper.php	(date 1523627079000)
@@ -56,8 +56,13 @@
 				return true;
 			}
 		}
-		// Didn't find it, so try to create it.
-		$wpdb->query( $create_ddl );
+		/*
+		 * Didn't find it, so try to create it.
+		 *
+		 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because there are no
+		 * variables applicable here.
+		 */
+		$wpdb->query( $create_ddl ); // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
 
 		// We cannot directly tell that whether this succeeded!
 		foreach ( $wpdb->get_col( 'SHOW TABLES', 0 ) as $table ) {
@@ -84,19 +89,33 @@
 	 */
 	function maybe_add_column( $table_name, $column_name, $create_ddl ) {
 		global $wpdb;
-		foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) {
 
-			if ( $column == $column_name ) {
+		/*
+		 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because this statement cannot be prepared,
+		 * it fetches the columns for a table name, which cannot be quoted.
+		 */
+		foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) { // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
+			if ( $column === $column_name ) {
 				return true;
 			}
 		}
 
-		// Didn't find it, so try to create it.
-		$wpdb->query( $create_ddl );
+		/*
+		 * Didn't find it, so try to create it.
+		 *
+		 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because there
+		 * are no variables applicable for this query.
+		 */
+		$wpdb->query( $create_ddl ); // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
 
-		// We cannot directly tell that whether this succeeded!
-		foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) {
-			if ( $column == $column_name ) {
+		/*
+		 * We cannot directly tell that whether this succeeded!
+		 *
+		 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because this statement cannot be prepared,
+		 * it fetches the columns for a table name, which cannot be quoted.
+		 */
+		foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) { // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
+			if ( $column === $column_name ) {
 				return true;
 			}
 		}
@@ -118,15 +137,30 @@
  */
 function maybe_drop_column( $table_name, $column_name, $drop_ddl ) {
 	global $wpdb;
-	foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) {
-		if ( $column == $column_name ) {
 
-			// Found it, so try to drop it.
-			$wpdb->query( $drop_ddl );
+	/*
+	 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because this statement cannot be prepared,
+	 * it fetches the columns for a table name, which cannot be quoted.
+	 */
+	foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) { // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
+		if ( $column === $column_name ) {
 
-			// We cannot directly tell that whether this succeeded!
-			foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) {
-				if ( $column == $column_name ) {
+			/*
+			 * Found it, so try to drop it.
+			 *
+			 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because there are no attributes
+			 * relevant for this query.
+			 */
+			$wpdb->query( $drop_ddl ); // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
+
+			/*
+			 * We cannot directly tell that whether this succeeded!
+			 *
+			 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because this statement cannot be prepared,
+			 * it fetches the columns for a table name, which cannot be quoted.
+			 */
+			foreach ( $wpdb->get_col( "DESC $table_name", 0 ) as $column ) { // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
+				if ( $column === $column_name ) {
 					return false;
 				}
 			}
@@ -167,27 +201,40 @@
  */
 function check_column( $table_name, $col_name, $col_type, $is_null = null, $key = null, $default = null, $extra = null ) {
 	global $wpdb;
+
+	/*
+	 * The phpcs ignore (WordPress.WP.PreparedSQL.NotPrepared) has been added because this statement cannot be prepared,
+	 * it fetches the columns for a table name, which cannot be quoted.
+	 */
+	$results = $wpdb->get_results( "DESC $table_name" ); // phpcs:ignore WordPress.WP.PreparedSQL.NotPrepared
 	$diffs   = 0;
-	$results = $wpdb->get_results( "DESC $table_name" );
 
 	foreach ( $results as $row ) {
 
-		if ( $row->Field == $col_name ) {
+		// The results are named via SQL standards, thus the capital letter cannot be resolved otherwise.
+		$result_field   = $row->Field; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+		$result_type    = $row->Type; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+		$result_null    = $row->Null; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+		$result_key     = $row->Key; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+		$result_default = $row->Default; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+		$result_extra   = $row->Extra; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
+
+		if ( $result_field == $col_name ) {
 
 			// Got our column, check the params.
-			if ( ( $col_type != null ) && ( $row->Type != $col_type ) ) {
+			if ( ( null !== $col_type ) && ( $result_type != $col_type ) ) {
 				++$diffs;
 			}
-			if ( ( $is_null != null ) && ( $row->Null != $is_null ) ) {
+			if ( ( null !== $is_null ) && ( $result_null != $is_null ) ) {
 				++$diffs;
 			}
-			if ( ( $key != null ) && ( $row->Key != $key ) ) {
+			if ( ( null !== $key ) && ( $result_key != $key ) ) {
 				++$diffs;
 			}
-			if ( ( $default != null ) && ( $row->Default != $default ) ) {
+			if ( ( null !== $default ) && ( $result_default != $default ) ) {
 				++$diffs;
 			}
-			if ( ( $extra != null ) && ( $row->Extra != $extra ) ) {
+			if ( ( null !== $extra ) && ( $result_extra != $extra ) ) {
 				++$diffs;
 			}
 			if ( $diffs > 0 ) {
