@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function testCamposSoloRetornaTexto() |
47 | 47 | { |
48 | - $campos = new Campos(['*','78']); |
|
48 | + $campos = new Campos(['*', '78']); |
|
49 | 49 | $this->assertIsString($campos->campos()); |
50 | 50 | } |
51 | 51 | |
@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | |
60 | 60 | public function testDondeSoloRetornaTexto() |
61 | 61 | { |
62 | - $donde = new Donde(['id','=','23']); |
|
62 | + $donde = new Donde(['id', '=', '23']); |
|
63 | 63 | $this->assertIsString($donde->donde()); |
64 | 64 | } |
65 | 65 | |
66 | 66 | public function testElComparadorSoloPuedeSerLogico() |
67 | 67 | { |
68 | 68 | $this->expectException(Exception::class); |
69 | - $donde = new Donde(['id','12','23']); |
|
69 | + $donde = new Donde(['id', '12', '23']); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function testLosDatosQueDevuelveSiempreSonArray() |
73 | 73 | { |
74 | - $donde = new Donde(['id','=','1']); |
|
74 | + $donde = new Donde(['id', '=', '1']); |
|
75 | 75 | $this->assertIsArray($donde->datos()); |
76 | 76 | } |
77 | 77 | |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | |
86 | 86 | public function testEntreSoloRetornaTexto() |
87 | 87 | { |
88 | - $Entre = new Entre(['id','45','23']); |
|
88 | + $Entre = new Entre(['id', '45', '23']); |
|
89 | 89 | $this->assertIsString($Entre->donde()); |
90 | 90 | } |
91 | 91 | |
92 | 92 | public function testLosDatosQueDevuelveEntreSiempreSonArray() |
93 | 93 | { |
94 | - $donde = new Entre(['id','1','1']); |
|
94 | + $donde = new Entre(['id', '1', '1']); |
|
95 | 95 | $this->assertIsArray($donde->datos()); |
96 | 96 | } |
97 | 97 | |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | public function testODondeSoloRetornaTexto() |
101 | 101 | { |
102 | 102 | $ODonde = new ODonde( |
103 | - new Donde(['id','=','1']), |
|
104 | - new Donde(['id','=','2']) |
|
103 | + new Donde(['id', '=', '1']), |
|
104 | + new Donde(['id', '=', '2']) |
|
105 | 105 | ); |
106 | 106 | |
107 | 107 | $this->assertIsString($ODonde->donde()); |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | public function testLosDatosQueDevuelveODondeSiempreSonArray() |
111 | 111 | { |
112 | 112 | $donde = new ODonde( |
113 | - new Donde(['id','=','1']), |
|
114 | - new Donde(['id','=','2']) |
|
113 | + new Donde(['id', '=', '1']), |
|
114 | + new Donde(['id', '=', '2']) |
|
115 | 115 | ); |
116 | 116 | $this->assertIsArray($donde->datos()); |
117 | 117 | } |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | public function testYDondeSoloRetornaTexto() |
123 | 123 | { |
124 | 124 | $YDonde = new YDonde( |
125 | - new Donde(['id','=','1']), |
|
126 | - new Donde(['id','=','2']) |
|
125 | + new Donde(['id', '=', '1']), |
|
126 | + new Donde(['id', '=', '2']) |
|
127 | 127 | ); |
128 | 128 | |
129 | 129 | $this->assertIsString($YDonde->donde()); |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | public function testLosDatosQueDevuelveYDondeSiempreSonArray() |
133 | 133 | { |
134 | 134 | $donde = new YDonde( |
135 | - new Donde(['id','=','1']), |
|
136 | - new Donde(['id','=','2']) |
|
135 | + new Donde(['id', '=', '1']), |
|
136 | + new Donde(['id', '=', '2']) |
|
137 | 137 | ); |
138 | 138 | $this->assertIsArray($donde->datos()); |
139 | 139 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | public function testDondeOEntreConParametroRetornaString() |
186 | 186 | { |
187 | 187 | $consulta = new DondeOEntreConParametro( |
188 | - new Donde(['id','=',1]), |
|
188 | + new Donde(['id', '=', 1]), |
|
189 | 189 | new Limite('1') |
190 | 190 | ); |
191 | 191 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | public function testDondeOEntreConOrdenYLimiteRetornaString() |
198 | 198 | { |
199 | 199 | $consulta = new DondeOEntreConOrdenYLimite( |
200 | - new Donde(['id','=',1]), |
|
200 | + new Donde(['id', '=', 1]), |
|
201 | 201 | new OrdenConLimite( |
202 | 202 | new Orden('id'), |
203 | 203 | new Limite('1') |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | { |
214 | 214 | $consulta = new DondeYDondeConParametro( |
215 | 215 | new YDonde( |
216 | - new Donde(['id','=',1]), |
|
217 | - new Donde(['id','=',1]) |
|
216 | + new Donde(['id', '=', 1]), |
|
217 | + new Donde(['id', '=', 1]) |
|
218 | 218 | ), |
219 | 219 | new Limite('1') |
220 | 220 | ); |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | { |
229 | 229 | $consulta = new DondeYDondeConOrdenYLimite( |
230 | 230 | new YDonde( |
231 | - new Donde(['id','=',1]), |
|
232 | - new Donde(['id','=',1]) |
|
231 | + new Donde(['id', '=', 1]), |
|
232 | + new Donde(['id', '=', 1]) |
|
233 | 233 | ), |
234 | 234 | new OrdenConLimite( |
235 | 235 | new Orden('id'), |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace src\interfaces; |
3 | 3 | |
4 | -use src\pdodatabase\elementos\{Orden,Limite}; |
|
4 | +use src\pdodatabase\elementos\{Orden, Limite}; |
|
5 | 5 | |
6 | 6 | interface OrdenConLimiteInterface |
7 | 7 | { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | public function __construct(Orden $Orden, Limite $Limite) |
13 | 13 | { |
14 | - $this->_orden = $this->setOrden($Orden,$Limite); |
|
14 | + $this->_orden = $this->setOrden($Orden, $Limite); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function parametro(): string |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | return $this->_orden; |
20 | 20 | } |
21 | 21 | |
22 | - private function setOrden($orden,$limite): string |
|
22 | + private function setOrden($orden, $limite): string |
|
23 | 23 | { |
24 | 24 | return $orden->parametro().$limite->parametro(); |
25 | 25 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct(DondeOEntreInterface $Donde, ElementoConParametroInterface $ElementosConParametro) |
13 | 13 | { |
14 | 14 | $this->_datos = $Donde->datos(); |
15 | - $this->_donde = $this->setDonde($Donde,$ElementosConParametro); |
|
15 | + $this->_donde = $this->setDonde($Donde, $ElementosConParametro); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function donde(): string |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return $this->_datos; |
26 | 26 | } |
27 | 27 | |
28 | - private function setDonde($Donde,$elementosConParametro): string |
|
28 | + private function setDonde($Donde, $elementosConParametro): string |
|
29 | 29 | { |
30 | 30 | return $Donde->donde().$elementosConParametro->parametro(); |
31 | 31 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct(DondeYDondeInterface $Donde, ElementoConParametroInterface $ElementosConParametro) |
13 | 13 | { |
14 | 14 | $this->_datos = $Donde->datos(); |
15 | - $this->_donde = $this->setDonde($Donde,$ElementosConParametro); |
|
15 | + $this->_donde = $this->setDonde($Donde, $ElementosConParametro); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function donde(): string |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return $this->_datos; |
26 | 26 | } |
27 | 27 | |
28 | - private function setDonde($Donde,$elementosConParametro): string |
|
28 | + private function setDonde($Donde, $elementosConParametro): string |
|
29 | 29 | { |
30 | 30 | return $Donde->donde().$elementosConParametro->parametro(); |
31 | 31 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct(DondeYDondeInterface $Donde, OrdenConLimiteInterface $ElementosConParametro) |
13 | 13 | { |
14 | 14 | $this->_datos = $Donde->datos(); |
15 | - $this->_donde = $this->setDonde($Donde,$ElementosConParametro); |
|
15 | + $this->_donde = $this->setDonde($Donde, $ElementosConParametro); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function donde(): string |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return $this->_datos; |
26 | 26 | } |
27 | 27 | |
28 | - private function setDonde($Donde,$elementosConParametro): string |
|
28 | + private function setDonde($Donde, $elementosConParametro): string |
|
29 | 29 | { |
30 | 30 | return $Donde->donde().$elementosConParametro->parametro(); |
31 | 31 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function __construct(DondeOEntreInterface $Donde, OrdenConLimiteInterface $ElementosConParametro) |
13 | 13 | { |
14 | 14 | $this->_datos = $Donde->datos(); |
15 | - $this->_donde = $this->setDonde($Donde,$ElementosConParametro); |
|
15 | + $this->_donde = $this->setDonde($Donde, $ElementosConParametro); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function donde(): string |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return $this->_datos; |
26 | 26 | } |
27 | 27 | |
28 | - private function setDonde($Donde,$elementosConParametro): string |
|
28 | + private function setDonde($Donde, $elementosConParametro): string |
|
29 | 29 | { |
30 | 30 | return $Donde->donde().$elementosConParametro->parametro(); |
31 | 31 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | private function setBaseDeDatos(string $nombreBaseDeDatos): string |
21 | 21 | { |
22 | - if(empty($nombreBaseDeDatos)) |
|
22 | + if (empty($nombreBaseDeDatos)) |
|
23 | 23 | { |
24 | 24 | throw new Exception("El nombre de la base de datos no puede estar vacio"); |
25 | 25 | } |
@@ -3,4 +3,4 @@ |
||
3 | 3 | |
4 | 4 | use src\pdodatabase\elementos\OrdenYLimite; |
5 | 5 | |
6 | -require_once __DIR__ . '/vendor/autoload.php'; |
|
6 | +require_once __DIR__.'/vendor/autoload.php'; |