Total Complexity | 9 |
Total Lines | 63 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class TableStatus |
||
10 | { |
||
11 | /** @var AbstractSchemaManager */ |
||
12 | private $schemaManager; |
||
13 | |||
14 | /** @var TableDefinition */ |
||
15 | private $migrationTable; |
||
16 | |||
17 | /** @var bool|null */ |
||
18 | private $created; |
||
19 | |||
20 | /** @var bool|null */ |
||
21 | private $upToDate; |
||
22 | |||
23 | 82 | public function __construct( |
|
29 | 82 | } |
|
30 | |||
31 | 76 | public function setCreated(bool $created) : void |
|
34 | 76 | } |
|
35 | |||
36 | 79 | public function isCreated() : bool |
|
37 | { |
||
38 | 79 | if ($this->created !== null) { |
|
39 | 65 | return $this->created; |
|
40 | } |
||
41 | |||
42 | 78 | $this->created = $this->schemaManager->tablesExist([$this->migrationTable->getName()]); |
|
43 | |||
44 | 78 | return $this->created; |
|
45 | } |
||
46 | |||
47 | 2 | public function setUpToDate(bool $upToDate) : void |
|
50 | 2 | } |
|
51 | |||
52 | 62 | public function isUpToDate() : bool |
|
72 | } |
||
73 | } |
||
74 |