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

Doctrine CS 12 #487

Merged
merged 1 commit into from
Aug 14, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class ClassWithInvalidAnnotationTargetAtProperty
*/
public $foo;


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


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

Expand Down
Original file line number Diff line number Diff line change
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