We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Lines | 41 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function __construct(string $name, array $columns = []) |
||
| 11 | { |
||
| 12 | $this->name = $name; |
||
| 13 | foreach ($columns as $column) { |
||
| 14 | $this->columns[$column['name']] = new class($column) |
||
| 15 | { |
||
| 16 | public function __construct(private array $column) |
||
| 17 | { |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getName() |
||
| 21 | { |
||
| 22 | return $this->column['name']; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getNotnull() |
||
| 26 | { |
||
| 27 | return ! $this->column['nullable']; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getDefault() |
||
| 31 | { |
||
| 32 | return $this->column['default']; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getUnsigned() |
||
| 36 | { |
||
| 37 | return in_array('unsigned', explode(' ', $this->column['type'])); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function getType() |
||
| 41 | { |
||
| 42 | return new class($this->column) |
||
| 43 | { |
||
| 44 | public function __construct(private array $column) |
||
| 45 | { |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getName() |
||
| 49 | { |
||
| 50 | return $this->column['type_name']; |
||
| 51 | } |
||
| 78 |