DBBaseTableExistCheckException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 17
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10

1 Method

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