Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Commands | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| get | |
100.00% |
5 / 5 |
|
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; |
| 6 | |
| 7 | use Celemas\Cli\Commands as BaseCommands; |
| 8 | use Celemas\Quma\Commands\Add; |
| 9 | use Celemas\Quma\Commands\CreateMigrationsTable; |
| 10 | use Celemas\Quma\Commands\Migrations; |
| 11 | use Celemas\Quma\Contract\MigrationFactory; |
| 12 | |
| 13 | /** @api */ |
| 14 | class Commands |
| 15 | { |
| 16 | /** @param array<non-empty-string, Connection>|Connection $conn */ |
| 17 | public static function get( |
| 18 | array|Connection $conn, |
| 19 | array $options = [], |
| 20 | ?MigrationFactory $migrationFactory = null, |
| 21 | ): BaseCommands { |
| 22 | return new BaseCommands([ |
| 23 | new Add($conn, $options), |
| 24 | new CreateMigrationsTable($conn, $options), |
| 25 | new Migrations($conn, $options, $migrationFactory), |
| 26 | ]); |
| 27 | } |
| 28 | } |