diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php index 26f4e3ebe3..96dea950f0 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -634,7 +634,7 @@ public function fieldSetNoDefault($table, $field) { public function fieldExists($table, $column) { $prefixInfo = $this->getPrefixInfo($table); - return (bool) $this->connection->query("SELECT 1 FROM pg_attribute WHERE attrelid = :key::regclass AND attname = :column AND NOT attisdropped AND attnum > 0", array(':key' => $prefixInfo['schema'] . '.' . $prefixInfo['table'], ':column' => $column))->fetchField(); + return (bool) $this->connection->query("SELECT 1 FROM pg_attribute WHERE attrelid = :key::regclass AND attname = :column AND NOT attisdropped AND attnum > 0", [':key' => $prefixInfo['schema'] . '.' . $prefixInfo['table'], ':column' => $column])->fetchField(); } /** diff --git a/core/lib/Drupal/Core/Extension/ModuleHandler.php b/core/lib/Drupal/Core/Extension/ModuleHandler.php index ad539fd7df..7d69c3cb82 100644 --- a/core/lib/Drupal/Core/Extension/ModuleHandler.php +++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php @@ -414,7 +414,7 @@ public function invokeAll($hook, array $args = []) { /** * {@inheritdoc} */ - public function invokeDeprecated($description, $module, $hook, array $args = array()) { + public function invokeDeprecated($description, $module, $hook, array $args = []) { $result = $this->invoke($module, $hook, $args); $this->triggerDeprecationError($description, $hook); return $result; @@ -423,7 +423,7 @@ public function invokeDeprecated($description, $module, $hook, array $args = arr /** * {@inheritdoc} */ - public function invokeAllDeprecated($description, $hook, array $args = array()) { + public function invokeAllDeprecated($description, $hook, array $args = []) { $result = $this->invokeAll($hook, $args); $this->triggerDeprecationError($description, $hook); return $result; diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 1dc18b758a..7dcb3ba813 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -16,7 +16,6 @@ - @@ -133,6 +132,7 @@ + diff --git a/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php b/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php index ee14f005a6..e0a5f72846 100644 --- a/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php +++ b/core/tests/Drupal/Tests/PhpunitCompatibilityTrait.php @@ -48,7 +48,7 @@ * * @see https://www.drupal.org/node/2907725 */ - public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = FALSE, $callOriginalMethods = FALSE, $proxyTarget = NULL) { + public function getMock($originalClassName, $methods = [], array $arguments = [], $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE, $cloneArguments = FALSE, $callOriginalMethods = FALSE, $proxyTarget = NULL) { if (!$this->supports('getMock')) { $mock = $this->getMockBuilder($originalClassName) ->setMethods($methods)