Completed
Push — develop ( fa42c1...0ef7d4 )
by Sergei
22:52
created

SQLParserUtilsException::missingType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Doctrine\DBAL;
4
5
use function sprintf;
6
7
/**
8
 * Doctrine\DBAL\ConnectionException
9
 */
10
class SQLParserUtilsException extends DBALException
11
{
12
    /**
13
     * @param string $paramName
14
     *
15
     * @return \Doctrine\DBAL\SQLParserUtilsException
16
     */
17 138
    public static function missingParam($paramName)
18
    {
19 138
        return new self(sprintf('Value for :%1$s not found in params array. Params array key should be "%1$s"', $paramName));
20
    }
21
22
    /**
23
     * @param string $typeName
24
     *
25
     * @return \Doctrine\DBAL\SQLParserUtilsException
26
     */
27
    public static function missingType($typeName)
28
    {
29
        return new self(sprintf('Value for :%1$s not found in types array. Types array key should be "%1$s"', $typeName));
30
    }
31
}
32