Skip to content

Commit 39738c9

Browse files
committed
ApiResource attributes default value to null
1 parent a20bb89 commit 39738c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Annotation/AttributesHydratorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ trait AttributesHydratorTrait
3737
/**
3838
* @var array
3939
*/
40-
public $attributes = [];
40+
public $attributes = null;
4141

4242
/**
4343
* @throws InvalidArgumentException

src/Metadata/Resource/Factory/AnnotationResourceMetadataFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private function createMetadata(ApiResource $annotation, ResourceMetadata $paren
8585
$annotation->iri,
8686
$annotation->itemOperations,
8787
$annotation->collectionOperations,
88-
$annotation->attributes ?: null,
88+
$annotation->attributes,
8989
$annotation->subresourceOperations,
9090
$annotation->graphql
9191
);

0 commit comments

Comments
 (0)