@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | private function setQuery(string $sql): string |
| 27 | 27 | { |
| 28 | - if(strlen($sql) < 10) |
|
| 28 | + if (strlen($sql) < 10) |
|
| 29 | 29 | { |
| 30 | 30 | throw new Exception("Error en sentencia SQl"); |
| 31 | 31 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | private function setValores(?array $valores = array()): object |
| 37 | 37 | { |
| 38 | - if(!empty($valores)) |
|
| 38 | + if (!empty($valores)) |
|
| 39 | 39 | { |
| 40 | 40 | $valores = $valores; |
| 41 | 41 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $MasDonde = ''; |
| 27 | 27 | |
| 28 | - if(count($columnas) == 3) |
|
| 28 | + if (count($columnas) == 3) |
|
| 29 | 29 | { |
| 30 | 30 | $this->_datos = $this->setDatos($columnas); |
| 31 | 31 | |
@@ -21,12 +21,12 @@ |
||
| 21 | 21 | |
| 22 | 22 | if(count($columnas) > 0) |
| 23 | 23 | { |
| 24 | - foreach ($columnas as $campo) |
|
| 25 | - { |
|
| 26 | - $campos = $campo.','.$campos; |
|
| 27 | - } |
|
| 24 | + foreach ($columnas as $campo) |
|
| 25 | + { |
|
| 26 | + $campos = $campo.','.$campos; |
|
| 27 | + } |
|
| 28 | 28 | |
| 29 | - $campos = trim($campos, ','); |
|
| 29 | + $campos = trim($campos, ','); |
|
| 30 | 30 | } |
| 31 | 31 | else |
| 32 | 32 | { |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $campos = ''; |
| 21 | 21 | |
| 22 | - if(count($columnas) > 0) |
|
| 22 | + if (count($columnas) > 0) |
|
| 23 | 23 | { |
| 24 | 24 | foreach ($columnas as $campo) |
| 25 | 25 | { |
@@ -27,8 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $campos = trim($campos, ','); |
| 30 | - } |
|
| 31 | - else |
|
| 30 | + } else |
|
| 32 | 31 | { |
| 33 | 32 | $campos = '*'; |
| 34 | 33 | } |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | private $_limite; |
| 20 | 20 | private $_orden; |
| 21 | 21 | |
| 22 | - public function __construct |
|
| 23 | - ( |
|
| 22 | + public function __construct( |
|
| 24 | 23 | Tabla $Tabla, |
| 25 | 24 | Campos $Campos, |
| 26 | 25 | Donde $Donde, |
@@ -18,7 +18,7 @@ |
||
| 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 en la base de datos no puede estar vacia", 1); |
| 24 | 24 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $Orden = ''; |
| 21 | 21 | |
| 22 | - if($orden) |
|
| 22 | + if ($orden) |
|
| 23 | 23 | { |
| 24 | 24 | $Orden = ' ORDER BY '.$orden; |
| 25 | 25 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $Limite = ''; |
| 21 | 21 | |
| 22 | - if($limite) |
|
| 22 | + if ($limite) |
|
| 23 | 23 | { |
| 24 | 24 | $Limite = ' LIMIT '.$limite; |
| 25 | 25 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | $Donde = ''; |
| 31 | 31 | |
| 32 | - if(count($columnas) == 3) |
|
| 32 | + if (count($columnas) == 3) |
|
| 33 | 33 | { |
| 34 | 34 | $this->_datos = $this->setDatos($columnas); |
| 35 | 35 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $array = array($columnas[2]); |
| 45 | 45 | |
| 46 | - if($this->_masDonde->datos()) |
|
| 46 | + if ($this->_masDonde->datos()) |
|
| 47 | 47 | { |
| 48 | 48 | array_push($array, $this->_masDonde->datos()); |
| 49 | 49 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $Entre = ''; |
| 21 | 21 | |
| 22 | - if(count($columnas) == 3) |
|
| 22 | + if (count($columnas) == 3) |
|
| 23 | 23 | { |
| 24 | 24 | $Entre = ' WHERE '.$columnas[0].' BETWEEN '.$columnas[1].' AND '.$columnas[2]; |
| 25 | 25 | } |