Skip to content

Commit 7b24e11

Browse files
author
Dominik Liebler
authored
Merge pull request DesignPatternsPHP#476 from sjokkateer/improvement/EAV
EAV: Update missing type declarations
2 parents 24078ed + 83df396 commit 7b24e11

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

More/EAV/Attribute.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct(private string $name)
1515
$this->values = new SplObjectStorage();
1616
}
1717

18-
public function addValue(Value $value)
18+
public function addValue(Value $value): void
1919
{
2020
$this->values->attach($value);
2121
}

More/EAV/Entity.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Entity implements \Stringable
1616
/**
1717
* @param Value[] $values
1818
*/
19-
public function __construct(private string $name, $values)
19+
public function __construct(private string $name, array $values)
2020
{
2121
$this->values = new SplObjectStorage();
2222

More/EAV/Tests/EAVTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class EAVTest extends TestCase
1313
{
14-
public function testCanAddAttributeToEntity()
14+
public function testCanAddAttributeToEntity(): void
1515
{
1616
$colorAttribute = new Attribute('color');
1717
$colorSilver = new Value($colorAttribute, 'silver');

0 commit comments

Comments
 (0)