Skip to content

Commit

Permalink
Doctrine CS 12 (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Aug 14, 2023
1 parent fb0d71a commit 002e496
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -39,7 +39,7 @@
},
"require-dev": {
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/coding-standard": "^9 || ^10",
"doctrine/coding-standard": "^9 || ^12",
"phpstan/phpstan": "~1.4.10 || ^1.8.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"symfony/cache": "^4.4 || ^5.4 || ^6",
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/Common/Annotations/DocLexer.php
Expand Up @@ -74,7 +74,7 @@ public function nextTokenIsAdjacent(): bool
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getCatchablePatterns()
{
Expand All @@ -86,15 +86,15 @@ protected function getCatchablePatterns()
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getNonCatchablePatterns()
{
return ['\s+', '\*+', '(.)'];
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getType(&$value)
{
Expand Down
7 changes: 7 additions & 0 deletions phpcs.xml.dist
Expand Up @@ -56,6 +56,11 @@
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/SimpleAnnotationReaderTest.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash.UseStartsWithBackslash">
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/*</exclude-pattern>
</rule>
Expand Down Expand Up @@ -88,6 +93,7 @@

<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName">
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM141Test.php</exclude-pattern>
</rule>

<!-- It is easier to understand tests that involve annotations if you can
Expand Down Expand Up @@ -119,6 +125,7 @@
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingAnyTypeHint">
<!-- there is a class property with an empty var annotation on purpose -->
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/DummyClass.php</exclude-pattern>
<exclude-pattern>*/tests/Doctrine/Tests/Common/Annotations/Fixtures/ClassWithValidAnnotationTarget.php</exclude-pattern>
</rule>

Expand Down
Expand Up @@ -16,7 +16,6 @@ class ClassWithInvalidAnnotationTargetAtProperty
*/
public $foo;


/**
* @var mixed
* @AnnotationTargetAnnotation("Foo")
Expand Down
Expand Up @@ -14,7 +14,6 @@ class ClassWithValidAnnotationTarget
/** @AnnotationTargetPropertyMethod("Some data") */
public $foo;


/** @AnnotationTargetAll("Some data",name="Some name") */
public $name;

Expand Down
Expand Up @@ -19,6 +19,7 @@ class SimpleAnnotationReaderTest extends AbstractReaderTest
public function testImportDetectsNotImportedAnnotation(): void
{
$this->ignoreIssues();

parent::testImportDetectsNotImportedAnnotation();
}

Expand All @@ -31,6 +32,7 @@ public function testImportDetectsNotImportedAnnotation(): void
public function testImportDetectsNonExistentAnnotation(): void
{
$this->ignoreIssues();

parent::testImportDetectsNonExistentAnnotation();
}

Expand All @@ -43,6 +45,7 @@ public function testImportDetectsNonExistentAnnotation(): void
public function testClassWithInvalidAnnotationTargetAtClassDocBlock(): void
{
$this->ignoreIssues();

parent::testClassWithInvalidAnnotationTargetAtClassDocBlock();
}

Expand All @@ -55,6 +58,7 @@ public function testClassWithInvalidAnnotationTargetAtClassDocBlock(): void
public function testClassWithInvalidAnnotationTargetAtPropertyDocBlock(): void
{
$this->ignoreIssues();

parent::testClassWithInvalidAnnotationTargetAtPropertyDocBlock();
}

Expand All @@ -67,6 +71,7 @@ public function testClassWithInvalidAnnotationTargetAtPropertyDocBlock(): void
public function testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock(): void
{
$this->ignoreIssues();

parent::testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock();
}

Expand All @@ -79,6 +84,7 @@ public function testClassWithInvalidNestedAnnotationTargetAtPropertyDocBlock():
public function testClassWithInvalidAnnotationTargetAtMethodDocBlock(): void
{
$this->ignoreIssues();

parent::testClassWithInvalidAnnotationTargetAtMethodDocBlock();
}

Expand All @@ -91,6 +97,7 @@ public function testClassWithInvalidAnnotationTargetAtMethodDocBlock(): void
public function testErrorWhenInvalidAnnotationIsUsed(): void
{
$this->ignoreIssues();

parent::testErrorWhenInvalidAnnotationIsUsed();
}

Expand Down

0 comments on commit 002e496

Please sign in to comment.