From 3a18d596b948d43a56c63f89d80e0165749e4bc7 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Thu, 25 Feb 2016 13:14:55 +0900 Subject: [PATCH] Issue #2666172 by alexpott: PHPCS configuration should include rules and not exclude them --- .../FileSystem/RegexDirectoryIterator.php | 2 +- .../update/drupal-8.language-enabled.php | Bin 6316 -> 6346 bytes core/phpcs.xml.dist | 93 ++++++------------ .../Tests/Core/Entity/EntityFormTest.php | 6 +- 4 files changed, 34 insertions(+), 67 deletions(-) diff --git a/core/lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php b/core/lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php index 675dfc84682..c8a727343e5 100644 --- a/core/lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php +++ b/core/lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php @@ -26,7 +26,7 @@ class RegexDirectoryIterator extends \FilterIterator { * The path to scan. * @param string $regex * The regular expression to match, including delimiters. For example, - /\.yml$/ would list only files ending in .yml. + * /\.yml$/ would list only files ending in .yml. */ public function __construct($path, $regex) { // Use FilesystemIterator to not iterate over the the . and .. directories. diff --git a/core/modules/system/tests/fixtures/update/drupal-8.language-enabled.php b/core/modules/system/tests/fixtures/update/drupal-8.language-enabled.php index d80e74ef8e62ec9a730045cae83e4af09d8f932d..05bcf8e984c4afba472c12542fc5ba1335f0edd7 100644 GIT binary patch delta 44 zcmZ2uc*;=O#=anv9PITxt*a delta 14 VcmX?QxW>Wd1vCHv diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index cadf5447c84..e0936d0a034 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -10,67 +10,34 @@ ./modules/system/tests/fixtures/HtaccessTest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php index b08f9f06f2b..30bd12cf1ce 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php @@ -159,7 +159,7 @@ class EntityFormTest extends UnitTestCase { public function testGetEntityFromRouteMatchAdd() { $entity = $this->prophesize(EntityInterface::class)->reveal(); $this->setUpStorage()->create([])->willReturn($entity); - $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); + $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); $actual = $this->entityForm->getEntityFromRouteMatch($route_match, $this->entityType->id()); $this->assertEquals($entity, $actual); } @@ -178,7 +178,7 @@ class EntityFormTest extends UnitTestCase { // Test without a bundle parameter in the route. $storage->create([])->willReturn($entity); - $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); + $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); $actual = $this->entityForm->getEntityFromRouteMatch($route_match, $this->entityType->id()); $this->assertEquals($entity, $actual); @@ -208,7 +208,7 @@ class EntityFormTest extends UnitTestCase { // Test without a bundle parameter in the route. $storage->create([])->willReturn($entity); - $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); + $route_match = new RouteMatch('test_route', new Route('/entity-test/add')); $actual = $this->entityForm->getEntityFromRouteMatch($route_match, $this->entityType->id()); $this->assertEquals($entity, $actual);