Completed
Push — master ( d8f60e...a72876 )
by Changwan
03:40
created

ExecuteQuery::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace Wandu\Database\Events;
3
4
use Wandu\Event\EventInterface;
5
6
class ExecuteQuery implements EventInterface
7
{
8
    /** @var string */
9
    protected $sql;
10
    
11
    /** @var array */
12
    protected $bindings = [];
13
    
14 18
    public function __construct(string $sql, array $bindings = [])
15
    {
16 18
        $this->sql = $sql;
17 18
        $this->bindings = $bindings;
18 18
    }
19
20
    /**
21
     * @return string
22
     */
23
    public function getSql(): string
24
    {
25
        return $this->sql;
26
    }
27
28
    /**
29
     * @return array
30
     */
31
    public function getBindings(): array
32
    {
33
        return $this->bindings;
34
    }
35
}
36