Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function __construct(stdClass $column) |
||
38 | { |
||
39 | // Convert column property to case insensitive |
||
40 | // Issue https://github.com/kitloong/laravel-migrations-generator/issues/34 |
||
41 | $lowerKey = (new Collection($column))->mapWithKeys(function ($item, $key) { |
||
42 | return [strtolower($key) => $item]; |
||
43 | }); |
||
44 | |||
45 | $this->field = $lowerKey['field']; |
||
46 | $this->type = $lowerKey['type']; |
||
47 | $this->null = $lowerKey['null']; |
||
48 | $this->key = $lowerKey['key']; |
||
49 | $this->default = $lowerKey['default']; |
||
50 | $this->extra = $lowerKey['extra']; |
||
51 | } |
||
101 |