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

SentenciaJoinWhereOrdenOLimite   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A sql() 0 3 1
A datos() 0 3 1
A __construct() 0 5 1
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
}