| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function change() |
||
| 14 | { |
||
| 15 | $table = $this->table('products'); |
||
| 16 | $table->addColumn('name', 'string', [ |
||
| 17 | 'default' => null, |
||
| 18 | 'limit' => 255, |
||
| 19 | 'null' => false, |
||
| 20 | ]); |
||
| 21 | $table->addColumn('created', 'datetime', [ |
||
| 22 | 'default' => null, |
||
| 23 | 'null' => false, |
||
| 24 | ]); |
||
| 25 | $table->addColumn('modified', 'datetime', [ |
||
| 26 | 'default' => null, |
||
| 27 | 'null' => false, |
||
| 28 | ]); |
||
| 29 | $table->create(); |
||
| 30 | } |
||
| 32 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.