Files
DesignPatternsPHP/More/EAV/Value.php
Mario Simão 56970cc221 style: Adopt PSR12
Dev dependency flyeralarm/php-code-validator has been removed.

Closes #444
2021-10-01 10:26:04 -03:00

19 lines
369 B
PHP

<?php
declare(strict_types=1);
namespace DesignPatterns\More\EAV;
class Value implements \Stringable
{
public function __construct(private Attribute $attribute, private string $name)
{
$attribute->addValue($this);
}
public function __toString(): string
{
return sprintf('%s: %s', (string) $this->attribute, $this->name);
}
}