Merge pull request #476 from sjokkateer/improvement/EAV

EAV: Update missing type declarations
This commit is contained in:
Dominik Liebler
2022-05-19 12:42:01 +02:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ class Attribute implements \Stringable
$this->values = new SplObjectStorage();
}
public function addValue(Value $value)
public function addValue(Value $value): void
{
$this->values->attach($value);
}

View File

@@ -16,7 +16,7 @@ class Entity implements \Stringable
/**
* @param Value[] $values
*/
public function __construct(private string $name, $values)
public function __construct(private string $name, array $values)
{
$this->values = new SplObjectStorage();

View File

@@ -11,7 +11,7 @@ use PHPUnit\Framework\TestCase;
class EAVTest extends TestCase
{
public function testCanAddAttributeToEntity()
public function testCanAddAttributeToEntity(): void
{
$colorAttribute = new Attribute('color');
$colorSilver = new Value($colorAttribute, 'silver');