Passed
Push — main ( 5326f7...3bbf58 )
by Thomas
12:47
created

Commands   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Conia\Quma;
6
7
use Conia\Cli\Commands as BaseCommands;
8
use Conia\Quma\Commands\Add;
9
use Conia\Quma\Commands\CreateMigrationsTable;
10
use Conia\Quma\Commands\Migrations;
11
12
/** @psalm-api */
13
class Commands
14
{
15
    /** @psalm-param array<non-empty-string, Connection>|Connection $conn */
16 39
    public static function get(
17
        array|Connection $conn,
18
        array $options = []
19
    ): BaseCommands {
20 39
        return new BaseCommands([
21 39
            new Add($conn, $options),
22 39
            new CreateMigrationsTable($conn, $options),
23 39
            new Migrations($conn, $options),
24 39
        ]);
25
    }
26
}
27