Passed
Push — main ( d33686...5b1d24 )
by Osvaldo
01:36
created
src/pdoDataBase/select/Tabla.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     private function setTabla(string $tabla): string
20 20
     {
21
-        if(strlen($tabla) < 1)
21
+        if (strlen($tabla) < 1)
22 22
         {
23 23
             throw new Exception("La tabla no puede estar vacia");
24 24
         }
Please login to merge, or discard this patch.
src/pdoDataBase/insert/Insert.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     }
20 20
 
21 21
     public function insert(): string
22
-	{
22
+    {
23 23
         $keys = array_keys($this->_valoresAInsertar->valoresAInsertar());
24 24
         $values = '';
25 25
         
@@ -37,5 +37,5 @@  discard block
 block discarded – undo
37 37
         }
38 38
 
39 39
         return "INSERT INTO ". $this->_tabla->tabla()." (`". implode('`, `', $keys) ."`) VALUES ({$values})";
40
-	}
40
+    }
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
     private $_tabla;
9 9
     private $_valoresAInsertar;
10 10
 
11
-    public function __construct
12
-    (
11
+    public function __construct(
13 12
         Tabla $Tabla,
14 13
         ValoresAInsertar $ValoresAInsertar
15 14
     )
@@ -23,19 +22,19 @@  discard block
 block discarded – undo
23 22
         $keys = array_keys($this->_valoresAInsertar->valoresAInsertar());
24 23
         $values = '';
25 24
         
26
-        $x=1;
27
-        foreach($this->_valoresAInsertar->valoresAInsertar() as $field)
25
+        $x = 1;
26
+        foreach ($this->_valoresAInsertar->valoresAInsertar() as $field)
28 27
         {
29
-            $values.= "?";
28
+            $values .= "?";
30 29
 
31
-            if($x < count($this->_valoresAInsertar->valoresAInsertar()))
30
+            if ($x < count($this->_valoresAInsertar->valoresAInsertar()))
32 31
             {
33
-                $values.= ', ';
32
+                $values .= ', ';
34 33
             }
35 34
 
36 35
             $x++;
37 36
         }
38 37
 
39
-        return "INSERT INTO ". $this->_tabla->tabla()." (`". implode('`, `', $keys) ."`) VALUES ({$values})";
38
+        return "INSERT INTO ".$this->_tabla->tabla()." (`".implode('`, `', $keys)."`) VALUES ({$values})";
40 39
 	}
41 40
 }
42 41
\ No newline at end of file
Please login to merge, or discard this patch.
src/pdoDataBase/insert/ValoresAInsertar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
     private function setValoresAInsertar(array $array): array
21 21
     {
22
-        if(count($array) < 1)
22
+        if (count($array) < 1)
23 23
         {
24 24
             throw new Exception("Error, no hay valores para insertar");   
25 25
         }
Please login to merge, or discard this patch.