| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 272 | public function execute(CapsuleInterface $capsule): void |
|
| 16 | { |
||
| 17 | 272 | $schema = $capsule->getSchema($this->getTable()); |
|
| 18 | |||
| 19 | 272 | if ($schema->hasColumn($this->name)) { |
|
| 20 | 16 | throw new ColumnException( |
|
| 21 | 16 | "Unable to create column '{$schema->getName()}'.'{$this->name}', column already exists" |
|
| 22 | ); |
||
| 23 | } |
||
| 24 | |||
| 25 | //Declaring column |
||
| 26 | 264 | $this->declareColumn($schema); |
|
| 27 | } |
||
| 29 |