InvalidArguments   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A wrongTypesArgumentCount() 0 9 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