1 | <?php |
||
23 | class SynchronizationPool extends Component |
||
24 | { |
||
25 | /** |
||
26 | * @var AbstractTable[] |
||
27 | */ |
||
28 | private $tables = []; |
||
29 | |||
30 | /** |
||
31 | * @var Driver[] |
||
32 | */ |
||
33 | private $drivers = []; |
||
34 | |||
35 | /** |
||
36 | * @param AbstractTable[] $tables |
||
37 | */ |
||
38 | public function __construct(array $tables) |
||
44 | |||
45 | /** |
||
46 | * @return AbstractTable[] |
||
47 | */ |
||
48 | public function getTables() |
||
52 | |||
53 | /** |
||
54 | * List of tables sorted in order of cross dependency. |
||
55 | * |
||
56 | * @return AbstractTable[] |
||
57 | */ |
||
58 | public function sortedTables(): array |
||
70 | |||
71 | /** |
||
72 | * Synchronize tables. |
||
73 | * |
||
74 | * @param LoggerInterface|null $logger |
||
75 | * |
||
76 | * @throws \Exception |
||
77 | * @throws \Throwable |
||
78 | */ |
||
79 | public function run(LoggerInterface $logger = null) |
||
115 | |||
116 | /** |
||
117 | * Begin mass transaction. |
||
118 | */ |
||
119 | protected function beginTransaction() |
||
125 | |||
126 | /** |
||
127 | * Commit mass transaction. |
||
128 | */ |
||
129 | protected function commitTransaction() |
||
135 | |||
136 | /** |
||
137 | * Roll back mass transaction. |
||
138 | */ |
||
139 | protected function rollbackTransaction() |
||
145 | |||
146 | /** |
||
147 | * Collecting all involved drivers. |
||
148 | */ |
||
149 | private function collectDrivers() |
||
157 | |||
158 | /** |
||
159 | * @param LoggerInterface $logger |
||
160 | */ |
||
161 | private function dropForeigns(LoggerInterface $logger) |
||
169 | |||
170 | /** |
||
171 | * @param LoggerInterface $logger |
||
172 | */ |
||
173 | private function dropIndexes(LoggerInterface $logger) |
||
182 | |||
183 | /** |
||
184 | * @param LoggerInterface $logger |
||
185 | */ |
||
186 | private function runChanges(LoggerInterface $logger) |
||
195 | |||
196 | /** |
||
197 | * @param LoggerInterface $logger |
||
198 | */ |
||
199 | private function resetSchemas(LoggerInterface $logger) |
||
205 | } |
||
206 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):