StatementException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStatement() 0 4 1
1
<?php
2
3
namespace BenTools\SimpleDBAL\Model\Exception;
4
5
use BenTools\SimpleDBAL\Contract\StatementInterface;
6
use Throwable;
7
8
abstract class StatementException extends DBALException
9
{
10
    /**
11
     * @var StatementInterface
12
     */
13
    private $statement;
14
15
    /**
16
     * @inheritDoc
17
     */
18
    public function __construct($message = "", $code = 0, Throwable $previous = null, StatementInterface $statement)
19
    {
20
        parent::__construct($message, $code, $previous);
21
        $this->statement = $statement;
22
    }
23
24
    /**
25
     * @return StatementInterface
26
     */
27
    public function getStatement(): StatementInterface
28
    {
29
        return $this->statement;
30
    }
31
}
32