1 | <?php |
||
12 | final class SchemaUpdateCommand |
||
13 | { |
||
14 | /** |
||
15 | * @var Connection |
||
16 | */ |
||
17 | private $connection; |
||
18 | |||
19 | /** |
||
20 | * @var |
||
21 | */ |
||
22 | private $schemaPath; |
||
23 | |||
24 | /** |
||
25 | * @param Connection $connection |
||
26 | * @param string $schemaPath |
||
27 | */ |
||
28 | 5 | public function __construct(Connection $connection, string $schemaPath) |
|
33 | |||
34 | /** |
||
35 | * @param InputInterface $input |
||
36 | * @param OutputInterface $output |
||
37 | * |
||
38 | * @return int|null |
||
39 | */ |
||
40 | 5 | public function __invoke(InputInterface $input, OutputInterface $output) |
|
68 | |||
69 | /** |
||
70 | * @param OutputInterface $output |
||
71 | * @param array $statements |
||
72 | * @param bool $dump |
||
73 | * @param bool $force |
||
74 | */ |
||
75 | 3 | private function update(OutputInterface $output, array $statements, bool $dump, bool $force) |
|
85 | |||
86 | /** |
||
87 | * @return array |
||
88 | */ |
||
89 | 5 | private function getStatements(): array |
|
101 | |||
102 | /** |
||
103 | * @param OutputInterface $output |
||
104 | * @param array $statements |
||
105 | */ |
||
106 | 1 | private function dump(OutputInterface $output, array $statements) |
|
116 | |||
117 | /** |
||
118 | * @param array $statements |
||
119 | */ |
||
120 | 1 | private function force(array $statements) |
|
130 | |||
131 | /** |
||
132 | * @param OutputInterface $output |
||
133 | * @param array $statements |
||
134 | */ |
||
135 | 1 | private function dumpAndForce(OutputInterface $output, array $statements) |
|
148 | } |
||
149 |