Skip to content

Commit ceafe5d

Browse files
committed
[PropertyInfo] Fix code review
1 parent 450cabb commit ceafe5d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/Symfony/Component/PropertyInfo/PropertyAttributesExtractorInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ interface PropertyAttributesExtractorInterface
2121
*
2222
* Returns an array of attributes, each attribute is an associative array with the following keys:
2323
* - name: The fully-qualified class name of the attribute
24-
* - arguments: An associative array of attribute arguments
24+
* - arguments: An associative array of attribute arguments if present
25+
*
26+
* @return array<int, array{name: string, arguments: array<array-key, mixed>}>|null
2527
*/
2628
public function getAttributes(string $class, string $property, array $context = []): ?array;
2729
}

src/Symfony/Component/PropertyInfo/Tests/Extractor/ReflectionExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,14 +501,14 @@ public static function getInitializableProperties(): array
501501
}
502502

503503
/**
504-
* @dataProvider getAttributes
504+
* @dataProvider attributesProvider
505505
*/
506506
public function testGetAttributes(string $class, string $property, ?array $expected)
507507
{
508508
$this->assertSame($expected, $this->extractor->getAttributes($class, $property));
509509
}
510510

511-
public static function getAttributes(): array
511+
public static function attributesProvider(): array
512512
{
513513
return [
514514
[

src/Symfony/Component/PropertyInfo/Tests/Fixtures/DummyAttribute.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public function __construct(
99
public string $type,
1010
public string $name,
1111
public int $version,
12-
)
13-
{
12+
) {
1413
}
1514
}

0 commit comments

Comments
 (0)