Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 728c8f8

Browse files
minor: Add default value to Factory::attributes (#1026)
1 parent 0fe1017 commit 728c8f8

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

phpstan.neon

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,10 @@ parameters:
4141
- identifier: property.readOnlyByPhpDocDefaultValue
4242
paths:
4343
- src/Object/Hydrator.php
44+
- src/Factory.php
4445
- src/ObjectFactory.php
4546
- src/Persistence/PersistentObjectFactory.php
4647

47-
# Hydrator and Factory are annotated @immutable
48-
- identifier: property.uninitializedReadonlyByPhpDoc
49-
paths:
50-
- src/Factory.php
51-
5248
# Hydrator and Factory are annotated @immutable
5349
- identifier: property.readOnlyByPhpDocAssignNotInConstructor
5450
paths:

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
abstract class Factory
2828
{
2929
/** @phpstan-var Attributes[] */
30-
private array $attributes;
30+
private array $attributes = [];
3131

3232
// keep an empty constructor for BC
3333
public function __construct()

0 commit comments

Comments
 (0)