Passed
Push — main ( c1cea3...1d91de )
by Osvaldo
13:30
created

SentenciaJoinWhereOrdenOLimite::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\OrdenOLimiteInterface;
5
use src\interfaces\WhereInterface;
6
use src\pdodatabase\elementos\Joins;
7
8
class SentenciaJoinWhereOrdenOLimite
9
{
10
    private $_donde;
11
    private $_where;
12
    private $_ordenOLimite;
13
    
14
    public function __construct(Joins $Joins, WhereInterface $whereInterface, OrdenOLimiteInterface $ordenOLimiteInterface)
15
    {
16
        $this->_where = $whereInterface;
17
        $this->_donde = $Joins;
18
        $this->_ordenOLimite = $ordenOLimiteInterface;
19
    }
20
21
    public function sql(): string
22
    {
23
        return 'SELECT '.$this->_donde->sql().' '.$this->_where->sql().' '.$this->_ordenOLimite->sql();
24
    }
25
26
    public function datos(): array
27
    {
28
        return $this->_where->datos();
29
    }
30
}