Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
InvalidPhpRegularExpression | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\RegexValueObjects\Exceptions; |
3 | |
4 | use Apie\Core\Exceptions\ApieException; |
5 | use Apie\Core\ValueObjects\Utils; |
6 | |
7 | class InvalidPhpRegularExpression extends ApieException |
8 | { |
9 | public function __construct(mixed $input, string $errorMessage) |
10 | { |
11 | parent::__construct( |
12 | sprintf( |
13 | '%s is not a valid regular expression. Error message: %s', |
14 | Utils::displayMixedAsString($input), |
15 | $errorMessage |
16 | ) |
17 | ); |
18 | } |
19 | } |