@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function testCamposSoloRetornaTexto() |
| 41 | 41 | { |
| 42 | - $campos = new Campos(['*','78']); |
|
| 42 | + $campos = new Campos(['*', '78']); |
|
| 43 | 43 | $this->assertIsString($campos->campos()); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -53,19 +53,19 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function testDondeSoloRetornaTexto() |
| 55 | 55 | { |
| 56 | - $donde = new Donde(['id','=','23']); |
|
| 56 | + $donde = new Donde(['id', '=', '23']); |
|
| 57 | 57 | $this->assertIsString($donde->donde()); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function testElComparadorSoloPuedeSerLogico() |
| 61 | 61 | { |
| 62 | 62 | $this->expectException(Exception::class); |
| 63 | - $donde = new Donde(['id','12','23']); |
|
| 63 | + $donde = new Donde(['id', '12', '23']); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function testLosDatosQueDevuelveSiempreSonArray() |
| 67 | 67 | { |
| 68 | - $donde = new Donde(['id','=','1']); |
|
| 68 | + $donde = new Donde(['id', '=', '1']); |
|
| 69 | 69 | $this->assertIsArray($donde->datos()); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -79,13 +79,13 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | public function testEntreSoloRetornaTexto() |
| 81 | 81 | { |
| 82 | - $Entre = new Entre(['id','45','23']); |
|
| 82 | + $Entre = new Entre(['id', '45', '23']); |
|
| 83 | 83 | $this->assertIsString($Entre->donde()); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | public function testLosDatosQueDevuelveEntreSiempreSonArray() |
| 87 | 87 | { |
| 88 | - $donde = new Entre(['id','1','1']); |
|
| 88 | + $donde = new Entre(['id', '1', '1']); |
|
| 89 | 89 | $this->assertIsArray($donde->datos()); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | public function testODondeSoloRetornaTexto() |
| 95 | 95 | { |
| 96 | 96 | $ODonde = new ODonde( |
| 97 | - new Donde(['id','=','1']), |
|
| 98 | - new Donde(['id','=','2']) |
|
| 97 | + new Donde(['id', '=', '1']), |
|
| 98 | + new Donde(['id', '=', '2']) |
|
| 99 | 99 | ); |
| 100 | 100 | |
| 101 | 101 | $this->assertIsString($ODonde->donde()); |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | public function testLosDatosQueDevuelveODondeSiempreSonArray() |
| 105 | 105 | { |
| 106 | 106 | $donde = new ODonde( |
| 107 | - new Donde(['id','=','1']), |
|
| 108 | - new Donde(['id','=','2']) |
|
| 107 | + new Donde(['id', '=', '1']), |
|
| 108 | + new Donde(['id', '=', '2']) |
|
| 109 | 109 | ); |
| 110 | 110 | $this->assertIsArray($donde->datos()); |
| 111 | 111 | } |
@@ -116,8 +116,8 @@ discard block |
||
| 116 | 116 | public function testYDondeSoloRetornaTexto() |
| 117 | 117 | { |
| 118 | 118 | $YDonde = new YDonde( |
| 119 | - new Donde(['id','=','1']), |
|
| 120 | - new Donde(['id','=','2']) |
|
| 119 | + new Donde(['id', '=', '1']), |
|
| 120 | + new Donde(['id', '=', '2']) |
|
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | 123 | $this->assertIsString($YDonde->donde()); |
@@ -126,8 +126,8 @@ discard block |
||
| 126 | 126 | public function testLosDatosQueDevuelveYDondeSiempreSonArray() |
| 127 | 127 | { |
| 128 | 128 | $donde = new YDonde( |
| 129 | - new Donde(['id','=','1']), |
|
| 130 | - new Donde(['id','=','2']) |
|
| 129 | + new Donde(['id', '=', '1']), |
|
| 130 | + new Donde(['id', '=', '2']) |
|
| 131 | 131 | ); |
| 132 | 132 | $this->assertIsArray($donde->datos()); |
| 133 | 133 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | private function setOrden(string $orden): string |
| 21 | 21 | { |
| 22 | - if(empty($orden)) |
|
| 22 | + if (empty($orden)) |
|
| 23 | 23 | { |
| 24 | 24 | throw new Exception("La sentencia ORDEN BY no puede estar vacia"); |
| 25 | 25 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | private function setDonde(array $columnas): string |
| 38 | 38 | { |
| 39 | - if(count($columnas) !== 3) |
|
| 39 | + if (count($columnas) !== 3) |
|
| 40 | 40 | { |
| 41 | 41 | throw new Exception("Elementos faltantes o sobrantes en la sentencia WHERE", 1); |
| 42 | 42 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | private function setEntre(array $columnas): string |
| 27 | 27 | { |
| 28 | - if(count($columnas) !== 3) |
|
| 28 | + if (count($columnas) !== 3) |
|
| 29 | 29 | { |
| 30 | 30 | throw new Exception("Faltan elementos en la sentencia BETWEEN"); |
| 31 | 31 | } |
@@ -37,6 +37,6 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | private function setDatos(array $columnas): array |
| 39 | 39 | { |
| 40 | - return array($columnas[1],$columnas[2]); |
|
| 40 | + return array($columnas[1], $columnas[2]); |
|
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | \ No newline at end of file |