| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 71 | public function getSchemaDiff() |
||
| 72 | { |
||
| 73 | 1 | if (null === $this->tableName) { |
|
| 74 | 1 | throw new \Exception('You need first to inform the object about the table name.'); |
|
| 75 | } |
||
| 76 | |||
| 77 | 1 | $tableDiff = $this->comparator->diffTable( |
|
| 78 | 1 | $this->connection->getSchemaManager()->createSchema()->getTable($this->tableName), |
|
| 79 | 1 | $this->schema->getTable($this->tableName) |
|
| 80 | ); |
||
| 81 | |||
| 82 | 1 | if (false !== $tableDiff) { |
|
| 83 | 1 | $this->schemaDiff->changedTables[$this->tableName] = $tableDiff; |
|
| 84 | } |
||
| 85 | |||
| 86 | 1 | return $this->schemaDiff; |
|
| 87 | } |
||
| 89 |