Passed
Push — main ( a78334...cc2652 )
by Osvaldo
01:39
created

SelectWhere::sql()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
namespace src\pdodatabase\sentencias\select;
3
4
use src\interfaces\WhereInterface;
5
use src\interfaces\SelectInterface;
6
use src\interfaces\SelectWhereInterface;
7
8
class SelectWhere implements SelectWhereInterface
9
{
10
    private $_where;
11
    private $_select;
12
13
    public function __construct(SelectInterface $selectInterface, WhereInterface $whereInterface)
14
    {
15
        $this->_select = $selectInterface;
16
        $this->_where = $whereInterface;
17
    }
18
19
    public function sql(): string
20
    {
21
        return $this->_select->sql().$this->_where->sql();
22
    }
23
24
    public function datos(): array
25
    {
26
        return $this->_where->datos();
27
    }
28
}
29