Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| DuplicateIdentifierException | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Exceptions; |
| 3 | |
| 4 | use Apie\Core\ValueObjects\Utils; |
| 5 | |
| 6 | /** |
| 7 | * Exception thrown when a an identifier is already defined. |
| 8 | */ |
| 9 | final class DuplicateIdentifierException extends ApieException |
| 10 | { |
| 11 | public function __construct(string $identifier, mixed $alreadyDefined, mixed $newValue) |
| 12 | { |
| 13 | parent::__construct( |
| 14 | sprintf( |
| 15 | 'Duplicate identifier "%s"! Value already defined is "%s". New value defined is "%s"', |
| 16 | $identifier, |
| 17 | Utils::displayMixedAsString($alreadyDefined), |
| 18 | Utils::displayMixedAsString($newValue) |
| 19 | ) |
| 20 | ); |
| 21 | } |
| 22 | } |