InvalidArguments::wrongTypesArgumentCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Query\Exception;
6
7
use Doctrine\Migrations\Exception\MigrationException;
8
use InvalidArgumentException;
9
use function sprintf;
10
11
class InvalidArguments extends InvalidArgumentException implements MigrationException
12
{
13 1
    public static function wrongTypesArgumentCount(string $statement, int $parameters, int $types) : self
14
    {
15 1
        return new self(sprintf(
16 1
            'The number of types (%s) is higher than the number of passed parameters (%s) for the query "%s".',
17 1
            $types,
18 1
            $parameters,
19 1
            $statement
20
        ));
21
    }
22
}
23