Completed
Pull Request — master (#919)
by Asmir
02:24
created

InvalidArguments   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 10
wmc 1

1 Method

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