Conditions | 4 |
Paths | 4 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
52 | 62 | public function isUpToDate() : bool |
|
53 | { |
||
54 | 62 | if ($this->upToDate !== null) { |
|
55 | 53 | return $this->upToDate; |
|
56 | } |
||
57 | |||
58 | 61 | $table = $this->schemaManager->listTableDetails($this->migrationTable->getName()); |
|
59 | |||
60 | 61 | $this->upToDate = true; |
|
61 | |||
62 | 61 | foreach ($this->migrationTable->getColumnNames() as $columnName) { |
|
63 | 61 | if ($table->hasColumn($columnName)) { |
|
64 | 61 | continue; |
|
65 | } |
||
66 | |||
67 | 2 | $this->upToDate = false; |
|
68 | 2 | break; |
|
69 | } |
||
70 | |||
71 | 61 | return $this->upToDate; |
|
72 | } |
||
74 |