SentenciaJoinWhereOrdenOLimite   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 21
ccs 9
cts 9
cp 1
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 13
    public function __construct(Joins $Joins, WhereInterface $whereInterface, OrdenOLimiteInterface $ordenOLimiteInterface)
15
    {
16 13
        $this->_where = $whereInterface;
17 13
        $this->_donde = $Joins;
18 13
        $this->_ordenOLimite = $ordenOLimiteInterface;
19 13
    }
20
21 2
    public function sql(): string
22
    {
23 2
        return 'SELECT '.$this->_donde->sql().' '.$this->_where->sql().' '.$this->_ordenOLimite->sql();
24
    }
25
26 2
    public function datos(): array
27
    {
28 2
        return $this->_where->datos();
29
    }
30
}