@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->elStringEstaVacio($array); |
| 30 | 30 | $this->tieneMasValores($array); |
| 31 | 31 | |
| 32 | - if(count($array) == 1) |
|
| 32 | + if (count($array) == 1) |
|
| 33 | 33 | { |
| 34 | 34 | $this->_tabla1 = $array[0]; |
| 35 | 35 | $this->_tabla2 = $array[0]; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | private function estaVacioElArray(array $array): void |
| 45 | 45 | { |
| 46 | - if(count($array) == 0) |
|
| 46 | + if (count($array) == 0) |
|
| 47 | 47 | { |
| 48 | 48 | throw new Exception("Error Processing Request"); |
| 49 | 49 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | private function tieneMasValores(array $array): void |
| 54 | 54 | { |
| 55 | - if(count($array) > 2) |
|
| 55 | + if (count($array) > 2) |
|
| 56 | 56 | { |
| 57 | 57 | throw new Exception("Error Processing Request"); |
| 58 | 58 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | { |
| 64 | 64 | foreach ($array as $value) |
| 65 | 65 | { |
| 66 | - if(empty($value)) |
|
| 66 | + if (empty($value)) |
|
| 67 | 67 | { |
| 68 | 68 | throw new Exception("Error Processing Request"); |
| 69 | 69 | |
@@ -33,8 +33,7 @@ |
||
| 33 | 33 | { |
| 34 | 34 | $this->_tabla1 = $array[0]; |
| 35 | 35 | $this->_tabla2 = $array[0]; |
| 36 | - } |
|
| 37 | - else |
|
| 36 | + } else |
|
| 38 | 37 | { |
| 39 | 38 | $this->_tabla1 = $array[0]; |
| 40 | 39 | $this->_tabla2 = $array[1]; |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | declare(strict_types=1); |
| 3 | -require_once __DIR__ . '/vendor/autoload.php'; |
|
| 3 | +require_once __DIR__.'/vendor/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | use src\Factory; |
| 6 | 6 | $factory = new Factory; |
| 7 | 7 | \ No newline at end of file |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
| 70 | - array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 70 | + array_push($this->_joins, $this->crearJoin($value, $tablaPadre)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $this->multilplesJoin($value, $value['tabla']); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | private function multilplesJoin(array $value, string $tablaPadre): void |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function sql(): string |
| 17 | 17 | { |
| 18 | - return 'LIMIT '. $this->_limite; |
|
| 18 | + return 'LIMIT '.$this->_limite; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | private function setOrden(string $limite): string |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | private function estaVacio(string $limite): void |
| 30 | 30 | { |
| 31 | - if(empty($limite)) |
|
| 31 | + if (empty($limite)) |
|
| 32 | 32 | { |
| 33 | 33 | throw new Exception("La sentencia LIMIT no puede estar vacía"); |
| 34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | private function esNumero(string $limite): void |
| 39 | 39 | { |
| 40 | - if(!is_numeric($limite)) |
|
| 40 | + if (!is_numeric($limite)) |
|
| 41 | 41 | { |
| 42 | 42 | throw new Exception("El límite solo pueder número en LIMIT"); |
| 43 | 43 | } |