Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.1481 |
Changes | 0 |
1 | <?php |
||
21 | 32 | public function execute(CapsuleInterface $capsule): void |
|
22 | { |
||
23 | 32 | $schema = $capsule->getSchema($this->getTable()); |
|
24 | |||
25 | 32 | if (!$schema->hasColumn($this->name)) { |
|
26 | throw new ColumnException( |
||
27 | "Unable to drop column '{$schema->getName()}'.'{$this->name}', column does not exists" |
||
28 | ); |
||
29 | } |
||
30 | |||
31 | //Declaring column |
||
32 | 32 | $schema->dropColumn($this->name); |
|
33 | } |
||
35 |