Open Danack opened 10 years ago
Done - but interface declaration is missing on the class generated:
class ValueCompositeWithoutHolder
{
private $email = null;
private $minLength = null;
public function __construct(\Example\Composite\Value\Email $email, \Example\Composite\Value\MinLength $minLength)
{
$this->email = $email;
$this->minLength = $minLength;
}
public function isValid($value)
{
$result = true;
$result = $result && $this->email->isValid($value);
$result = $result && $this->minLength->isValid($value);
return $result;
}
}
It should have the interface declared.
Currently you have to write a 'holder' class to be able to do a composite with - which is dumb.
You should be able to do it straight from the interface definition.