Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
LockException | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | /** |
3 | * Jingga |
4 | * |
5 | * PHP Version 8.1 |
6 | * |
7 | * @package phpOMS\DataStorage |
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; |
16 | |
17 | /** |
18 | * Lock exception class. |
19 | * |
20 | * This exception is used for instances that have a lock componenent/state after which rendering, |
21 | * header manipulation etc. are no longer allowed/possible. |
22 | * |
23 | * @package phpOMS\DataStorage |
24 | * @license OMS License 2.0 |
25 | * @link https://jingga.app |
26 | * @since 1.0.0 |
27 | */ |
28 | final class LockException extends \RuntimeException |
29 | { |
30 | /** |
31 | * Constructor. |
32 | * |
33 | * @param string $message Exception message |
34 | * @param int $code Exception code |
35 | * @param \Exception $previous Previous exception |
36 | * |
37 | * @since 1.0.0 |
38 | */ |
39 | public function __construct(string $message, int $code = 0, \Exception $previous = null) |
40 | { |
41 | parent::__construct('Interaction with "' . $message . '" already locked.', $code, $previous); |
42 | } |
43 | } |