| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class InvalidEmail implements Result |
||
| 8 | { |
||
| 9 | private $token; |
||
| 10 | /** |
||
| 11 | * @var Reason |
||
| 12 | */ |
||
| 13 | protected $reason; |
||
| 14 | |||
| 15 | 151 | public function __construct(Reason $reason, string $token) |
|
| 16 | { |
||
| 17 | 151 | $this->token = $token; |
|
| 18 | 151 | $this->reason = $reason; |
|
| 19 | 151 | } |
|
| 20 | |||
| 21 | 8 | public function isValid(): bool |
|
| 22 | { |
||
| 23 | 8 | return false; |
|
| 24 | } |
||
| 25 | |||
| 26 | 127 | public function isInvalid(): bool |
|
| 27 | { |
||
| 28 | 127 | return true; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function description(): string |
|
| 32 | { |
||
| 33 | 1 | return $this->reason->description() . " in char " . $this->token; |
|
| 34 | } |
||
| 35 | |||
| 36 | 1 | public function code(): int |
|
| 39 | } |
||
| 40 | |||
| 41 | 8 | public function reason() : Reason |
|
| 44 | } |
||
| 45 | |||
| 46 | } |