| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 30 | protected function createTable($table) |
|
| 45 | { |
||
| 46 | 30 | if (isset(static::$tableCreated[$table]) === true) { |
|
| 47 | 30 | return $table; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | $schema = $this->getConnection()->getSchemaBuilder(); |
|
| 51 | 1 | if ($schema->hasTable($table) === false) { |
|
| 52 | 1 | $schema->create($table, function (Blueprint $table) { |
|
| 53 | 1 | $this->createSchema($table); |
|
| 54 | 1 | }); |
|
| 55 | 1 | static::$tableCreated[$table] = true; |
|
| 56 | } |
||
| 57 | |||
| 58 | 1 | return $table; |
|
| 59 | } |
||
| 60 | |||
| 69 |