Passed
Push — main ( 2c502a...53b177 )
by Osvaldo
05:26
created
Index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 declare(strict_types=1);
3 3
 
4
-require_once __DIR__ . '/vendor/autoload.php';
4
+require_once __DIR__.'/vendor/autoload.php';
5 5
 
6 6
 use src\Factory;
7 7
 use src\pdodatabase\resultados\ContarResultados;
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 
16 16
 // SELECT * FROM prueba
17 17
 
18
-$select = $factory->crear('src\factory\SelectWhere',[
18
+$select = $factory->crear('src\factory\SelectWhere', [
19 19
     'tabla' => 'prueba',
20 20
     'campos' => ['*'],
21
-    'where' => ['id','=','42']
21
+    'where' => ['id', '=', '42']
22 22
 ]);
23 23
 
24 24
 $select = $select->obtener();
Please login to merge, or discard this patch.
src/pdodatabase/elementos/WhereBetween.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,6 @@
 block discarded – undo
20 20
 
21 21
     public function datos(): array
22 22
     {
23
-        return [ $this->_where[1], $this->_where[2] ];
23
+        return [$this->_where[1], $this->_where[2]];
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/elementos/WhereOr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,6 +20,6 @@
 block discarded – undo
20 20
 
21 21
     public function datos(): array
22 22
     {
23
-        return [ $this->_where[2], $this->_where[5] ];
23
+        return [$this->_where[2], $this->_where[5]];
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdodatabase/ejecutar/EjecutarConsultaConDatos.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
     {
20 20
         $query = $this->_conexion->prepare($sentencia->sql());
21 21
 
22
-        $x=1;
22
+        $x = 1;
23 23
         foreach ($sentencia->datos() as $value)
24 24
         {
25
-            $query->bindValue($x,$value);
25
+            $query->bindValue($x, $value);
26 26
             $x++;	
27 27
         }
28 28
         
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         {
31 31
             $query->execute();
32 32
         }
33
-        catch(PDOException $e)
33
+        catch (PDOException $e)
34 34
         {
35 35
             throw new Exception("Error en la consulta");
36 36
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
         try
30 30
         {
31 31
             $query->execute();
32
-        }
33
-        catch(PDOException $e)
32
+        } catch(PDOException $e)
34 33
         {
35 34
             throw new Exception("Error en la consulta");
36 35
         }
Please login to merge, or discard this patch.
src/pdodatabase/ejecutar/EjecutarConsultaSinDatos.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         {
24 24
             $query->execute();
25 25
         }
26
-        catch(PDOException $e)
26
+        catch (PDOException $e)
27 27
         {
28 28
             throw new Exception("Error en la consulta");
29 29
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
         try
30 30
         {
31 31
             $query->execute();
32
-        }
33
-        catch(PDOException $e)
32
+        } catch(PDOException $e)
34 33
         {
35 34
             throw new Exception("Error en la consulta");
36 35
         }
Please login to merge, or discard this patch.
src/pdodatabase/elementos/ValidadorDeParametrosWhereAndOthers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         foreach ($array as $value)
48 48
         {
49
-            if(empty($value))
49
+            if (empty($value))
50 50
             {
51 51
                 throw new Exception("Error Processing Request");
52 52
             }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     private function columnasSonString($array): void
57 57
     {
58
-        if(!is_string($array[0]) || !is_string($array[3]))
58
+        if (!is_string($array[0]) || !is_string($array[3]))
59 59
         {
60 60
             throw new Exception("Error Processing Request");
61 61
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     private function numeroDeElementosValido($array): void
65 65
     {
66
-        if(count($array) !== 6)
66
+        if (count($array) !== 6)
67 67
         {
68 68
             throw new Exception("Error Processing Request");
69 69
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     private function operadorValido($array): void
73 73
     {
74
-        if(!in_array($array[1], $this->_operadoresValidos) || !in_array($array[4], $this->_operadoresValidos))
74
+        if (!in_array($array[1], $this->_operadoresValidos) || !in_array($array[4], $this->_operadoresValidos))
75 75
         {
76 76
             throw new Exception("Error Processing Request");
77 77
         }
Please login to merge, or discard this patch.