StatementException::getStatement()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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