tableDoesNotExist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace TonicHealthCheck\Check\DB\BaseTableExist;
4
5
use TonicHealthCheck\Check\DB\DBCheckException;
6
7
/**
8
 * Class DBBaseTableExistCheckException.
9
 */
10
class DBBaseTableExistCheckException extends DBCheckException
11
{
12
    const EXCEPTION_NAME = 'DBBaseTableExistCheck';
13
14
    const CODE_TABLE_DONT_EXIST = 2002;
15
    const TEXT_TABLE_DONT_EXIST = 'Table: %s don\'t exist into db';
16
17
    /**
18
     * @param string $tableName
19
     *
20
     * @return self
21
     */
22 1
    public static function tableDoesNotExist($tableName)
23
    {
24 1
        return new self(sprintf(self::TEXT_TABLE_DONT_EXIST, $tableName), self::CODE_TABLE_DONT_EXIST);
25
    }
26
}
27