Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| CreateMigrationsTable | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| run | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Celemas\Quma\Commands; |
| 6 | |
| 7 | use Celemas\Quma\Migrations\MetadataTable; |
| 8 | use Override; |
| 9 | |
| 10 | final class CreateMigrationsTable extends Command |
| 11 | { |
| 12 | protected string $name = 'create-migrations-table'; |
| 13 | protected string $group = 'Database'; |
| 14 | protected string $prefix = 'db'; |
| 15 | protected string $description = 'Creates a migrations table'; |
| 16 | |
| 17 | #[Override] |
| 18 | public function run(): string|int |
| 19 | { |
| 20 | $env = $this->env; |
| 21 | |
| 22 | return new MetadataTable($env)->create($env->db); |
| 23 | } |
| 24 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 20 | $env = $this->env; |
| 21 | |
| 22 | return new MetadataTable($env)->create($env->db); |
| 23 | } |