summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2017-11-10 05:35:50 -0600
committerxjm2017-11-10 05:35:50 -0600
commit91e668f5758159b27bea9e4bc3247969fa91232a (patch)
tree7683e8a63a49af046f3f64112a6368df9a2301b1
parentf1adffe2b48fc645fb77e97eca30257b7fa79987 (diff)
Issue #2572795 by mfernea, zaporylie, pfrenssen, andypost, attiks, alexpott, xjm, Mile23, catch, borisson_: Fix coding standard for closures - Drupal.WhiteSpace.ScopeClosingBrace and Generic.Functions.OpeningFunctionBraceKernighanRitchie
-rw-r--r--core/lib/Drupal/Component/DependencyInjection/Container.php3
-rw-r--r--core/lib/Drupal/Core/Config/DatabaseStorage.php2
-rw-r--r--core/lib/Drupal/Core/Form/FormStateDecoratorBase.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableAccessDeniedHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableConflictHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableGoneHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableLengthRequiredHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableNotAcceptableHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableNotFoundHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheablePreconditionFailedHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheablePreconditionRequiredHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableServiceUnavailableHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableUnprocessableEntityHttpException.php2
-rw-r--r--core/lib/Drupal/Core/Http/Exception/CacheableUnsupportedMediaTypeHttpException.php2
-rw-r--r--core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php3
-rw-r--r--core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php2
-rw-r--r--core/modules/language/src/Form/NegotiationConfigureForm.php2
-rw-r--r--core/modules/language/tests/src/Functional/LanguageConfigurationTest.php2
-rw-r--r--core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php2
-rw-r--r--core/modules/rest/src/Plugin/Type/ResourcePluginManager.php2
-rw-r--r--core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php3
-rw-r--r--core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php3
-rw-r--r--core/modules/serialization/serialization.install3
-rw-r--r--core/modules/serialization/src/Encoder/XmlEncoder.php4
-rw-r--r--core/modules/simpletest/src/RouteProvider.php2
-rw-r--r--core/modules/system/tests/src/Functional/File/ConfigTest.php2
-rw-r--r--core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php2
-rw-r--r--core/modules/views/src/Plugin/views/display/DisplayPluginBase.php4
-rw-r--r--core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php15
-rw-r--r--core/phpcs.xml.dist6
-rw-r--r--core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php2
-rw-r--r--core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc3
-rw-r--r--core/tests/Drupal/Tests/Core/Site/SettingsTest.php2
-rw-r--r--core/tests/Drupal/Tests/WebAssert.php2
39 files changed, 60 insertions, 45 deletions
diff --git a/core/lib/Drupal/Component/DependencyInjection/Container.php b/core/lib/Drupal/Component/DependencyInjection/Container.php
index 45cc8b9..ac6a6f6 100644
--- a/core/lib/Drupal/Component/DependencyInjection/Container.php
+++ b/core/lib/Drupal/Component/DependencyInjection/Container.php
@@ -586,8 +586,7 @@ class Container implements ContainerInterface, ResettableContainerInterface {
/**
* Ensure that cloning doesn't work.
*/
- private function __clone()
- {
+ private function __clone() {
}
}
diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php
index 8a749a3..0ac6134 100644
--- a/core/lib/Drupal/Core/Config/DatabaseStorage.php
+++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php
@@ -159,7 +159,7 @@ class DatabaseStorage implements StorageInterface {
* @throws \Drupal\Core\Config\StorageException
* If a database error occurs.
*/
- protected function ensureTableExists() {
+ protected function ensureTableExists() {
try {
if (!$this->connection->schema()->tableExists($this->table)) {
$this->connection->schema()->createTable($this->table, static::schemaDefinition());
diff --git a/core/lib/Drupal/Core/Form/FormStateDecoratorBase.php b/core/lib/Drupal/Core/Form/FormStateDecoratorBase.php
index c063666..2668f59 100644
--- a/core/lib/Drupal/Core/Form/FormStateDecoratorBase.php
+++ b/core/lib/Drupal/Core/Form/FormStateDecoratorBase.php
@@ -557,7 +557,7 @@ abstract class FormStateDecoratorBase implements FormStateInterface {
/**
* {@inheritdoc}
*/
- public function isValueEmpty($key) {
+ public function isValueEmpty($key) {
return $this->decoratedFormState->isValueEmpty($key);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableAccessDeniedHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableAccessDeniedHttpException.php
index e0fd5cb..95c5bce 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableAccessDeniedHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableAccessDeniedHttpException.php
@@ -16,7 +16,7 @@ class CacheableAccessDeniedHttpException extends AccessDeniedHttpException imple
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php
index 97d432a..4737c33 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableBadRequestHttpException.php
@@ -16,7 +16,7 @@ class CacheableBadRequestHttpException extends BadRequestHttpException implement
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableConflictHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableConflictHttpException.php
index ca804fb..6646c23 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableConflictHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableConflictHttpException.php
@@ -16,7 +16,7 @@ class CacheableConflictHttpException extends ConflictHttpException implements Ca
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableGoneHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableGoneHttpException.php
index 4568c91..13a3d0c 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableGoneHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableGoneHttpException.php
@@ -16,7 +16,7 @@ class CacheableGoneHttpException extends GoneHttpException implements CacheableD
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php
index 76f529e..aadc57e 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableHttpException.php
@@ -16,7 +16,7 @@ class CacheableHttpException extends HttpException implements CacheableDependenc
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $statusCode = 0, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $statusCode = 0, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($statusCode, $message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableLengthRequiredHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableLengthRequiredHttpException.php
index a75f80a..c9647aa 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableLengthRequiredHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableLengthRequiredHttpException.php
@@ -16,7 +16,7 @@ class CacheableLengthRequiredHttpException extends LengthRequiredHttpException i
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php
index d9919b1..5267a15 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableMethodNotAllowedHttpException.php
@@ -16,7 +16,7 @@ class CacheableMethodNotAllowedHttpException extends MethodNotAllowedHttpExcepti
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, array $allow, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, array $allow, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($allow, $message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableNotAcceptableHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableNotAcceptableHttpException.php
index 94bf1c2..85896f0 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableNotAcceptableHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableNotAcceptableHttpException.php
@@ -16,7 +16,7 @@ class CacheableNotAcceptableHttpException extends NotAcceptableHttpException imp
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableNotFoundHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableNotFoundHttpException.php
index 9e5e136..e3097fe 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableNotFoundHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableNotFoundHttpException.php
@@ -16,7 +16,7 @@ class CacheableNotFoundHttpException extends NotFoundHttpException implements Ca
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionFailedHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionFailedHttpException.php
index 7921d3e..427b069 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionFailedHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionFailedHttpException.php
@@ -16,7 +16,7 @@ class CacheablePreconditionFailedHttpException extends PreconditionFailedHttpExc
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionRequiredHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionRequiredHttpException.php
index d66b255..06fd395 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionRequiredHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheablePreconditionRequiredHttpException.php
@@ -16,7 +16,7 @@ class CacheablePreconditionRequiredHttpException extends PreconditionRequiredHtt
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableServiceUnavailableHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableServiceUnavailableHttpException.php
index 313b9ae..671a523 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableServiceUnavailableHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableServiceUnavailableHttpException.php
@@ -16,7 +16,7 @@ class CacheableServiceUnavailableHttpException extends ServiceUnavailableHttpExc
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $retryAfter = NULL, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $retryAfter = NULL, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($retryAfter, $message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php
index e709c0b..8c60a51 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableTooManyRequestsHttpException.php
@@ -16,7 +16,7 @@ class CacheableTooManyRequestsHttpException extends TooManyRequestsHttpException
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $retryAfter = NULL, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $retryAfter = NULL, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($retryAfter, $message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php
index 35dbd72..1931caa 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableUnauthorizedHttpException.php
@@ -16,7 +16,7 @@ class CacheableUnauthorizedHttpException extends UnauthorizedHttpException imple
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $challenge, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $challenge, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($challenge, $message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableUnprocessableEntityHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableUnprocessableEntityHttpException.php
index 655c67a..1f64587 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableUnprocessableEntityHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableUnprocessableEntityHttpException.php
@@ -16,7 +16,7 @@ class CacheableUnprocessableEntityHttpException extends UnprocessableEntityHttpE
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/lib/Drupal/Core/Http/Exception/CacheableUnsupportedMediaTypeHttpException.php b/core/lib/Drupal/Core/Http/Exception/CacheableUnsupportedMediaTypeHttpException.php
index c6f6023..013ca9c 100644
--- a/core/lib/Drupal/Core/Http/Exception/CacheableUnsupportedMediaTypeHttpException.php
+++ b/core/lib/Drupal/Core/Http/Exception/CacheableUnsupportedMediaTypeHttpException.php
@@ -16,7 +16,7 @@ class CacheableUnsupportedMediaTypeHttpException extends UnsupportedMediaTypeHtt
/**
* {@inheritdoc}
*/
- public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
+ public function __construct(CacheableDependencyInterface $cacheability, $message = NULL, \Exception $previous = NULL, $code = 0) {
$this->setCacheability($cacheability);
parent::__construct($message, $previous, $code);
}
diff --git a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
index 9267237..56c0339 100644
--- a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
@@ -109,5 +109,6 @@ class AggregatorPluginSettingsBaseTest extends UnitTestCase {
namespace Drupal\Core\Form;
if (!function_exists('drupal_set_message')) {
- function drupal_set_message() {}
+ function drupal_set_message() {
+ }
}
diff --git a/core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php b/core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php
index 5e2a8ce..bd82d68 100644
--- a/core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php
+++ b/core/modules/field_ui/src/Form/EntityViewDisplayEditForm.php
@@ -113,7 +113,7 @@ class EntityViewDisplayEditForm extends EntityDisplayFormBase {
/**
* {@inheritdoc}
*/
- protected function getDisplayModesLink() {;
+ protected function getDisplayModesLink() {
return [
'#type' => 'link',
'#title' => t('Manage view modes'),
diff --git a/core/modules/language/src/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php
index e029134..325a435 100644
--- a/core/modules/language/src/Form/NegotiationConfigureForm.php
+++ b/core/modules/language/src/Form/NegotiationConfigureForm.php
@@ -215,7 +215,7 @@ class NegotiationConfigureForm extends ConfigFormBase {
* @param string $type
* The language type to generate the table for.
*/
- protected function configureFormTable(array &$form, $type) {
+ protected function configureFormTable(array &$form, $type) {
$info = $form['#language_types_info'][$type];
$table_form = [
diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
index 9ed7abd..7095bc1 100644
--- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
+++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php
@@ -198,7 +198,7 @@ class LanguageConfigurationTest extends BrowserTestBase {
* @return int
* Maximum weight of configurable languages.
*/
- protected function getHighestConfigurableLanguageWeight(){
+ protected function getHighestConfigurableLanguageWeight() {
$max_weight = 0;
$storage = $this->container->get('entity_type.manager')
diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
index face32e..ee496e2 100644
--- a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
+++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php
@@ -21,7 +21,7 @@ class LocaleFileSystemFormTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
- protected function setUp(){
+ protected function setUp() {
parent::setUp();
$account = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($account);
diff --git a/core/modules/rest/src/Plugin/Type/ResourcePluginManager.php b/core/modules/rest/src/Plugin/Type/ResourcePluginManager.php
index 3ba7333..4dd9ca2 100644
--- a/core/modules/rest/src/Plugin/Type/ResourcePluginManager.php
+++ b/core/modules/rest/src/Plugin/Type/ResourcePluginManager.php
@@ -43,7 +43,7 @@ class ResourcePluginManager extends DefaultPluginManager {
*
* @see https://www.drupal.org/node/2874934
*/
- public function getInstance(array $options){
+ public function getInstance(array $options) {
if (isset($options['id'])) {
return $this->createInstance($options['id']);
}
diff --git a/core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php b/core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php
index b05ddf2..284d17e 100644
--- a/core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php
+++ b/core/modules/rest/tests/src/Functional/AnonResourceTestTrait.php
@@ -31,6 +31,7 @@ trait AnonResourceTestTrait {
/**
* {@inheritdoc}
*/
- protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {}
+ protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
+ }
}
diff --git a/core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php b/core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php
index 6f8c621..fbb870b 100644
--- a/core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php
+++ b/core/modules/rest/tests/src/Functional/BasicAuthResourceTestTrait.php
@@ -38,6 +38,7 @@ trait BasicAuthResourceTestTrait {
/**
* {@inheritdoc}
*/
- protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {}
+ protected function assertAuthenticationEdgeCases($method, Url $url, array $request_options) {
+ }
}
diff --git a/core/modules/serialization/serialization.install b/core/modules/serialization/serialization.install
index afc3311..f5a11b8 100644
--- a/core/modules/serialization/serialization.install
+++ b/core/modules/serialization/serialization.install
@@ -33,7 +33,8 @@ function serialization_requirements($phase) {
/**
* @see hal_update_8301()
*/
-function serialization_update_8301() {}
+function serialization_update_8301() {
+}
/**
* Add serialization.settings::bc_primitives_as_strings configuration.
diff --git a/core/modules/serialization/src/Encoder/XmlEncoder.php b/core/modules/serialization/src/Encoder/XmlEncoder.php
index 53177b0..125a2cc 100644
--- a/core/modules/serialization/src/Encoder/XmlEncoder.php
+++ b/core/modules/serialization/src/Encoder/XmlEncoder.php
@@ -60,7 +60,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
/**
* {@inheritdoc}
*/
- public function encode($data, $format, array $context = []){
+ public function encode($data, $format, array $context = []) {
return $this->getBaseEncoder()->encode($data, $format, $context);
}
@@ -74,7 +74,7 @@ class XmlEncoder extends SerializerAwareEncoder implements EncoderInterface, Dec
/**
* {@inheritdoc}
*/
- public function decode($data, $format, array $context = []){
+ public function decode($data, $format, array $context = []) {
return $this->getBaseEncoder()->decode($data, $format, $context);
}
diff --git a/core/modules/simpletest/src/RouteProvider.php b/core/modules/simpletest/src/RouteProvider.php
index 3aacc40..edb330b 100644
--- a/core/modules/simpletest/src/RouteProvider.php
+++ b/core/modules/simpletest/src/RouteProvider.php
@@ -49,7 +49,7 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
/**
* {@inheritdoc}
*/
- public function preLoadRoutes($names){
+ public function preLoadRoutes($names) {
return $this->lazyLoadItself()->preLoadRoutes($names);
}
diff --git a/core/modules/system/tests/src/Functional/File/ConfigTest.php b/core/modules/system/tests/src/Functional/File/ConfigTest.php
index f413c38..caf6915 100644
--- a/core/modules/system/tests/src/Functional/File/ConfigTest.php
+++ b/core/modules/system/tests/src/Functional/File/ConfigTest.php
@@ -11,7 +11,7 @@ use Drupal\Tests\BrowserTestBase;
*/
class ConfigTest extends BrowserTestBase {
- protected function setUp(){
+ protected function setUp() {
parent::setUp();
$this->drupalLogin($this->drupalCreateUser(['administer site configuration']));
}
diff --git a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
index fc8958c..c0ee2d1 100644
--- a/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
+++ b/core/modules/user/tests/src/Functional/UserRolesAssignmentTest.php
@@ -21,7 +21,7 @@ class UserRolesAssignmentTest extends BrowserTestBase {
* Tests that a user can be assigned a role and that the role can be removed
* again.
*/
- public function testAssignAndRemoveRole() {
+ public function testAssignAndRemoveRole() {
$rid = $this->drupalCreateRole(['administer users']);
$account = $this->drupalCreateUser();
diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
index e1eab3e..012dec4 100644
--- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php
@@ -1470,7 +1470,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte
'#title' => $this->t('Show contextual links'),
'#default_value' => $this->getOption('show_admin_links'),
];
- break;
+ break;
case 'use_more':
$form['#title'] .= $this->t('Add a more link to the bottom of the display.');
$form['use_more'] = [
@@ -1865,7 +1865,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte
if (preg_match('/[^a-zA-Z0-9-_ ]/', $css_class)) {
$form_state->setError($form['css_class'], $this->t('CSS classes must be alphanumeric or dashes only.'));
}
- break;
+ break;
case 'display_id':
if ($form_state->getValue('display_id')) {
if (preg_match('/[^a-z0-9_]/', $form_state->getValue('display_id'))) {
diff --git a/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php b/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
index 1495399..1ef2009 100644
--- a/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
+++ b/core/modules/views/tests/src/Kernel/Plugin/StyleGridTest.php
@@ -69,11 +69,16 @@ class StyleGridTest extends PluginKernelTestBase {
}
$width = '0';
switch ($columns) {
- case 5: $width = '20'; break;
- case 4: $width = '25'; break;
- case 3: $width = '33.3333'; break;
- case 2: $width = '50'; break;
- case 1: $width = '100'; break;
+ case 5: $width = '20';
+ break;
+ case 4: $width = '25';
+ break;
+ case 3: $width = '33.3333';
+ break;
+ case 2: $width = '50';
+ break;
+ case 1: $width = '100';
+ break;
}
// Ensure last column exists.
$result = $this->xpath('//div[contains(@class, "views-col") and contains(@class, :columns) and starts-with(@style, :width)]', [':columns' => 'col-' . $columns, ':width' => 'width: ' . $width]);
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 6e7e024..9224543 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -126,6 +126,7 @@
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OpenBracketSpacingSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OpenTagNewlineSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OperatorSpacingSniff.php"/>
+ <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ScopeIndentSniff.php"/>
<!-- Drupal Practice sniffs -->
@@ -136,6 +137,11 @@
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
+ <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie">
+ <properties>
+ <property name="checkClosures" value="true"/>
+ </properties>
+ </rule>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
diff --git a/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php b/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
index bdf66bd..ff401e1 100644
--- a/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
+++ b/core/tests/Drupal/KernelTests/Core/File/UrlRewritingTest.php
@@ -21,7 +21,7 @@ class UrlRewritingTest extends FileTestBase {
/**
* Tests the rewriting of shipped file URLs by hook_file_url_alter().
*/
- public function testShippedFileURL() {
+ public function testShippedFileURL() {
// Test generating a URL to a shipped file (i.e. a file that is part of
// Drupal core, a module or a theme, for example a JavaScript file).
diff --git a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc
index da3a9c2..ed4fb46 100644
--- a/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc
+++ b/core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/hook_include.inc
@@ -8,4 +8,5 @@
/**
* Test hook.
*/
-function module_handler_test_hook_include() {}
+function module_handler_test_hook_include() {
+}
diff --git a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
index 4d34b30..5e4f1d0 100644
--- a/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
+++ b/core/tests/Drupal/Tests/Core/Site/SettingsTest.php
@@ -28,7 +28,7 @@ class SettingsTest extends UnitTestCase {
/**
* @covers ::__construct
*/
- protected function setUp(){
+ protected function setUp() {
$this->config = [
'one' => '1',
'two' => '2',
diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
index 9171a3f..8149551 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -451,7 +451,7 @@ class WebAssert extends MinkWebAssert {
* @throws \Behat\Mink\Exception\ElementNotFoundException
* @throws \Behat\Mink\Exception\ExpectationException
*/
- public function fieldDisabled($field, TraversableElement $container = NULL) {
+ public function fieldDisabled($field, TraversableElement $container = NULL) {
$container = $container ?: $this->session->getPage();
$node = $container->findField($field);