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

SQLParserUtilsException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 20
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A missingParam() 0 3 1
A missingType() 0 3 1
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