Passed
Push — main ( ef0a91...c8f39c )
by Osvaldo
01:07
created
src/pdodatabase/elementos/Where.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 
7 7
 class Where implements WhereInterface
8 8
 {
9
-    public function __construct(ValidadorDeParametrosInterface $ValidadorDeParametrosInterface)
10
-    {
11
-        $this->_where = $ValidadorDeParametrosInterface->datos();
12
-    }
9
+	public function __construct(ValidadorDeParametrosInterface $ValidadorDeParametrosInterface)
10
+	{
11
+		$this->_where = $ValidadorDeParametrosInterface->datos();
12
+	}
13 13
 
14
-    public function sql(): string
15
-    {
16
-        return 'WHERE '.$this->_where[0].' '.$this->_where[1].' ?';
17
-    }
18
-    public function datos(): array
19
-    {
20
-        return [$this->_where[2]];
21
-    }
14
+	public function sql(): string
15
+	{
16
+		return 'WHERE '.$this->_where[0].' '.$this->_where[1].' ?';
17
+	}
18
+	public function datos(): array
19
+	{
20
+		return [$this->_where[2]];
21
+	}
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/ejecutar/EjecutarConsultaSinDatos.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -8,27 +8,27 @@
 block discarded – undo
8 8
 
9 9
 class EjecutarConsultaSinDatos 
10 10
 {
11
-    private $_conexion;
11
+	private $_conexion;
12 12
 
13
-    public function __construct(ConexionBaseDeDatos $conexionBaseDeDatos)
14
-    {
15
-        $this->_conexion = $conexionBaseDeDatos->conectar();
16
-    }
13
+	public function __construct(ConexionBaseDeDatos $conexionBaseDeDatos)
14
+	{
15
+		$this->_conexion = $conexionBaseDeDatos->conectar();
16
+	}
17 17
 
18
-    public function query(string $sql): PDOStatement
19
-    {
20
-        $query = $this->_conexion->prepare($sql);
18
+	public function query(string $sql): PDOStatement
19
+	{
20
+		$query = $this->_conexion->prepare($sql);
21 21
         
22
-        try
23
-        {
24
-            $query->execute();
25
-        }
26
-        catch(PDOException $e)
27
-        {
28
-            throw new Exception("Error en la consulta");
29
-        }
22
+		try
23
+		{
24
+			$query->execute();
25
+		}
26
+		catch(PDOException $e)
27
+		{
28
+			throw new Exception("Error en la consulta");
29
+		}
30 30
         
31 31
 
32
-        return $query;
33
-    }
32
+		return $query;
33
+	}
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/ejecutar/EjecutarConsultaConDatos.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,33 +8,33 @@
 block discarded – undo
8 8
 
9 9
 class EjecutarConsultaConDatos
10 10
 {
11
-    private $_conexion;
11
+	private $_conexion;
12 12
 
13
-    public function __construct(ConexionBaseDeDatos $conexionBaseDeDatos)
14
-    {
15
-        $this->_conexion = $conexionBaseDeDatos->conectar();
16
-    }
13
+	public function __construct(ConexionBaseDeDatos $conexionBaseDeDatos)
14
+	{
15
+		$this->_conexion = $conexionBaseDeDatos->conectar();
16
+	}
17 17
 
18
-    public function query(object $sentencia): PDOStatement
19
-    {
20
-        $query = $this->_conexion->prepare($sentencia->sql());
18
+	public function query(object $sentencia): PDOStatement
19
+	{
20
+		$query = $this->_conexion->prepare($sentencia->sql());
21 21
 
22
-        $x=1;
23
-        foreach ($sentencia->datos() as $value)
24
-        {
25
-            $query->bindValue($x,$value);
26
-            $x++;	
27
-        }
22
+		$x=1;
23
+		foreach ($sentencia->datos() as $value)
24
+		{
25
+			$query->bindValue($x,$value);
26
+			$x++;	
27
+		}
28 28
         
29
-        try
30
-        {
31
-            $query->execute();
32
-        }
33
-        catch(PDOException $e)
34
-        {
35
-            throw new Exception("Error en la consulta");
36
-        }
29
+		try
30
+		{
31
+			$query->execute();
32
+		}
33
+		catch(PDOException $e)
34
+		{
35
+			throw new Exception("Error en la consulta");
36
+		}
37 37
 
38
-        return $query;
39
-    }
38
+		return $query;
39
+	}
40 40
 }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/resultados/ResultadoEnObjetos.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 class ResultadoEnObjetos implements ResultadoBaseDeDatosInterface
9 9
 {
10
-    public function resultado(PDOStatement $PDOStatement): object
11
-    {
12
-        return (object) $PDOStatement->fetchAll(PDO::FETCH_OBJ);
13
-    }
10
+	public function resultado(PDOStatement $PDOStatement): object
11
+	{
12
+		return (object) $PDOStatement->fetchAll(PDO::FETCH_OBJ);
13
+	}
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/resultados/ContarResultados.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 
6 6
 class ContarResultados
7 7
 {
8
-    public function contar(PDOStatement $PDOStatement): int
9
-    {
10
-        return $PDOStatement->rowCount();
11
-    }
8
+	public function contar(PDOStatement $PDOStatement): int
9
+	{
10
+		return $PDOStatement->rowCount();
11
+	}
12 12
 }
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/resultados/ResultadoEnArrays.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 class ResultadoEnArrays implements ResultadoBaseDeDatosInterface
9 9
 {
10
-    public function resultado(PDOStatement $PDOStatement): array
11
-    {
12
-        return $PDOStatement->fetchAll(PDO::FETCH_ASSOC);
13
-    }
10
+	public function resultado(PDOStatement $PDOStatement): array
11
+	{
12
+		return $PDOStatement->fetchAll(PDO::FETCH_ASSOC);
13
+	}
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/resultados/ResultadoEnJson.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 
8 8
 class ResultadoEnJson implements ResultadoBaseDeDatosInterface
9 9
 {
10
-    public function resultado(PDOStatement $PDOStatement): string
11
-    {
12
-        return json_encode($PDOStatement->fetchAll(PDO::FETCH_ASSOC));
13
-    }
10
+	public function resultado(PDOStatement $PDOStatement): string
11
+	{
12
+		return json_encode($PDOStatement->fetchAll(PDO::FETCH_ASSOC));
13
+	}
14 14
 }
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/conexion/ContraseñaBaseDeDatos.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,20 +3,20 @@
 block discarded – undo
3 3
 
4 4
 class ContraseñaBaseDeDatos
5 5
 {
6
-    private $_contraseñaBaseDeDatos;
6
+	private $_contraseñaBaseDeDatos;
7 7
 
8
-    public function __construct(string $nombreContraseñaBaseDeDatos)
9
-    {
10
-        $this->_contraseñaBaseDeDatos = $this->setContraseñaBaseDeDatos($nombreContraseñaBaseDeDatos);
11
-    }
8
+	public function __construct(string $nombreContraseñaBaseDeDatos)
9
+	{
10
+		$this->_contraseñaBaseDeDatos = $this->setContraseñaBaseDeDatos($nombreContraseñaBaseDeDatos);
11
+	}
12 12
 
13
-    public function contraseñaBaseDeDatos(): string
14
-    {
15
-        return $this->_contraseñaBaseDeDatos;
16
-    }
13
+	public function contraseñaBaseDeDatos(): string
14
+	{
15
+		return $this->_contraseñaBaseDeDatos;
16
+	}
17 17
 
18
-    private function setContraseñaBaseDeDatos(string $nombreContraseñaBaseDeDatos): string
19
-    {
20
-        return $nombreContraseñaBaseDeDatos;
21
-    }
18
+	private function setContraseñaBaseDeDatos(string $nombreContraseñaBaseDeDatos): string
19
+	{
20
+		return $nombreContraseñaBaseDeDatos;
21
+	}
22 22
 }
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/conexion/UsuarioBaseDeDatos.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@
 block discarded – undo
5 5
 
6 6
 class UsuarioBaseDeDatos
7 7
 {
8
-    private $_usuariobaseDeDatos;
8
+	private $_usuariobaseDeDatos;
9 9
 
10
-    public function __construct(string $nombreUsuarioBaseDeDatos)
11
-    {
12
-        $this->_usuariobaseDeDatos = $this->setUsuarioBaseDeDatos($nombreUsuarioBaseDeDatos);
13
-    }
10
+	public function __construct(string $nombreUsuarioBaseDeDatos)
11
+	{
12
+		$this->_usuariobaseDeDatos = $this->setUsuarioBaseDeDatos($nombreUsuarioBaseDeDatos);
13
+	}
14 14
 
15
-    public function usuariobaseDeDatos(): string
16
-    {
17
-        return $this->_usuariobaseDeDatos;
18
-    }
15
+	public function usuariobaseDeDatos(): string
16
+	{
17
+		return $this->_usuariobaseDeDatos;
18
+	}
19 19
 
20
-    private function setUsuarioBaseDeDatos(string $nombreUsuarioBaseDeDatos): string
21
-    {
22
-        if(empty($nombreUsuarioBaseDeDatos))
23
-        {
24
-            throw new Exception("El nombre del host de la base de datos no puede estar vacio");
25
-        }
20
+	private function setUsuarioBaseDeDatos(string $nombreUsuarioBaseDeDatos): string
21
+	{
22
+		if(empty($nombreUsuarioBaseDeDatos))
23
+		{
24
+			throw new Exception("El nombre del host de la base de datos no puede estar vacio");
25
+		}
26 26
 
27
-        return $nombreUsuarioBaseDeDatos;
28
-    }
27
+		return $nombreUsuarioBaseDeDatos;
28
+	}
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.