| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function validate(string $tin) |
||
| 15 | { |
||
| 16 | $normalizedTIN = StringUtil::fillWith0UntilLength($tin, self::LENGTH); |
||
| 17 | if (!$this->isFollowLength($normalizedTIN)) { |
||
| 18 | return StatusCode::INVALID_LENGTH; |
||
| 19 | } |
||
| 20 | if (!$this->isFollowMaltaRule($normalizedTIN)) { |
||
| 21 | return StatusCode::INVALID_PATTERN; |
||
| 22 | } |
||
| 23 | return StatusCode::VALID; |
||
| 24 | } |
||
| 41 |