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

ConsultaSelectWhere   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 2

2 Methods

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