Passed
Push — main ( 5d16fe...94d2f6 )
by Osvaldo
02:29
created

ConsultaSelectWhere::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
namespace src\pdodatabase\consultas\select;
3
4
use PDOStatement;
5
use src\pdodatabase\ejecutar\EjecutarConsultaConDatos;
6
use src\pdodatabase\sentencias\select\SentenciaSelectWhere;
7
8
class ConsultaSelectWhere
9
{
10
    public function __construct(EjecutarConsultaConDatos $ejecutarConsultaSinDatos, SentenciaSelectWhere $SentenciaSelectWhere)
11
    {
12
        $this->_ejecutar = $ejecutarConsultaSinDatos;
0 ignored issues
show
Bug Best Practice introduced by
The property _ejecutar does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
13
        $this->_sentencia = $SentenciaSelectWhere;
0 ignored issues
show
Bug Best Practice introduced by
The property _sentencia does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
14
    }
15
16
    public function obtener(): PDOStatement
17
    {
18
        return $this->_ejecutar->query($this->_sentencia);
19
    }
20
}