Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Commands
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 get
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Celemas\Quma;
6
7use Celemas\Cli\Commands as BaseCommands;
8use Celemas\Quma\Commands\Add;
9use Celemas\Quma\Commands\CreateMigrationsTable;
10use Celemas\Quma\Commands\Migrations;
11use Celemas\Quma\Contract\MigrationFactory;
12
13/** @api */
14class 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}