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}

Paths

Below are the source code lines that represent each code path as identified by Xdebug. Please note a path is not necessarily coterminous with a line, a line may contain multiple paths and therefore show up more than once. Please also be aware that some paths may include implicit rather than explicit branches, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.

Commands->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    }