diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 60ef2d7..73e6bd8 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -1605,7 +1605,7 @@ function install_download_additional_translations_operations(&$install_state) {
   // should download/import translations.
   $languages = \Drupal::languageManager()->getLanguages();
   $operations = array();
-  foreach($languages as $langcode => $language) {
+  foreach ($languages as $langcode => $language) {
     // The installer language was already downloaded. Check downloads for the
     // other languages if any. Ignore any download errors here, since we
     // are in the middle of an install process and there is no way back. We
diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php
index f673752..e6a574f 100644
--- a/core/lib/Drupal/Component/Gettext/PoItem.php
+++ b/core/lib/Drupal/Component/Gettext/PoItem.php
@@ -186,7 +186,7 @@ public function setFromArray(array $values = array()) {
     if (isset($values['translation'])) {
       $this->setTranslation($values['translation']);
     }
-    if (isset($values['comment'])){
+    if (isset($values['comment'])) {
       $this->setComment($values['comment']);
     }
     if (isset($this->_source) &&
diff --git a/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php b/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
index d75a897..bb55f66 100644
--- a/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
+++ b/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
@@ -97,7 +97,8 @@ public function build($class_name, $proxy_class_name = '') {
         // class.
         if ($parent_interfaces = $interface->getInterfaceNames()) {
           foreach ($parent_interfaces as $parent_interface) {
-            if (isset($interfaces[$parent_interface])) {}
+            if (isset($interfaces[$parent_interface])) {
+}
             unset($interfaces[$parent_interface]);
           }
         }
diff --git a/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php b/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php
index ab09ceb..44bc469 100644
--- a/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php
+++ b/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php
@@ -95,7 +95,7 @@ public function removeDiacritics($string) {
       $replacement = $character;
       if (($range1 && !in_array($code, $exclusions_range1)) || ($range2 && !in_array($code, $exclusions_range2))) {
         $to_add = $this->lookupReplacement($code, 'xyz');
-        if(strlen($to_add) === 1) {
+        if (strlen($to_add) === 1) {
           $replacement = $to_add;
         }
       }
diff --git a/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php
index 356eefd..939bf73 100644
--- a/core/lib/Drupal/Component/Utility/Random.php
+++ b/core/lib/Drupal/Component/Utility/Random.php
@@ -154,7 +154,7 @@ public function word($length) {
     $num_cons = count($cons);
     $word = '';
 
-    while(strlen($word) < $length){
+    while (strlen($word) < $length) {
       $word .= $cons[mt_rand(0, $num_cons - 1)] . $vowels[mt_rand(0, $num_vowels - 1)];
     }
 
diff --git a/core/lib/Drupal/Component/Utility/UserAgent.php b/core/lib/Drupal/Component/Utility/UserAgent.php
index 6a3b238..3410887 100644
--- a/core/lib/Drupal/Component/Utility/UserAgent.php
+++ b/core/lib/Drupal/Component/Utility/UserAgent.php
@@ -127,8 +127,7 @@ public static function getBestMatchingLangcode($http_accept_language, $langcodes
           $qvalue = $ua_langcodes[$prefix];
           break;
         }
-      }
-      while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
+      } while ($prefix = substr($prefix, 0, strrpos($prefix, '-')));
 
       // Find the best match.
       if ($qvalue > $max_qvalue) {
diff --git a/core/lib/Drupal/Core/Archiver/ArchiveTar.php b/core/lib/Drupal/Core/Archiver/ArchiveTar.php
index ecd7f25..310d46a 100644
--- a/core/lib/Drupal/Core/Archiver/ArchiveTar.php
+++ b/core/lib/Drupal/Core/Archiver/ArchiveTar.php
@@ -68,7 +68,8 @@
 // Drupal addition OS_WINDOWS as defined in PEAR.php.
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     define('OS_WINDOWS', true);
-} else {
+}
+else {
     define('OS_WINDOWS', false);
 }
 
@@ -181,45 +182,54 @@ public function __construct($p_tarname, $p_compress = null)
                         $this->_compress = true;
                         $this->_compress_type = 'gz';
                         // No sure it's enought for a magic code ....
-                    } elseif ($data == "BZ") {
+                    }
+elseif ($data == "BZ") {
                         $this->_compress = true;
                         $this->_compress_type = 'bz2';
-                    } elseif (file_get_contents($p_tarname, false, null, 1, 4) == '7zXZ') {
+                    }
+elseif (file_get_contents($p_tarname, false, null, 1, 4) == '7zXZ') {
                         $this->_compress = true;
                         $this->_compress_type = 'lzma2';
                     }
                 }
-            } else {
+            }
+else {
                 // probably a remote file or some file accessible
                 // through a stream interface
                 if (substr($p_tarname, -2) == 'gz') {
                     $this->_compress = true;
                     $this->_compress_type = 'gz';
-                } elseif ((substr($p_tarname, -3) == 'bz2') ||
+                }
+elseif ((substr($p_tarname, -3) == 'bz2') ||
                     (substr($p_tarname, -2) == 'bz')
                 ) {
                     $this->_compress = true;
                     $this->_compress_type = 'bz2';
-                } else {
+                }
+else {
                     if (substr($p_tarname, -2) == 'xz') {
                         $this->_compress = true;
                         $this->_compress_type = 'lzma2';
                     }
                 }
             }
-        } else {
+        }
+else {
             if (($p_compress === true) || ($p_compress == 'gz')) {
                 $this->_compress = true;
                 $this->_compress_type = 'gz';
-            } else {
+            }
+else {
                 if ($p_compress == 'bz2') {
                     $this->_compress = true;
                     $this->_compress_type = 'bz2';
-                } else {
+                }
+else {
                     if ($p_compress == 'lzma2') {
                         $this->_compress = true;
                         $this->_compress_type = 'lzma2';
-                    } else {
+                    }
+else {
                         $this->_error(
                             "Unsupported compression type '$p_compress'\n" .
                             "Supported types are 'gz', 'bz2' and 'lzma2'.\n"
@@ -230,13 +240,16 @@ public function __construct($p_tarname, $p_compress = null)
             }
         }
         $this->_tarname = $p_tarname;
-        if ($this->_compress) { // assert zlib or bz2 or xz extension support
+        if ($this->_compress) {
+// assert zlib or bz2 or xz extension support
             if ($this->_compress_type == 'gz') {
                 $extname = 'zlib';
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'bz2') {
                     $extname = 'bz2';
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'lzma2') {
                         $extname = 'xz';
                     }
@@ -292,13 +305,17 @@ function_exists('dl') === false ||
 
         if (OS_WINDOWS) {
             $suffix = '.dll';
-        } elseif (PHP_OS == 'HP-UX') {
+        }
+elseif (PHP_OS == 'HP-UX') {
             $suffix = '.sl';
-        } elseif (PHP_OS == 'AIX') {
+        }
+elseif (PHP_OS == 'AIX') {
             $suffix = '.a';
-        } elseif (PHP_OS == 'OSX') {
+        }
+elseif (PHP_OS == 'OSX') {
             $suffix = '.bundle';
-        } else {
+        }
+else {
             $suffix = '.so';
         }
 
@@ -427,9 +444,11 @@ public function createModify($p_filelist, $p_add_dir, $p_remove_dir = '')
         if ($p_filelist != '') {
             if (is_array($p_filelist)) {
                 $v_list = $p_filelist;
-            } elseif (is_string($p_filelist)) {
+            }
+elseif (is_string($p_filelist)) {
                 $v_list = explode($this->_separator, $p_filelist);
-            } else {
+            }
+else {
                 $this->_cleanFile();
                 $this->_error('Invalid file list');
                 return false;
@@ -441,7 +460,8 @@ public function createModify($p_filelist, $p_add_dir, $p_remove_dir = '')
         if ($v_result) {
             $this->_writeFooter();
             $this->_close();
-        } else {
+        }
+else {
             $this->_cleanFile();
         }
 
@@ -498,12 +518,15 @@ public function addModify($p_filelist, $p_add_dir, $p_remove_dir = '')
                 $p_add_dir,
                 $p_remove_dir
             );
-        } else {
+        }
+else {
             if (is_array($p_filelist)) {
                 $v_list = $p_filelist;
-            } elseif (is_string($p_filelist)) {
+            }
+elseif (is_string($p_filelist)) {
                 $v_list = explode($this->_separator, $p_filelist);
-            } else {
+            }
+else {
                 $this->_error('Invalid file list');
                 return false;
             }
@@ -638,7 +661,8 @@ public function extractInString($p_filename)
         if ($this->_openRead()) {
             $v_result = $this->_extractInString($p_filename);
             $this->_close();
-        } else {
+        }
+else {
             $v_result = null;
         }
 
@@ -672,9 +696,11 @@ public function extractList($p_filelist, $p_path = '', $p_remove_path = '', $p_p
 
         if (is_array($p_filelist)) {
             $v_list = $p_filelist;
-        } elseif (is_string($p_filelist)) {
+        }
+elseif (is_string($p_filelist)) {
             $v_list = explode($this->_separator, $p_filelist);
-        } else {
+        }
+else {
             $this->_error('Invalid string list');
             return false;
         }
@@ -813,16 +839,20 @@ public function _openWrite()
     {
         if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
             $this->_file = @gzopen($this->_tarname, "wb9");
-        } else {
+        }
+else {
             if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
                 $this->_file = @bzopen($this->_tarname, "w");
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
                     $this->_file = @xzopen($this->_tarname, 'w');
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'none') {
                         $this->_file = @fopen($this->_tarname, "wb");
-                    } else {
+                    }
+else {
                         $this->_error(
                             'Unknown or missing compression type ('
                             . $this->_compress_type . ')'
@@ -879,7 +909,8 @@ public function _openRead()
 
             // ----- File to open if the local copy
             $v_filename = $this->_temp_tarname;
-        } else {
+        }
+else {
             // ----- File to open if the normal Tar file
 
             $v_filename = $this->_tarname;
@@ -887,16 +918,20 @@ public function _openRead()
 
         if ($this->_compress_type == 'gz' && function_exists('gzopen')) {
             $this->_file = @gzopen($v_filename, "rb");
-        } else {
+        }
+else {
             if ($this->_compress_type == 'bz2' && function_exists('bzopen')) {
                 $this->_file = @bzopen($v_filename, "r");
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'lzma2' && function_exists('xzopen')) {
                     $this->_file = @xzopen($v_filename, "r");
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'none') {
                         $this->_file = @fopen($v_filename, "rb");
-                    } else {
+                    }
+else {
                         $this->_error(
                             'Unknown or missing compression type ('
                             . $this->_compress_type . ')'
@@ -922,24 +957,28 @@ public function _openReadWrite()
     {
         if ($this->_compress_type == 'gz') {
             $this->_file = @gzopen($this->_tarname, "r+b");
-        } else {
+        }
+else {
             if ($this->_compress_type == 'bz2') {
                 $this->_error(
                     'Unable to open bz2 in read/write mode \''
                     . $this->_tarname . '\' (limitation of bz2 extension)'
                 );
                 return false;
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'lzma2') {
                     $this->_error(
                         'Unable to open lzma2 in read/write mode \''
                         . $this->_tarname . '\' (limitation of lzma2 extension)'
                     );
                     return false;
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'none') {
                         $this->_file = @fopen($this->_tarname, "r+b");
-                    } else {
+                    }
+else {
                         $this->_error(
                             'Unknown or missing compression type ('
                             . $this->_compress_type . ')'
@@ -970,16 +1009,20 @@ public function _close()
         if (is_resource($this->_file)) {
             if ($this->_compress_type == 'gz') {
                 @gzclose($this->_file);
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'bz2') {
                     @bzclose($this->_file);
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'lzma2') {
                         @xzclose($this->_file);
-                    } else {
+                    }
+else {
                         if ($this->_compress_type == 'none') {
                             @fclose($this->_file);
-                        } else {
+                        }
+else {
                             $this->_error(
                                 'Unknown or missing compression type ('
                                 . $this->_compress_type . ')'
@@ -1014,7 +1057,8 @@ public function _cleanFile()
             // ----- Remove the local copy but not the remote tarname
             @drupal_unlink($this->_temp_tarname);
             $this->_temp_tarname = '';
-        } else {
+        }
+else {
             // ----- Remove the local tarname file
             @drupal_unlink($this->_tarname);
         }
@@ -1034,16 +1078,20 @@ public function _writeBlock($p_binary_data, $p_len = null)
             if ($p_len === null) {
                 if ($this->_compress_type == 'gz') {
                     @gzputs($this->_file, $p_binary_data);
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'bz2') {
                         @bzwrite($this->_file, $p_binary_data);
-                    } else {
+                    }
+else {
                         if ($this->_compress_type == 'lzma2') {
                             @xzwrite($this->_file, $p_binary_data);
-                        } else {
+                        }
+else {
                             if ($this->_compress_type == 'none') {
                                 @fputs($this->_file, $p_binary_data);
-                            } else {
+                            }
+else {
                                 $this->_error(
                                     'Unknown or missing compression type ('
                                     . $this->_compress_type . ')'
@@ -1052,19 +1100,24 @@ public function _writeBlock($p_binary_data, $p_len = null)
                         }
                     }
                 }
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'gz') {
                     @gzputs($this->_file, $p_binary_data, $p_len);
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'bz2') {
                         @bzwrite($this->_file, $p_binary_data, $p_len);
-                    } else {
+                    }
+else {
                         if ($this->_compress_type == 'lzma2') {
                             @xzwrite($this->_file, $p_binary_data, $p_len);
-                        } else {
+                        }
+else {
                             if ($this->_compress_type == 'none') {
                                 @fputs($this->_file, $p_binary_data, $p_len);
-                            } else {
+                            }
+else {
                                 $this->_error(
                                     'Unknown or missing compression type ('
                                     . $this->_compress_type . ')'
@@ -1087,16 +1140,20 @@ public function _readBlock()
         if (is_resource($this->_file)) {
             if ($this->_compress_type == 'gz') {
                 $v_block = @gzread($this->_file, 512);
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'bz2') {
                     $v_block = @bzread($this->_file, 512);
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'lzma2') {
                         $v_block = @xzread($this->_file, 512);
-                    } else {
+                    }
+else {
                         if ($this->_compress_type == 'none') {
                             $v_block = @fread($this->_file, 512);
-                        } else {
+                        }
+else {
                             $this->_error(
                                 'Unknown or missing compression type ('
                                 . $this->_compress_type . ')'
@@ -1122,22 +1179,26 @@ public function _jumpBlock($p_len = null)
 
             if ($this->_compress_type == 'gz') {
                 @gzseek($this->_file, gztell($this->_file) + ($p_len * 512));
-            } else {
+            }
+else {
                 if ($this->_compress_type == 'bz2') {
                     // ----- Replace missing bztell() and bzseek()
                     for ($i = 0; $i < $p_len; $i++) {
                         $this->_readBlock();
                     }
-                } else {
+                }
+else {
                     if ($this->_compress_type == 'lzma2') {
                         // ----- Replace missing xztell() and xzseek()
                         for ($i = 0; $i < $p_len; $i++) {
                             $this->_readBlock();
                         }
-                    } else {
+                    }
+else {
                         if ($this->_compress_type == 'none') {
                             @fseek($this->_file, $p_len * 512, SEEK_CUR);
-                        } else {
+                        }
+else {
                             $this->_error(
                                 'Unknown or missing compression type ('
                                 . $this->_compress_type . ')'
@@ -1226,7 +1287,8 @@ public function _addList($p_list, $p_add_dir, $p_remove_dir)
                     if (($p_hitem != '.') && ($p_hitem != '..')) {
                         if ($v_filename != ".") {
                             $p_temp_list[0] = $v_filename . '/' . $p_hitem;
-                        } else {
+                        }
+else {
                             $p_temp_list[0] = $p_hitem;
                         }
 
@@ -1290,7 +1352,8 @@ public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_
             if ($p_add_dir != '') {
                 if (substr($p_add_dir, -1) == '/') {
                     $v_stored_filename = $p_add_dir . $v_stored_filename;
-                } else {
+                }
+else {
                     $v_stored_filename = $p_add_dir . '/' . $v_stored_filename;
                 }
             }
@@ -1317,7 +1380,8 @@ public function _addFile($p_filename, &$p_header, $p_add_dir, $p_remove_dir, $v_
             }
 
             fclose($v_file);
-        } else {
+        }
+else {
             // ----- Only header for dir
             if (!$this->_writeHeader($p_filename, $v_stored_filename)) {
                 return false;
@@ -1412,10 +1476,12 @@ public function _writeHeader($p_filename, $p_stored_filename)
             $v_typeflag = '2';
             $v_linkname = readlink($p_filename);
             $v_size = sprintf("%011s", DecOct(0));
-        } elseif (@is_dir($p_filename)) {
+        }
+elseif (@is_dir($p_filename)) {
             $v_typeflag = "5";
             $v_size = sprintf("%011s", DecOct(0));
-        } else {
+        }
+else {
             $v_typeflag = '0';
             clearstatcache();
             $v_size = sprintf("%011s", DecOct($v_info['size']));
@@ -1431,7 +1497,8 @@ public function _writeHeader($p_filename, $p_stored_filename)
 
             $v_uname = $userinfo['name'];
             $v_gname = $groupinfo['name'];
-        } else {
+        }
+else {
             $v_uname = '';
             $v_gname = '';
         }
@@ -1523,7 +1590,8 @@ public function _writeHeaderBlock(
 
         if ($p_type == "5") {
             $v_size = sprintf("%011s", DecOct(0));
-        } else {
+        }
+else {
             $v_size = sprintf("%011s", DecOct($p_size));
         }
 
@@ -1545,7 +1613,8 @@ public function _writeHeaderBlock(
 
             $v_uname = $userinfo['name'];
             $v_gname = $groupinfo['name'];
-        } else {
+        }
+else {
             $v_uname = '';
             $v_gname = '';
         }
@@ -1733,7 +1802,8 @@ public function _readHeader($v_binary_data, &$v_header)
             $fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" .
                 "a8checksum/a1typeflag/a100link/a6magic/a2version/" .
                 "a32uname/a32gname/a8devmajor/a8devminor/a131prefix";
-        } else {
+        }
+else {
             $fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" .
                 "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" .
                 "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix";
@@ -1884,7 +1954,8 @@ private function _extractInString($p_filename)
                         . 'entry {' . $v_header['filename'] . '}'
                     );
                     return null;
-                } else {
+                }
+else {
                     $n = floor($v_header['size'] / 512);
                     for ($i = 0; $i < $n; $i++) {
                         $v_result_str .= $this->_readBlock();
@@ -1899,7 +1970,8 @@ private function _extractInString($p_filename)
                     }
                     return $v_result_str;
                 }
-            } else {
+            }
+else {
                 $this->_jumpBlock(ceil(($v_header['size'] / 512)));
             }
         }
@@ -2003,13 +2075,15 @@ public function _extractList(
                             $v_extract_file = true;
                             break;
                         }
-                    } // ----- It is a file, so compare the file names
+                    }
+// ----- It is a file, so compare the file names
                     elseif ($p_file_list[$i] == $v_header['filename']) {
                         $v_extract_file = true;
                         break;
                     }
                 }
-            } else {
+            }
+else {
                 $v_extract_file = true;
             }
 
@@ -2034,7 +2108,8 @@ public function _extractList(
 
                     if (substr($v_header['filename'], 0, 1) == '/') {
                         $v_header['filename'] = $p_path . $v_header['filename'];
-                    } else {
+                    }
+else {
                         $v_header['filename'] = $p_path . '/' . $v_header['filename'];
                     }
                 }
@@ -2067,7 +2142,8 @@ public function _extractList(
                     if (filemtime($v_header['filename']) > $v_header['mtime']) {
                         // To be completed : An error or silent no replace ?
                     }
-                } // ----- Check the directory availability and create it if necessary
+                }
+// ----- Check the directory availability and create it if necessary
                 elseif (($v_result
                         = $this->_dirCheck(
                         ($v_header['typeflag'] == "5"
@@ -2090,7 +2166,8 @@ public function _extractList(
                                 return false;
                             }
                         }
-                    } elseif ($v_header['typeflag'] == "2") {
+                    }
+elseif ($v_header['typeflag'] == "2") {
                         if (@file_exists($v_header['filename'])) {
                             @drupal_unlink($v_header['filename']);
                         }
@@ -2101,14 +2178,16 @@ public function _extractList(
                             );
                             return false;
                         }
-                    } else {
+                    }
+else {
                         if (($v_dest_file = @fopen($v_header['filename'], "wb")) == 0) {
                             $this->_error(
                                 'Error while opening {' . $v_header['filename']
                                 . '} in write binary mode'
                             );
                             return false;
-                        } else {
+                        }
+else {
                             $n = floor($v_header['size'] / 512);
                             for ($i = 0; $i < $n; $i++) {
                                 $v_content = $this->_readBlock();
@@ -2157,10 +2236,12 @@ public function _extractList(
                             return false;
                         }
                     }
-                } else {
+                }
+else {
                     $this->_jumpBlock(ceil(($v_header['size'] / 512)));
                 }
-            } else {
+            }
+else {
                 $this->_jumpBlock(ceil(($v_header['size'] / 512)));
             }
 
@@ -2215,9 +2296,11 @@ public function _openAppend()
 
             if ($this->_compress_type == 'gz') {
                 $v_temp_tar = @gzopen($this->_tarname . ".tmp", "rb");
-            } elseif ($this->_compress_type == 'bz2') {
+            }
+elseif ($this->_compress_type == 'bz2') {
                 $v_temp_tar = @bzopen($this->_tarname . ".tmp", "r");
-            } elseif ($this->_compress_type == 'lzma2') {
+            }
+elseif ($this->_compress_type == 'lzma2') {
                 $v_temp_tar = @xzopen($this->_tarname . ".tmp", "r");
             }
 
@@ -2246,7 +2329,8 @@ public function _openAppend()
                         // do not copy end blocks, we will re-make them
                         // after appending
                         continue;
-                    } elseif ($end_blocks > 0) {
+                    }
+elseif ($end_blocks > 0) {
                         for ($i = 0; $i < $end_blocks; $i++) {
                             $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
                         }
@@ -2257,7 +2341,8 @@ public function _openAppend()
                 }
 
                 @gzclose($v_temp_tar);
-            } elseif ($this->_compress_type == 'bz2') {
+            }
+elseif ($this->_compress_type == 'bz2') {
                 $end_blocks = 0;
 
                 while (strlen($v_buffer = @bzread($v_temp_tar, 512)) > 0) {
@@ -2266,7 +2351,8 @@ public function _openAppend()
                         // do not copy end blocks, we will re-make them
                         // after appending
                         continue;
-                    } elseif ($end_blocks > 0) {
+                    }
+elseif ($end_blocks > 0) {
                         for ($i = 0; $i < $end_blocks; $i++) {
                             $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
                         }
@@ -2277,7 +2363,8 @@ public function _openAppend()
                 }
 
                 @bzclose($v_temp_tar);
-            } elseif ($this->_compress_type == 'lzma2') {
+            }
+elseif ($this->_compress_type == 'lzma2') {
                 $end_blocks = 0;
 
                 while (strlen($v_buffer = @xzread($v_temp_tar, 512)) > 0) {
@@ -2286,7 +2373,8 @@ public function _openAppend()
                         // do not copy end blocks, we will re-make them
                         // after appending
                         continue;
-                    } elseif ($end_blocks > 0) {
+                    }
+elseif ($end_blocks > 0) {
                         for ($i = 0; $i < $end_blocks; $i++) {
                             $this->_writeBlock(ARCHIVE_TAR_END_BLOCK);
                         }
@@ -2305,7 +2393,8 @@ public function _openAppend()
                     . $this->_tarname . '.tmp\''
                 );
             }
-        } else {
+        }
+else {
             // ----- For not compressed tar, just add files before the last
             //       one or two 512 bytes block
             if (!$this->_openReadWrite()) {
@@ -2321,7 +2410,8 @@ public function _openAppend()
             fseek($this->_file, $v_size - 1024);
             if (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
                 fseek($this->_file, $v_size - 1024);
-            } elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
+            }
+elseif (fread($this->_file, 512) == ARCHIVE_TAR_END_BLOCK) {
                 fseek($this->_file, $v_size - 512);
             }
         }
@@ -2405,18 +2495,21 @@ private function _pathReduction($p_dir)
                 if ($v_list[$i] == ".") {
                     // ----- Ignore this directory
                     // Should be the first $i=0, but no check is done
-                } else {
+                }
+else {
                     if ($v_list[$i] == "..") {
                         // ----- Ignore it and ignore the $i-1
                         $i--;
-                    } else {
+                    }
+else {
                         if (($v_list[$i] == '')
                             && ($i != (sizeof($v_list) - 1))
                             && ($i != 0)
                         ) {
                             // ----- Ignore only the double '//' in path,
                             // but not the first and last /
-                        } else {
+                        }
+else {
                             $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/'
                                     . $v_result : '');
                         }
diff --git a/core/lib/Drupal/Core/Cache/Cache.php b/core/lib/Drupal/Core/Cache/Cache.php
index d75eaff..6e8eeac 100644
--- a/core/lib/Drupal/Core/Cache/Cache.php
+++ b/core/lib/Drupal/Core/Cache/Cache.php
@@ -81,10 +81,10 @@ public static function mergeTags(array $a = [], array $b = []) {
    */
   public static function mergeMaxAges($a = Cache::PERMANENT, $b = Cache::PERMANENT) {
     // If one of the values is Cache::PERMANENT, return the other value.
-    if ($a === Cache::PERMANENT){
+    if ($a === Cache::PERMANENT) {
       return $b;
     }
-    if ($b === Cache::PERMANENT){
+    if ($b === Cache::PERMANENT) {
       return $a;
     }
 
diff --git a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
index 81d6735..19cdc19 100644
--- a/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
+++ b/core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php
@@ -198,7 +198,7 @@ public function optimizeTokens(array $context_tokens) {
             $ancestor_found = TRUE;
           }
 
-        } while(!$ancestor_found && strpos($ancestor, '.') !== FALSE);
+        } while (!$ancestor_found && strpos($ancestor, '.') !== FALSE);
         if (!$ancestor_found) {
           $optimized_content_tokens[] = $context_token;
         }
diff --git a/core/lib/Drupal/Core/Cache/PhpBackend.php b/core/lib/Drupal/Core/Cache/PhpBackend.php
index 80b8771..7fb388c 100644
--- a/core/lib/Drupal/Core/Cache/PhpBackend.php
+++ b/core/lib/Drupal/Core/Cache/PhpBackend.php
@@ -216,7 +216,7 @@ public function invalidateMultiple(array $cids) {
    * {@inheritdoc}
    */
   public function invalidateAll() {
-    foreach($this->storage()->listAll() as $cidhash) {
+    foreach ($this->storage()->listAll() as $cidhash) {
       $this->invalidatebyHash($cidhash);
     }
   }
diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php
index c56dfe8..4464e02 100644
--- a/core/lib/Drupal/Core/Config/ConfigFactory.php
+++ b/core/lib/Drupal/Core/Config/ConfigFactory.php
@@ -276,7 +276,7 @@ public function getCacheKeys() {
     // Because get() adds overrides both from $GLOBALS and from
     // $this->configFactoryOverrides, add cache keys for each.
     $keys[] = 'global_overrides';
-    foreach($this->configFactoryOverrides as $override) {
+    foreach ($this->configFactoryOverrides as $override) {
       $keys[] =  $override->getCacheSuffix();
     }
     return $keys;
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
index 3a9cde4..9524319 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
@@ -233,7 +233,7 @@ protected function createGraphConfigEntityDependencies($entities_to_check) {
     $graph = $this->getGraph();
 
     foreach ($entities_to_check as $entity) {
-      if (isset($graph[$entity]) && !empty($graph[$entity]['reverse_paths'])){
+      if (isset($graph[$entity]) && !empty($graph[$entity]['reverse_paths'])) {
         foreach ($graph[$entity]['reverse_paths'] as $dependency => $value) {
           $dependent_entities[$dependency] = $this->data[$dependency];
         }
diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
index dd8c299..44be2df 100644
--- a/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
+++ b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
@@ -84,7 +84,8 @@ public function __construct(\PDO $connection, array $connection_options = array(
   public function query($query, array $args = array(), $options = array()) {
     try {
       return parent::query($query, $args, $options);
-    } catch (DatabaseException $e) {
+    }
+catch (DatabaseException $e) {
       if ($e->getPrevious()->errorInfo[1] == 1153) {
         // If a max_allowed_packet error occurs the message length is truncated.
         // This should prevent the error from recurring if the exception is
diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
index 15ce2f3..f0fa4c8 100644
--- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php
+++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php
@@ -313,7 +313,7 @@ public static function validateDatelist(&$element, FormStateInterface $form_stat
         $form_state->setError($element, t('The %field date is required.'));
       }
       elseif (!empty($all_empty)) {
-        foreach ($all_empty as $value){
+        foreach ($all_empty as $value) {
           $form_state->setError($element[$value], t('A value must be selected for %part.', array('%part' => $value)));
         }
       }
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index 4c7fea9..967a232 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -151,7 +151,8 @@ private function parseDefinition($id, $service, $file)
 
         if (isset($service['parent'])) {
             $definition = new DefinitionDecorator($service['parent']);
-        } else {
+        }
+else {
             $definition = new Definition();
         }
 
@@ -188,10 +189,12 @@ private function parseDefinition($id, $service, $file)
                 if (strpos($service['factory'], ':') !== false && strpos($service['factory'], '::') === false) {
                     $parts = explode(':', $service['factory']);
                     $definition->setFactory(array($this->resolveServices('@'.$parts[0]), $parts[1]));
-                } else {
+                }
+else {
                     $definition->setFactory($service['factory']);
                 }
-            } else {
+            }
+else {
                 $definition->setFactory(array($this->resolveServices($service['factory'][0]), $service['factory'][1]));
             }
         }
@@ -223,7 +226,8 @@ private function parseDefinition($id, $service, $file)
         if (isset($service['configurator'])) {
             if (is_string($service['configurator'])) {
                 $definition->setConfigurator($service['configurator']);
-            } else {
+            }
+else {
                 $definition->setConfigurator(array($this->resolveServices($service['configurator'][0]), $service['configurator'][1]));
             }
         }
@@ -237,7 +241,8 @@ private function parseDefinition($id, $service, $file)
                 if (isset($call['method'])) {
                     $method = $call['method'];
                     $args = isset($call['arguments']) ? $this->resolveServices($call['arguments']) : array();
-                } else {
+                }
+else {
                     $method = $call[0];
                     $args = isset($call[1]) ? $this->resolveServices($call[1]) : array();
                 }
@@ -341,18 +346,22 @@ private function resolveServices($value)
     {
         if (is_array($value)) {
             $value = array_map(array($this, 'resolveServices'), $value);
-        } elseif (is_string($value) &&  0 === strpos($value, '@=')) {
+        }
+elseif (is_string($value) &&  0 === strpos($value, '@=')) {
             // Not supported.
             //return new Expression(substr($value, 2));
             throw new InvalidArgumentException(sprintf("'%s' is an Expression, but expressions are not supported.", $value));
-        } elseif (is_string($value) &&  0 === strpos($value, '@')) {
+        }
+elseif (is_string($value) &&  0 === strpos($value, '@')) {
             if (0 === strpos($value, '@@')) {
                 $value = substr($value, 1);
                 $invalidBehavior = null;
-            } elseif (0 === strpos($value, '@?')) {
+            }
+elseif (0 === strpos($value, '@?')) {
                 $value = substr($value, 2);
                 $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
-            } else {
+            }
+else {
                 $value = substr($value, 1);
                 $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
             }
@@ -360,7 +369,8 @@ private function resolveServices($value)
             if ('=' === substr($value, -1)) {
                 $value = substr($value, 0, -1);
                 $strict = false;
-            } else {
+            }
+else {
                 $strict = true;
             }
 
diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php b/core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php
index 3250f00..4d7bef1 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php
@@ -123,7 +123,7 @@ protected function addGroupBy() {
    *   Returns the called object.
    */
   protected function addSortAggregate() {
-    if(!$this->count) {
+    if (!$this->count) {
       foreach ($this->sortAggregate as $alias => $sort) {
         $this->sqlQuery->orderBy($alias, $sort['direction']);
       }
diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManager.php b/core/lib/Drupal/Core/Menu/LocalTaskManager.php
index 512ccfe..c99c262 100644
--- a/core/lib/Drupal/Core/Menu/LocalTaskManager.php
+++ b/core/lib/Drupal/Core/Menu/LocalTaskManager.php
@@ -223,7 +223,7 @@ public function getLocalTasksForRoute($route_name) {
             $definitions[$plugin_id]['base_route'] = $definitions[$task_info['parent_id']]['base_route'];
           }
           if ($route_name == $task_info['route_name']) {
-            if(!empty($task_info['base_route'])) {
+            if (!empty($task_info['base_route'])) {
               $base_routes[$task_info['base_route']] = $task_info['base_route'];
             }
             // Tabs that link to the current route are viable parents
diff --git a/core/lib/Drupal/Core/Render/Element/VerticalTabs.php b/core/lib/Drupal/Core/Render/Element/VerticalTabs.php
index 447fc06..739e853 100644
--- a/core/lib/Drupal/Core/Render/Element/VerticalTabs.php
+++ b/core/lib/Drupal/Core/Render/Element/VerticalTabs.php
@@ -130,7 +130,7 @@ public static function processVerticalTabs(&$element, FormStateInterface $form_s
     // form is rendered, e.g. on preview pages or when form validation
     // fails.
     $name = implode('__', $element['#parents']);
-    if ($form_state->hasValue($name . '__active_tab')){
+    if ($form_state->hasValue($name . '__active_tab')) {
       $element['#default_tab'] = $form_state->getValue($name . '__active_tab');
     }
     $element[$name . '__active_tab'] = array(
diff --git a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php
index e0160d1..6fafa8c 100644
--- a/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php
+++ b/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php
@@ -436,7 +436,7 @@ protected function processHtmlHeadLink(array $html_head_link) {
    */
   protected function processFeed($attached_feed) {
     $html_head_link = [];
-    foreach($attached_feed as $item) {
+    foreach ($attached_feed as $item) {
       $feed_link = [
         'href' => $item[0],
         'rel' => 'alternate',
diff --git a/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php
index 4c1ac57..4f54292 100644
--- a/core/lib/Drupal/Core/Routing/MatcherDumper.php
+++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php
@@ -138,7 +138,8 @@ public function dump(array $options = array()) {
       }
 
 
-    } catch (\Exception $e) {
+    }
+catch (\Exception $e) {
       $transaction->rollback();
       watchdog_exception('Routing', $e);
       throw $e;
diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php
index f3d1275..7f1ed19 100644
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -357,7 +357,8 @@ public function generateFromRoute($name, $parameters = array(), $options = array
     $port = '';
     if ('http' === $scheme && 80 != $this->context->getHttpPort()) {
       $port = ':' . $this->context->getHttpPort();
-    } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
+    }
+elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
       $port = ':' . $this->context->getHttpsPort();
     }
     if ($collect_bubbleable_metadata) {
diff --git a/core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php b/core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php
index 626f7d4..9c40539 100644
--- a/core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php
+++ b/core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php
@@ -226,7 +226,8 @@ public function addViolation()
           $this->parameters,
           $this->translationDomain
         );
-      } else {
+      }
+else {
         try {
           $translatedMessage = $this->translator->transChoice(
             $this->message,
@@ -234,7 +235,8 @@ public function addViolation()
             $this->parameters,
             $this->translationDomain#
           );
-        } catch (\InvalidArgumentException $e) {
+        }
+catch (\InvalidArgumentException $e) {
           $translatedMessage = $this->translator->trans(
             $this->message,
             $this->parameters,
diff --git a/core/misc/states.js b/core/misc/states.js
index 4f3da8d..ff49169 100644
--- a/core/misc/states.js
+++ b/core/misc/states.js
@@ -271,7 +271,8 @@
             result = ternary(result, this.checkConstraints(constraints[n], selector, n));
             // False and anything else will evaluate to false, so return when
             // any false condition is found.
-            if (result === false) { return false; }
+            if (result === false) {
+return false; }
           }
         }
       }
diff --git a/core/modules/color/src/Tests/ColorTest.php b/core/modules/color/src/Tests/ColorTest.php
index 1d1b72e..4f8196a 100644
--- a/core/modules/color/src/Tests/ColorTest.php
+++ b/core/modules/color/src/Tests/ColorTest.php
@@ -169,7 +169,7 @@ function testValidColor() {
       $edit['palette[bg]'] = $color;
       $this->drupalPostForm($settings_path, $edit, t('Save configuration'));
 
-      if($is_valid) {
+      if ($is_valid) {
         $this->assertText('The configuration options have been saved.');
       }
       else {
diff --git a/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php
index c7f3e71..8fa3176 100644
--- a/core/modules/comment/src/Tests/CommentNonNodeTest.php
+++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php
@@ -160,7 +160,8 @@ function postComment(EntityInterface $entity, $comment, $subject = '', $contact
     preg_match('/#comment-([0-9]+)/', $this->getURL(), $match);
 
     // Get comment.
-    if ($contact !== TRUE) { // If true then attempting to find error message.
+    if ($contact !== TRUE) {
+// If true then attempting to find error message.
       if ($subject) {
         $this->assertText($subject, 'Comment subject posted.');
       }
diff --git a/core/modules/comment/src/Tests/CommentTestBase.php b/core/modules/comment/src/Tests/CommentTestBase.php
index 62e43f6..b818224 100644
--- a/core/modules/comment/src/Tests/CommentTestBase.php
+++ b/core/modules/comment/src/Tests/CommentTestBase.php
@@ -164,7 +164,8 @@ public function postComment($entity, $comment, $subject = '', $contact = NULL, $
     preg_match('/#comment-([0-9]+)/', $this->getURL(), $match);
 
     // Get comment.
-    if ($contact !== TRUE) { // If true then attempting to find error message.
+    if ($contact !== TRUE) {
+// If true then attempting to find error message.
       if ($subject) {
         $this->assertText($subject, 'Comment subject posted.');
       }
diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php
index 03de002..f716312 100644
--- a/core/modules/config/src/Form/ConfigSync.php
+++ b/core/modules/config/src/Form/ConfigSync.php
@@ -335,7 +335,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     if ($config_importer->alreadyImporting()) {
       drupal_set_message($this->t('Another request may be synchronizing configuration already.'));
     }
-    else{
+    else {
       try {
         $sync_steps = $config_importer->initialize();
         $batch = array(
diff --git a/core/modules/config/src/Tests/ConfigCRUDTest.php b/core/modules/config/src/Tests/ConfigCRUDTest.php
index e127892..aeae125 100644
--- a/core/modules/config/src/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/src/Tests/ConfigCRUDTest.php
@@ -266,7 +266,7 @@ public function testDataTypes() {
     $this->assertIdentical($config->get(), $data);
 
     // Re-set each key using Config::set().
-    foreach($data as $key => $value) {
+    foreach ($data as $key => $value) {
       $config->set($key, $value);
     }
     $config->save();
diff --git a/core/modules/config/src/Tests/ConfigDependencyTest.php b/core/modules/config/src/Tests/ConfigDependencyTest.php
index 050797d..1eb825a 100644
--- a/core/modules/config/src/Tests/ConfigDependencyTest.php
+++ b/core/modules/config/src/Tests/ConfigDependencyTest.php
@@ -473,7 +473,7 @@ public function testContentEntityDelete() {
    */
   protected function getDependentIds(array $dependents) {
     $dependent_ids = array();
-    foreach($dependents as $dependent) {
+    foreach ($dependents as $dependent) {
       $dependent_ids[] = $dependent->getEntityTypeId() . ':' . $dependent->id();
     }
     return $dependent_ids;
diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php
index 13ab721..e341486 100644
--- a/core/modules/config/src/Tests/ConfigEntityTest.php
+++ b/core/modules/config/src/Tests/ConfigEntityTest.php
@@ -200,7 +200,8 @@ function testCRUD() {
     try {
       $same_id->save();
       $this->fail('Not possible to overwrite an entity entity.');
-    } catch (EntityStorageException $e) {
+    }
+catch (EntityStorageException $e) {
       $this->pass('Not possible to overwrite an entity entity.');
     }
 
diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php
index d496973..9617d56 100644
--- a/core/modules/config/src/Tests/ConfigImportAllTest.php
+++ b/core/modules/config/src/Tests/ConfigImportAllTest.php
@@ -65,7 +65,7 @@ public function testInstallUninstall() {
     \Drupal::service('module_installer')->install(array_keys($all_modules));
 
     $this->assertModules(array_keys($all_modules), TRUE);
-    foreach($all_modules as $module => $info) {
+    foreach ($all_modules as $module => $info) {
       $this->assertModuleConfig($module);
       $this->assertModuleTablesExist($module);
     }
@@ -123,7 +123,7 @@ public function testInstallUninstall() {
     \Drupal::service('module_installer')->uninstall(array_keys($modules_to_uninstall));
 
     $this->assertModules(array_keys($modules_to_uninstall), FALSE);
-    foreach($modules_to_uninstall as $module => $info) {
+    foreach ($modules_to_uninstall as $module => $info) {
       $this->assertNoModuleConfig($module);
       $this->assertModuleTablesDoNotExist($module);
     }
@@ -138,7 +138,7 @@ public function testInstallUninstall() {
 
     // Check that all modules that were uninstalled are now reinstalled.
     $this->assertModules(array_keys($modules_to_uninstall), TRUE);
-    foreach($modules_to_uninstall as $module => $info) {
+    foreach ($modules_to_uninstall as $module => $info) {
       $this->assertModuleConfig($module);
       $this->assertModuleTablesExist($module);
     }
diff --git a/core/modules/config_translation/src/ConfigMapperManager.php b/core/modules/config_translation/src/ConfigMapperManager.php
index 2731aa0..05f52bc 100644
--- a/core/modules/config_translation/src/ConfigMapperManager.php
+++ b/core/modules/config_translation/src/ConfigMapperManager.php
@@ -116,7 +116,7 @@ protected function getDiscovery() {
    */
   public function getMappers(RouteCollection $collection = NULL) {
     $mappers = array();
-    foreach($this->getDefinitions() as $id => $definition) {
+    foreach ($this->getDefinitions() as $id => $definition) {
       $mappers[$id] = $this->createInstance($id);
       if ($collection) {
         $mappers[$id]->setRouteCollection($collection);
diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
index a718808..8161403 100644
--- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
+++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php
@@ -427,7 +427,7 @@ public function testDateFormatTranslation() {
       'medium' => 'Default medium date',
       'custom_medium' => 'Custom medium date',
     );
-    foreach($formats as $id => $label) {
+    foreach ($formats as $id => $label) {
       $translation_base_url = 'admin/config/regional/date-time/formats/manage/' . $id . '/translate';
 
       $this->drupalGet($translation_base_url);
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
index 4d5765f..573c499 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
@@ -440,7 +440,8 @@ public function testGetLangcode() {
       $this->configNamesMapper->getLangcode();
       $this->fail();
     }
-    catch (\RuntimeException $e) {}
+    catch (\RuntimeException $e) {
+}
   }
 
   /**
diff --git a/core/modules/contact/src/Tests/ContactSitewideTest.php b/core/modules/contact/src/Tests/ContactSitewideTest.php
index 39cd34a..02fc9e3 100644
--- a/core/modules/contact/src/Tests/ContactSitewideTest.php
+++ b/core/modules/contact/src/Tests/ContactSitewideTest.php
@@ -265,7 +265,7 @@ function testSiteWideContact() {
 
     // Find out in which row the form we want to add a field to is.
     $i = 0;
-    foreach($this->xpath('//table/tbody/tr') as $row) {
+    foreach ($this->xpath('//table/tbody/tr') as $row) {
       if (((string) $row->td[0]->a) == $label) {
         break;
       }
diff --git a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
index bd511c8..bde72b4 100644
--- a/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
+++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
@@ -383,7 +383,8 @@ public static function process($element, FormStateInterface $form_state, $form)
       );
       if (isset($item['display'])) {
         $element['display']['#value'] = $item['display'] ? '1' : '';
-      } else {
+      }
+else {
         $element['display']['#value'] = $element['#display_default'];
       }
     }
diff --git a/core/modules/filter/src/Plugin/Filter/FilterHtml.php b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
index 1baf73c..13bc018 100644
--- a/core/modules/filter/src/Plugin/Filter/FilterHtml.php
+++ b/core/modules/filter/src/Plugin/Filter/FilterHtml.php
@@ -159,7 +159,7 @@ public function filterAttributes($text) {
    */
   protected function filterElementAttributes(\DOMElement $element, array $allowed_attributes) {
     $modified_attributes = [];
-    foreach($element->attributes as $name => $attribute) {
+    foreach ($element->attributes as $name => $attribute) {
       // Remove attributes not in the whitelist.
       $allowed_value = $this->findAllowedValue($allowed_attributes, $name);
       if (empty($allowed_value)) {
diff --git a/core/modules/forum/src/Tests/ForumUninstallTest.php b/core/modules/forum/src/Tests/ForumUninstallTest.php
index 8eb1345..747af74 100644
--- a/core/modules/forum/src/Tests/ForumUninstallTest.php
+++ b/core/modules/forum/src/Tests/ForumUninstallTest.php
@@ -137,7 +137,7 @@ public function testForumUninstallWithoutFieldStorage() {
     // Delete all terms in the Forums vocabulary. Uninstalling the forum module
     // will fail unless this is done.
     $terms = entity_load_multiple_by_properties('taxonomy_term', array('vid' => 'forums'));
-    foreach($terms as $term) {
+    foreach ($terms as $term) {
       $term->delete();
     }
 
diff --git a/core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php b/core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
index 30e4dec..1d3ebbe 100644
--- a/core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
+++ b/core/modules/image/src/Plugin/migrate/process/d6/ImageCacheActions.php
@@ -24,7 +24,7 @@ class ImageCacheActions extends ProcessPluginBase {
   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
     $effects = [];
 
-    foreach($row->getSourceProperty('actions') as $action) {
+    foreach ($row->getSourceProperty('actions') as $action) {
       $id = preg_replace('/^imagecache/', 'image', $action['action']);
 
       if ($id === 'image_crop') {
diff --git a/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php b/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php
index 7745772..c94c695 100644
--- a/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php
+++ b/core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php
@@ -59,7 +59,7 @@ public function prepareRow(Row $row) {
       ->condition('presetid', $row->getSourceProperty('presetid'))
       ->execute();
 
-    foreach($results as $key => $result) {
+    foreach ($results as $key => $result) {
       $actions[$key] = $result;
       $actions[$key]['data'] = unserialize($result['data']);
     }
diff --git a/core/modules/page_cache/src/StackMiddleware/PageCache.php b/core/modules/page_cache/src/StackMiddleware/PageCache.php
index f25c685..b4c0e34 100644
--- a/core/modules/page_cache/src/StackMiddleware/PageCache.php
+++ b/core/modules/page_cache/src/StackMiddleware/PageCache.php
@@ -165,7 +165,8 @@ protected function lookup(Request $request, $type = self::MASTER_REQUEST, $catch
 
       if ($if_modified_since && $if_none_match
         && $if_none_match == $response->getEtag() // etag must match
-        && $if_modified_since == $last_modified->getTimestamp()) {  // if-modified-since must match
+        && $if_modified_since == $last_modified->getTimestamp()) {
+// if-modified-since must match
         $response->setStatusCode(304);
         $response->setContent(NULL);
 
diff --git a/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php b/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php
index e82b57f..0f4e446 100644
--- a/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php
+++ b/core/modules/responsive_image/src/Entity/ResponsiveImageStyle.php
@@ -138,7 +138,7 @@ public function hasImageStyleMappings() {
   public function getKeyedImageStyleMappings() {
     if (!$this->keyedImageStyleMappings) {
       $this->keyedImageStyleMappings = array();
-      foreach($this->image_style_mappings as $mapping) {
+      foreach ($this->image_style_mappings as $mapping) {
         if (!static::isEmptyImageStyleMapping($mapping)) {
           $this->keyedImageStyleMappings[$mapping['breakpoint_id']][$mapping['multiplier']] = $mapping;
         }
diff --git a/core/modules/search/src/Tests/SearchMultilingualEntityTest.php b/core/modules/search/src/Tests/SearchMultilingualEntityTest.php
index 4a85ee4..82401b9 100644
--- a/core/modules/search/src/Tests/SearchMultilingualEntityTest.php
+++ b/core/modules/search/src/Tests/SearchMultilingualEntityTest.php
@@ -187,7 +187,7 @@ function testMultilingualSearch() {
     $this->assertEqual(count($search_result), 2, 'The search found 2 results');
 
     // Test to check for the language of result items.
-    foreach($search_result as $result) {
+    foreach ($search_result as $result) {
       $this->assertEqual($result['langcode'], 'hu', 'The search found the correct Hungarian result');
     }
 
diff --git a/core/modules/search/src/Tests/SearchRankingTest.php b/core/modules/search/src/Tests/SearchRankingTest.php
index 4f12cdf..68fe825 100644
--- a/core/modules/search/src/Tests/SearchRankingTest.php
+++ b/core/modules/search/src/Tests/SearchRankingTest.php
@@ -248,7 +248,8 @@ public function testHTMLRankings() {
       // Assert the results.
       if ($tag == 'notag') {
         $this->assertEqual($set[$tag_rank]['node']->id(), $nodes[$tag]->id(), 'Search tag ranking for plain text order.');
-      } else {
+      }
+else {
         $this->assertEqual($set[$tag_rank]['node']->id(), $nodes[$tag]->id(), 'Search tag ranking for "&lt;' . $sorted_tags[$tag_rank] . '&gt;" order.');
       }
     }
diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php
index e52b9b6..9c03504 100644
--- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php
+++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php
@@ -347,7 +347,7 @@ public function testShortcutLinkOrder() {
     $shortcuts = $this->cssSelect('#toolbar-item-shortcuts-tray .toolbar-menu a');
     $this->assertEqual((string) $shortcuts[0], 'Add content');
     $this->assertEqual((string) $shortcuts[1], 'All content');
-    foreach($this->set->getShortcuts() as $shortcut) {
+    foreach ($this->set->getShortcuts() as $shortcut) {
       $shortcut->setWeight($shortcut->getWeight() * -1)->save();
     }
     $this->drupalGet(Url::fromRoute('<front>'));
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 2edfc81..cf2512a 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -2698,7 +2698,7 @@ protected function drupalGetMails($filter = array()) {
    *   TRUE on pass, FALSE on fail.
    */
   protected function assertUrl($path, array $options = array(), $message = '', $group = 'Other') {
-    if ($path instanceof Url)  {
+    if ($path instanceof Url) {  
       $url_obj = $path;
     }
     elseif (UrlHelper::isExternal($path)) {
diff --git a/core/modules/system/src/MachineNameController.php b/core/modules/system/src/MachineNameController.php
index a09e832..3474178 100644
--- a/core/modules/system/src/MachineNameController.php
+++ b/core/modules/system/src/MachineNameController.php
@@ -63,10 +63,10 @@ public function transliterate(Request $request) {
     $lowercase = $request->query->get('lowercase');
 
     $transliterated = $this->transliteration->transliterate($text, $langcode, '_');
-    if($lowercase) {
+    if ($lowercase) {
       $transliterated = Unicode::strtolower($transliterated);
     }
-    if(isset($replace_pattern) && isset($replace)) {
+    if (isset($replace_pattern) && isset($replace)) {
       // Quote the pattern delimiter and remove null characters to avoid the e
       // or other modifiers being injected.
       $transliterated = preg_replace('@' . strtr($replace_pattern, ['@' => '\@', chr(0) => '']) . '@', $replace, $transliterated);
diff --git a/core/modules/system/src/Tests/Common/RenderElementTypesTest.php b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
index b71b9c1..b350b19 100644
--- a/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
+++ b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php
@@ -193,7 +193,7 @@ function testMoreLink() {
       ),
     );
 
-    foreach($elements as $element) {
+    foreach ($elements as $element) {
       $xml = new \SimpleXMLElement(\Drupal::service('renderer')->renderRoot($element['value']));
       $result = $xml->xpath($element['expected']);
       $this->assertTrue($result, '"' . $element['name'] . '" input rendered correctly by drupal_render().');
diff --git a/core/modules/system/src/Tests/Database/InsertDefaultsTest.php b/core/modules/system/src/Tests/Database/InsertDefaultsTest.php
index 980b6b3..d53038b 100644
--- a/core/modules/system/src/Tests/Database/InsertDefaultsTest.php
+++ b/core/modules/system/src/Tests/Database/InsertDefaultsTest.php
@@ -39,7 +39,8 @@ function testDefaultEmptyInsert() {
       db_insert('test')->execute();
       // This is only executed if no exception has been thrown.
       $this->fail('Expected exception NoFieldsException has not been thrown.');
-    } catch (NoFieldsException $e) {
+    }
+catch (NoFieldsException $e) {
       $this->pass('Expected exception NoFieldsException has been thrown.');
     }
 
diff --git a/core/modules/system/src/Tests/Database/LargeQueryTest.php b/core/modules/system/src/Tests/Database/LargeQueryTest.php
index fab1b8f..bc8e149 100644
--- a/core/modules/system/src/Tests/Database/LargeQueryTest.php
+++ b/core/modules/system/src/Tests/Database/LargeQueryTest.php
@@ -36,7 +36,8 @@ function testMaxAllowedPacketQueryTruncating() {
         try {
           db_query('SELECT name FROM {test} WHERE name = :name', array(':name' => $long_name));
           $this->fail("An exception should be thrown for queries larger than 'max_allowed_packet'");
-        } catch (DatabaseException $e) {
+        }
+catch (DatabaseException $e) {
           // Close and re-open the connection. Otherwise we will run into error
           // 2006 "MySQL server had gone away" afterwards.
           Database::closeConnection();
diff --git a/core/modules/system/src/Tests/Database/SchemaTest.php b/core/modules/system/src/Tests/Database/SchemaTest.php
index e6aea74..2b3a524 100644
--- a/core/modules/system/src/Tests/Database/SchemaTest.php
+++ b/core/modules/system/src/Tests/Database/SchemaTest.php
@@ -235,7 +235,8 @@ function testSchema() {
     try {
       db_create_table('test_timestamp', $table_specification);
     }
-    catch (\Exception $e) {}
+    catch (\Exception $e) {
+}
     $this->assertTrue(db_table_exists('test_timestamp'), 'Table with database specific datatype was created.');
   }
 
diff --git a/core/modules/system/src/Tests/Entity/EntityDefinitionUpdateTest.php b/core/modules/system/src/Tests/Entity/EntityDefinitionUpdateTest.php
index a9b86b9..6ad43e6 100644
--- a/core/modules/system/src/Tests/Entity/EntityDefinitionUpdateTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityDefinitionUpdateTest.php
@@ -372,7 +372,8 @@ public function testBundleFieldCreateDeleteWithExistingEntities() {
           ->fields($values)
           ->execute();
         $this->pass($message);
-      } else {
+      }
+else {
         // Keep throwing it.
         throw $e;
       }
diff --git a/core/modules/system/src/Tests/Entity/EntityUUIDTest.php b/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
index 48a6e4e..ab3bc65 100644
--- a/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityUUIDTest.php
@@ -77,7 +77,7 @@ protected function assertCRUD($entity_type) {
     // Creating a duplicate needs to result in a new UUID.
     $entity_duplicate = $entity->createDuplicate();
     foreach ($entity->getFields() as $property => $value) {
-      switch($property) {
+      switch ($property) {
         case 'uuid':
           $this->assertNotNull($entity_duplicate->uuid());
           $this->assertNotNull($entity->uuid());
diff --git a/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php b/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
index 8940f0f..25997b8 100644
--- a/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
+++ b/core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
@@ -192,8 +192,7 @@ protected function generateRandomEntityId($string = FALSE) {
       // Drupal supported databases and is known to work for other databases
       // like SQL Server 2014 and Oracle 10 too.
       $id = $string ? $this->randomMachineName() : mt_rand(1, 0x7FFFFFFF);
-    }
-    while (isset($this->generatedIds[$id]));
+    } while (isset($this->generatedIds[$id]));
     $this->generatedIds[$id] = $id;
     return $id;
   }
diff --git a/core/modules/system/src/Tests/Image/ToolkitGdTest.php b/core/modules/system/src/Tests/Image/ToolkitGdTest.php
index 7304740..ae887fb 100644
--- a/core/modules/system/src/Tests/Image/ToolkitGdTest.php
+++ b/core/modules/system/src/Tests/Image/ToolkitGdTest.php
@@ -394,7 +394,7 @@ function testManipulations() {
       if ($image_reloaded->getToolkit()->getType() == IMAGETYPE_GIF) {
         $this->assertEqual('#ffff00', $image_reloaded->getToolkit()->getTransparentColor(), SafeMarkup::format('Image file %file has the correct transparent color channel set.', array('%file' => $file)));
       }
-      else  {
+      else {
         $this->assertEqual(NULL, $image_reloaded->getToolkit()->getTransparentColor(), SafeMarkup::format('Image file %file has no color channel set.', array('%file' => $file)));
       }
     }
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php
index 3a0852b..68cff4e 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php
+++ b/core/modules/system/src/Tests/Installer/InstallerTranslationMultipleLanguageTest.php
@@ -152,8 +152,8 @@ protected function verifyImportedStringsTranslated() {
     $test_samples = ['Save and continue', 'Anonymous', 'Language'];
     $langcodes = ['de', 'es'];
 
-    foreach($test_samples as $sample) {
-      foreach($langcodes as $langcode) {
+    foreach ($test_samples as $sample) {
+      foreach ($langcodes as $langcode) {
         $edit = array();
         $edit['langcode'] = $langcode;
         $edit['translation'] = 'translated';
diff --git a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php b/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
index db6a0ee..09c0539 100644
--- a/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
+++ b/core/modules/system/src/Tests/Installer/InstallerTranslationTest.php
@@ -100,7 +100,7 @@ public function testInstaller() {
 
     // Verify the strings from the translation files were imported.
     $test_samples = ['Save and continue', 'Anonymous'];
-    foreach($test_samples as $sample) {
+    foreach ($test_samples as $sample) {
       $edit = array();
       $edit['langcode'] = 'de';
       $edit['translation'] = 'translated';
diff --git a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
index 66fd3c2..1907fc1 100644
--- a/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
+++ b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php
@@ -136,7 +136,8 @@ function testCRUD() {
     try {
       $same_id->save();
       $this->fail('Not possible to overwrite an entity entity.');
-    } catch (EntityStorageException $e) {
+    }
+catch (EntityStorageException $e) {
       $this->pass('Not possible to overwrite an entity entity.');
     }
 
diff --git a/core/modules/system/src/Tests/Module/UninstallTest.php b/core/modules/system/src/Tests/Module/UninstallTest.php
index 253ea18..cf9aab9 100644
--- a/core/modules/system/src/Tests/Module/UninstallTest.php
+++ b/core/modules/system/src/Tests/Module/UninstallTest.php
@@ -134,7 +134,8 @@ public function testFailedInstallStatus() {
     try {
       $this->container->get('module_installer')->install(array('module_installer_config_test'));
       $this->fail($message);
-    } catch (EntityMalformedException $e) {
+    }
+catch (EntityMalformedException $e) {
       $this->pass($message);
     }
 
diff --git a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
index 05c4c7e..76f4481 100644
--- a/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
+++ b/core/modules/system/src/Tests/Plugin/ContextPluginTest.php
@@ -61,7 +61,7 @@ function testContext() {
     try {
       $plugin->getContextValue('user');
     }
-    catch(ContextException $e) {
+    catch (ContextException $e) {
       $this->assertIdentical("The 'entity:user' context is required and not present.", $e->getMessage(), 'Requesting a non-set value of a required context should throw a context exception.');
     }
 
diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
index 2cea2b7..f4feebe 100644
--- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php
+++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php
@@ -51,7 +51,7 @@ function testErrorHandler() {
       '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()',
       '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66 and defined',
     );
-    if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0)  {
+    if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) {  
       // In PHP 7, instead of a recoverable fatal error we get a TypeError.
       $fatal_error['%type'] = 'TypeError';
       // The error message also changes in PHP 7.
diff --git a/core/modules/system/src/Tests/TypedData/TypedDataTest.php b/core/modules/system/src/Tests/TypedData/TypedDataTest.php
index c6a7f1c..e8d6c94 100644
--- a/core/modules/system/src/Tests/TypedData/TypedDataTest.php
+++ b/core/modules/system/src/Tests/TypedData/TypedDataTest.php
@@ -244,7 +244,7 @@ public function testGetAndSet() {
 
     // Generate some files that will be used to test the binary data type.
     $files = array();
-    for ($i = 0; $i < 3; $i++){
+    for ($i = 0; $i < 3; $i++) {
       $path = "public://example_$i.png";
       file_unmanaged_copy(\Drupal::root() . '/core/misc/druplicon.png', $path);
       $image = entity_create('file', array('uri' => $path));
diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
index e4f8e49..e7263d4 100644
--- a/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
+++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
@@ -21,7 +21,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
     $this->derivatives = array();
     $types = entity_test_entity_types(ENTITY_TEST_TYPES_ROUTING);
 
-    foreach($types as $entity_type) {
+    foreach ($types as $entity_type) {
       $this->derivatives[$entity_type . '.canonical'] = array();
       $this->derivatives[$entity_type . '.canonical']['base_route'] = "entity.$entity_type.canonical";
       $this->derivatives[$entity_type . '.canonical']['route_name'] = "entity.$entity_type.canonical";
diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
index 690ec6d..7e2dda5 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
@@ -317,7 +317,7 @@ public function validateExposed(&$form, FormStateInterface $form_state) {
 
     // We only validate if they've chosen the text field style.
     if ($this->options['type'] != 'textfield') {
-      if ($form_state->getValue($identifier) != 'All')  {
+      if ($form_state->getValue($identifier) != 'All') {  
         $this->validated_exposed_input = (array) $form_state->getValue($identifier);
       }
       return;
diff --git a/core/modules/tour/src/Entity/Tour.php b/core/modules/tour/src/Entity/Tour.php
index 16372aa..2661418 100644
--- a/core/modules/tour/src/Entity/Tour.php
+++ b/core/modules/tour/src/Entity/Tour.php
@@ -176,7 +176,7 @@ public function resetKeyedRoutes() {
   public function calculateDependencies() {
     parent::calculateDependencies();
 
-    foreach($this->tipsCollection as $instance) {
+    foreach ($this->tipsCollection as $instance) {
       $definition = $instance->getPluginDefinition();
       $this->addDependency('module', $definition['provider']);
     }
diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
index b58037e..fbbf10e 100644
--- a/core/modules/views/src/Plugin/views/PluginBase.php
+++ b/core/modules/views/src/Plugin/views/PluginBase.php
@@ -378,7 +378,7 @@ protected function viewsTokenReplace($text, $tokens) {
         $top = array_shift($parts);
         assert('preg_match(\'/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/\', $top) === 1', 'Tokens need to be valid Twig variables.');
         $token_array = array(array_pop($parts) => $replacement);
-        foreach(array_reverse($parts) as $key) {
+        foreach (array_reverse($parts) as $key) {
           assert('preg_match(\'/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/\', $key) === 1', 'Tokens need to be valid Twig variables.');
           $token_array = array($key => $token_array);
         }
diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
index e4d0f57..8777fb5 100644
--- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php
+++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php
@@ -700,7 +700,7 @@ protected function renderFields(array $result) {
           $fields = $this->view->field;
           $rendered_fields = &$this->rendered_fields[$index];
           $post_render_tokens = [];
-          foreach ($field_ids as $id)  {
+          foreach ($field_ids as $id) {  
             $rendered_fields[$id] = $data[$id]['#markup'];
             $tokens = $fields[$id]->postRender($row, $rendered_fields[$id]);
             if ($tokens) {
diff --git a/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php b/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php
index 69239b4..89f2cdd 100644
--- a/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php
+++ b/core/modules/views_ui/src/Tests/NewViewConfigSchemaTest.php
@@ -43,7 +43,7 @@ public function testNewViews() {
       'standard:aggregator_feed',
       'standard:aggregator_item',
     );
-    foreach($wizards as $wizard_key) {
+    foreach ($wizards as $wizard_key) {
       $edit = array();
       $edit['label'] = $this->randomString();
       $edit['id'] = strtolower($this->randomMachineName());
diff --git a/core/tests/Drupal/KernelTests/AssertConfigTrait.php b/core/tests/Drupal/KernelTests/AssertConfigTrait.php
index 24d393e..88e1838 100644
--- a/core/tests/Drupal/KernelTests/AssertConfigTrait.php
+++ b/core/tests/Drupal/KernelTests/AssertConfigTrait.php
@@ -76,7 +76,7 @@ protected function assertConfigDiff(Diff $result, $config_name, array $skipped_c
         case 'Drupal\Component\Diff\Engine\DiffOpAdd':
           foreach ($op->closing as $closing) {
             // The UUIDs don't exist in the default config.
-            if (strpos($closing, 'uuid: ') === 0)  {
+            if (strpos($closing, 'uuid: ') === 0) {  
               continue;
             }
             throw new \Exception($config_name . ': ' . var_export($op, TRUE));
diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
index 4d91218..bd0a76c 100644
--- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
@@ -165,7 +165,7 @@ protected function setUp() {
    */
   public function aliasManagerCallback() {
     $args = func_get_args();
-    switch($args[0]) {
+    switch ($args[0]) {
       case '/test/one':
         return '/hello/world';
       case '/test/two/5':
