| Total Complexity | 9 | 
| Total Lines | 63 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 9 | class MigrationTableStatus | ||
| 10 | { | ||
| 11 | /** @var AbstractSchemaManager */ | ||
| 12 | private $schemaManager; | ||
| 13 | |||
| 14 | /** @var MigrationTable */ | ||
| 15 | private $migrationTable; | ||
| 16 | |||
| 17 | /** @var bool|null */ | ||
| 18 | private $created; | ||
| 19 | |||
| 20 | /** @var bool|null */ | ||
| 21 | private $upToDate; | ||
| 22 | |||
| 23 | 72 | public function __construct( | |
| 24 | AbstractSchemaManager $schemaManager, | ||
| 25 | MigrationTable $migrationTable | ||
| 26 |     ) { | ||
| 27 | 72 | $this->schemaManager = $schemaManager; | |
| 28 | 72 | $this->migrationTable = $migrationTable; | |
| 29 | 72 | } | |
| 30 | |||
| 31 | 66 | public function setCreated(bool $created) : void | |
| 32 |     { | ||
| 33 | 66 | $this->created = $created; | |
| 34 | 66 | } | |
| 35 | |||
| 36 | 69 | public function isCreated() : bool | |
| 37 |     { | ||
| 38 | 69 |         if ($this->created !== null) { | |
| 39 | 61 | return $this->created; | |
| 40 | } | ||
| 41 | |||
| 42 | 68 | $this->created = $this->schemaManager->tablesExist([$this->migrationTable->getName()]); | |
| 43 | |||
| 44 | 68 | return $this->created; | |
| 45 | } | ||
| 46 | |||
| 47 | 2 | public function setUpToDate(bool $upToDate) : void | |
| 50 | 2 | } | |
| 51 | |||
| 52 | 57 | public function isUpToDate() : bool | |
| 53 |     { | ||
| 74 |