1 | <?php |
||
10 | class Connection |
||
11 | { |
||
12 | /** |
||
13 | * @var Operation[] |
||
14 | */ |
||
15 | protected $operations = []; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $idx = 0; |
||
21 | |||
22 | /** |
||
23 | * @var int[] |
||
24 | */ |
||
25 | protected $savePoints = []; |
||
26 | |||
27 | /** |
||
28 | * @var int |
||
29 | */ |
||
30 | protected $depth = 0; |
||
31 | |||
32 | /** |
||
33 | * @var null|string |
||
34 | */ |
||
35 | protected $connectionId; |
||
36 | |||
37 | /** |
||
38 | * Connection constructor. |
||
39 | * |
||
40 | * @param null|string $connectionId |
||
41 | * (optional) The id of the connection. |
||
42 | */ |
||
43 | public function __construct($connectionId = null) |
||
47 | |||
48 | /** |
||
49 | * Get connection id. |
||
50 | * |
||
51 | * @return null|string |
||
52 | */ |
||
53 | public function connectionId() |
||
57 | |||
58 | /** |
||
59 | * Remove savepoints to and acquire index of latest active savepoint. |
||
60 | * |
||
61 | * @param int $oldDepth |
||
62 | * The old depth. |
||
63 | * @param $newDepth |
||
64 | * The new depth. |
||
65 | * |
||
66 | * @return int|null |
||
67 | * The last index, if found. |
||
68 | */ |
||
69 | public function closeSavepoints($oldDepth, $newDepth) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function startTransaction($newDepth = null) |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function commitTransaction($newDepth = null) |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | public function rollbackTransaction($newDepth = null) |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function addOperation(Operation $operation) |
||
157 | |||
158 | /** |
||
159 | * {@inheritdoc} |
||
160 | */ |
||
161 | public function getOperation($idx) |
||
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | public function performOperation($idx) |
||
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | public function removeOperation($idx) |
||
181 | } |
||
182 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.