Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| InvalidMapperException | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\DataStorage\Database\Exception |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\DataStorage\Database\Exception; |
| 16 | |
| 17 | /** |
| 18 | * Permission exception class. |
| 19 | * |
| 20 | * @package phpOMS\DataStorage\Database\Exception |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | final class InvalidMapperException extends \RuntimeException |
| 26 | { |
| 27 | /** |
| 28 | * Constructor. |
| 29 | * |
| 30 | * @param string $message Exception message |
| 31 | * @param int $code Exception code |
| 32 | * @param \Exception $previous Previous exception |
| 33 | * |
| 34 | * @since 1.0.0 |
| 35 | */ |
| 36 | public function __construct(string $message = '', int $code = 0, \Exception $previous = null) |
| 37 | { |
| 38 | if ($message === '') { |
| 39 | parent::__construct('Empty mapper.', $code, $previous); |
| 40 | } else { |
| 41 | parent::__construct('Mapper "' . $message . '" is invalid.', $code, $previous); |
| 42 | } |
| 43 | } |
| 44 | } |