Passed
Push — main ( 5d16fe...94d2f6 )
by Osvaldo
02:29
created
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
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
         try
23 23
         {
24 24
             $query->execute();
25
-        }
26
-        catch(PDOException $e)
25
+        } catch(PDOException $e)
27 26
         {
28 27
             throw new Exception("Error en la consulta");
29 28
         }
Please login to merge, or discard this patch.
test/ConsultasTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
                 new Como(
62 62
                     new Where(
63 63
                         new ValidadorDeParametrosWhere(
64
-                            ['id','=',12]
64
+                            ['id', '=', 12]
65 65
                         )
66 66
                     )
67 67
                 )
Please login to merge, or discard this patch.
test/FactoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,34 +26,34 @@
 block discarded – undo
26 26
     public function testFactorySelectWhereDevuelveClaseAdecuada()
27 27
     {
28 28
         $select = new SelectWhere;
29
-        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'],'where' => ['id','=',2]]));
29
+        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'], 'where' => ['id', '=', 2]]));
30 30
     }
31 31
 
32 32
     // SelectWhereAnd
33 33
     public function testFactorySelectWhereAndDevuelveClaseAdecuada()
34 34
     {
35 35
         $select = new SelectWhereAnd;
36
-        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'],'where' => ['id','=',2,'uno','=',9]]));
36
+        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'], 'where' => ['id', '=', 2, 'uno', '=', 9]]));
37 37
     }
38 38
 
39 39
     // SelectWhereOr
40 40
     public function testFactorySelectWhereOrDevuelveClaseAdecuada()
41 41
     {
42 42
         $select = new SelectWhereOr;
43
-        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'],'where' => ['id','=',2,'uno','=',9]]));
43
+        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'], 'where' => ['id', '=', 2, 'uno', '=', 9]]));
44 44
     }
45 45
 
46 46
     // SelectWhereBetween
47 47
     public function testFactorySelectWhereBetweenDevuelveClaseAdecuada()
48 48
     {
49 49
         $select = new SelectWhereBetween;
50
-        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'],'where' => ['id','1',2]]));
50
+        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'], 'where' => ['id', '1', 2]]));
51 51
     }
52 52
 
53 53
     // SelectWhereBetween
54 54
     public function testFactorySelectWhereNotBetweenDevuelveClaseAdecuada()
55 55
     {
56 56
         $select = new SelectWhereNotBetween;
57
-        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'],'where' => ['id','1',2]]));
57
+        $this->assertInstanceOf(ConsultaSelectWhere::class, $select->crear(['tabla' => 'prueba', 'campos' => ['*'], 'where' => ['id', '1', 2]]));
58 58
     }
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.