Passed
Push — main ( 088d44...a78334 )
by Osvaldo
01:57
created

SentenciaDeComparacionColumnaValorValor::datos()   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\elementos;
3
4
use src\interfaces\SentenciaDeComparacionInterface;
5
use src\interfaces\UnidadDeValorInterface;
6
7
class SentenciaDeComparacionColumnaValorValor implements SentenciaDeComparacionInterface
8
{
9
    private $_primerValor;
10
    private $_segundoValor;
11
    private $_tercerValor;
12
13
    public function __construct
14
    (
15
        UnidadDeValorInterface $UnidadDeValorInterface1,
16
        UnidadDeValorInterface $UnidadDeValorInterface2,
17
        UnidadDeValorInterface $UnidadDeValorInterface3
18
    )
19
    {
20
        $this->_primerValor = $UnidadDeValorInterface1;
21
        $this->_segundoValor = $UnidadDeValorInterface2;
22
        $this->_tercerValor = $UnidadDeValorInterface3;
23
    }
24
25
    public function sql(): string
26
    {
27
        return $this->_primerValor->valor().' BETWEEN ? AND ?';
28
    }
29
30
    public function datos(): array
31
    {
32
        return [$this->_segundoValor->valor(),$this->_tercerValor->valor()];
33
    } 
34
}