| Total Complexity | 3 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class HashedBasicEquals extends ARule |
||
| 17 | { |
||
| 18 | 2 | public function validate(IValidate $entry): void |
|
| 19 | { |
||
| 20 | 2 | if ($this->hash(strval($entry->getValue())) != $this->hash(strval($this->againstValue))) { |
|
| 21 | 1 | throw new RuleException($this->errorText); |
|
| 22 | } |
||
| 23 | 1 | } |
|
| 24 | |||
| 25 | 2 | protected function hash(string $input): string |
|
| 28 | } |
||
| 29 | } |
||
| 30 |