for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace BestServedCold\PhalueObjects\Internet;
use BestServedCold\PhalueObjects\ValueObject;
use BestServedCold\PhalueObjects\Exception\InvalidTypeException;
final class Email extends ValueObject
{
public function __construct($value)
if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
throw new InvalidTypeException($value, [ 'email' ]);
}
parent::__construct($value);