Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated doctrine/coding-standard to 6.0 #545

Merged
merged 1 commit into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ public function getConfigTreeBuilder()
->always(static function ($v) {
if ($v === false) {
return ODMConfiguration::AUTOGENERATE_EVAL;
} elseif ($v === true) {
}

if ($v === true) {
return ODMConfiguration::AUTOGENERATE_FILE_NOT_EXISTS;
}

return $v;
})
->end()
Expand All @@ -66,9 +69,12 @@ public function getConfigTreeBuilder()
->always(static function ($v) {
if ($v === false) {
return ODMConfiguration::AUTOGENERATE_NEVER;
} elseif ($v === true) {
}

if ($v === true) {
return ODMConfiguration::AUTOGENERATE_ALWAYS;
}

return $v;
})
->end()
Expand Down
1 change: 1 addition & 0 deletions Tests/DependencyInjection/AbstractMongoDBExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ private function assertDefinitionMethodCallAny(Definition $definition, $methodNa

try {
$this->assertSame($params, $call[1], "Expected parameters to method '" . $methodName . "' did not match the actual parameters.");

return;
} catch (PHPUnit_Framework_AssertionFailedError $e) {
$lastError = $e;
Expand Down
1 change: 0 additions & 1 deletion Tests/Form/Type/DocumentTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ protected function tearDown()
parent::tearDown();
}


public function testDocumentManagerOptionSetsEmOption()
{
$field = $this->factory->createNamed('name', $this->typeFQCN ? DocumentType::CLASS : 'document', null, [
Expand Down
1 change: 0 additions & 1 deletion Tests/Form/Type/TypeGuesserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ protected function tearDown()
parent::tearDown();
}


public function testTypesShouldBeGuessedCorrectly()
{
$form = $this->factory->create($this->typeFQCN ? GuesserTestType::class : new GuesserTestType(), null, ['dm' => $this->dm]);
Expand Down
2 changes: 2 additions & 0 deletions Tests/Mapping/Driver/AbstractDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public function testFindMappingNamespaceNotFound()
}

abstract protected function getFileExtension();

abstract protected function getFixtureDir();

abstract protected function getDriver(array $paths = []);

private function getDriverLocator(FileDriver $driver)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"symfony/options-resolver": "^3.4 || ^4.0"
},
"require-dev": {
"doctrine/coding-standard": "^5.0",
"doctrine/coding-standard": "^6.0",
"doctrine/data-fixtures": "@dev",
"phpunit/phpunit": "^7.3",
"symfony/form": "^3.4 || ^4.0",
Expand Down
1 change: 1 addition & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming" />
</rule>

<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements">
Expand Down