diff --git a/src/Languages/Php/Patterns/AttributePattern.php b/src/Languages/Php/Patterns/AttributePattern.php index 0462cfd..1caec9f 100644 --- a/src/Languages/Php/Patterns/AttributePattern.php +++ b/src/Languages/Php/Patterns/AttributePattern.php @@ -19,7 +19,8 @@ output: '#[Foo( prop: hi, -)]'), +)]' + ), ] final readonly class AttributePattern implements Pattern { diff --git a/src/Languages/Php/Patterns/TypedConstantNamePattern.php b/src/Languages/Php/Patterns/TypedConstantNamePattern.php index 54bc810..b3860b4 100644 --- a/src/Languages/Php/Patterns/TypedConstantNamePattern.php +++ b/src/Languages/Php/Patterns/TypedConstantNamePattern.php @@ -1,7 +1,8 @@ getAttributes(PatternTest::class); -// if ($attributes === []) { -// $this->fail("No #[PatternTest] attribute found on {$reflectionClass->getName()}"); -// } + // if ($attributes === []) { + // $this->fail("No #[PatternTest] attribute found on {$reflectionClass->getName()}"); + // } foreach ($attributes as $attribute) { /** @var PatternTest $patternTest */ @@ -44,4 +45,4 @@ public function test_patterns_with_attribute() } } } -} \ No newline at end of file +} diff --git a/tests/TestsPatterns.php b/tests/TestsPatterns.php index bacb05f..c35cc3c 100644 --- a/tests/TestsPatterns.php +++ b/tests/TestsPatterns.php @@ -12,8 +12,7 @@ public function assertMatches( Pattern $pattern, string $content, string|array $expected, - ): void - { + ): void { $matches = $pattern->match($content); if (is_string($expected)) {