diff -u b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php --- b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php @@ -80,7 +80,7 @@ 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 -u b/core/lib/Drupal/Core/Routing/MatcherDumper.php b/core/lib/Drupal/Core/Routing/MatcherDumper.php --- b/core/lib/Drupal/Core/Routing/MatcherDumper.php +++ b/core/lib/Drupal/Core/Routing/MatcherDumper.php @@ -143,7 +143,7 @@ } -catch (\Exception $e) { + catch (\Exception $e) { $transaction->rollback(); watchdog_exception('Routing', $e); throw $e; diff -u b/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php --- b/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -360,7 +360,7 @@ 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 -u b/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php --- b/core/modules/config/src/Tests/ConfigEntityTest.php +++ b/core/modules/config/src/Tests/ConfigEntityTest.php @@ -196,7 +196,7 @@ $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 -u b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php --- b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php @@ -441,7 +441,7 @@ $this->fail(); } catch (\RuntimeException $e) { -} + } } /** diff -u b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php --- b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php +++ b/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php @@ -373,7 +373,7 @@ if (isset($item['display'])) { $element['display']['#value'] = $item['display'] ? '1' : ''; } -else { + else { $element['display']['#value'] = $element['#display_default']; } } diff -u b/core/modules/search/src/Tests/SearchRankingTest.php b/core/modules/search/src/Tests/SearchRankingTest.php --- b/core/modules/search/src/Tests/SearchRankingTest.php +++ b/core/modules/search/src/Tests/SearchRankingTest.php @@ -245,7 +245,7 @@ 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 "<' . $sorted_tags[$tag_rank] . '>" order.'); } } diff -u b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php --- b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php +++ b/core/modules/system/src/Tests/KeyValueStore/KeyValueContentEntityStorageTest.php @@ -133,7 +133,7 @@ $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 -u b/core/modules/system/src/Tests/Module/UninstallTest.php b/core/modules/system/src/Tests/Module/UninstallTest.php --- b/core/modules/system/src/Tests/Module/UninstallTest.php +++ b/core/modules/system/src/Tests/Module/UninstallTest.php @@ -135,7 +135,7 @@ $this->container->get('module_installer')->install(array('module_installer_config_test')); $this->fail($message); } -catch (EntityMalformedException $e) { + catch (EntityMalformedException $e) { $this->pass($message); } diff -u b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php --- b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php @@ -35,7 +35,7 @@ // 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 -u b/core/tests/Drupal/KernelTests/Core/Database/LargeQueryTest.php b/core/tests/Drupal/KernelTests/Core/Database/LargeQueryTest.php --- b/core/tests/Drupal/KernelTests/Core/Database/LargeQueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/LargeQueryTest.php @@ -32,7 +32,7 @@ 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 -u b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php --- b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SchemaTest.php @@ -231,7 +231,7 @@ db_create_table('test_timestamp', $table_specification); } catch (\Exception $e) { -} + } $this->assertTrue(db_table_exists('test_timestamp'), 'Table with database specific datatype was created.'); } diff -u b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php --- b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -369,7 +369,7 @@ ->execute(); $this->pass($message); } -else { + else { // Keep throwing it. throw $e; }