Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
20.00% |
1 / 5 |
|
20.00% |
1 / 5 |
CRAP | |
0.00% |
0 / 1 |
NullConnection | |
20.00% |
1 / 5 |
|
20.00% |
1 / 5 |
17.80 | |
0.00% |
0 / 1 |
connect | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
jsonSerialize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
beginTransaction | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
rollBack | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
commit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * Jingga |
4 | * |
5 | * PHP Version 8.1 |
6 | * |
7 | * @package phpOMS\DataStorage\Database\Connection |
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\Connection; |
16 | |
17 | /** |
18 | * Database handler. |
19 | * |
20 | * @package phpOMS\DataStorage\Database\Connection |
21 | * @license OMS License 2.0 |
22 | * @link https://jingga.app |
23 | * @since 1.0.0 |
24 | */ |
25 | final class NullConnection extends ConnectionAbstract |
26 | { |
27 | /** |
28 | * {@inheritdoc} |
29 | */ |
30 | public function connect(array $dbdata = null) : void |
31 | { |
32 | } |
33 | |
34 | /** |
35 | * {@inheritdoc} |
36 | */ |
37 | public function jsonSerialize() : mixed |
38 | { |
39 | return ['id' => $this->id]; |
40 | } |
41 | |
42 | /** |
43 | * {@inheritdoc} |
44 | */ |
45 | public function beginTransaction() : void |
46 | { |
47 | } |
48 | |
49 | /** |
50 | * {@inheritdoc} |
51 | */ |
52 | public function rollBack() : void |
53 | { |
54 | } |
55 | |
56 | /** |
57 | * {@inheritdoc} |
58 | */ |
59 | public function commit() : void |
60 | { |
61 | } |
62 | } |