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