Completed
Push — master ( ca826f...dcd1d0 )
by Asmir
18s queued 15s
created

InvalidArguments::wrongTypesArgumentCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 7
ccs 6
cts 6
cp 1
crap 1
rs 10
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