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

ExecuteQuery   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
dl 0
loc 30
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSql() 0 4 1
A getBindings() 0 4 1
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