Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| WeakPassword | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| of | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Identity\Domain\Exceptions; |
| 6 | |
| 7 | use InvalidArgumentException; |
| 8 | |
| 9 | /** |
| 10 | * Extends InvalidArgumentException so the controllers' existing |
| 11 | * `catch (InvalidArgumentException) → 400` covers a weak password unchanged. |
| 12 | */ |
| 13 | final class WeakPassword extends InvalidArgumentException |
| 14 | { |
| 15 | public static function of(string $reason): self |
| 16 | { |
| 17 | return new self($reason); |
| 18 | } |
| 19 | } |