@@ -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 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function sql(): string |
17 | 17 | { |
18 | - return 'ORDER BY '. $this->_orden; |
|
18 | + return 'ORDER BY '.$this->_orden; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | private function setOrden(string $orden): string |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | private function estaVacio(string $orden): void |
29 | 29 | { |
30 | - if(empty($orden)) |
|
30 | + if (empty($orden)) |
|
31 | 31 | { |
32 | 32 | throw new Exception("La sentencia ORDER BY no puede estar vacía"); |
33 | 33 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $sql = $sql.' '.$join->sql(); |
28 | 28 | } |
29 | 29 | |
30 | - return $this->_campos.','.$this->campos(). ' FROM '. $this->_tabla->sql().$sql; |
|
30 | + return $this->_campos.','.$this->campos().' FROM '.$this->_tabla->sql().$sql; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | private function campos(): string |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | $campos = $campos.$join->campos().','; |
40 | 40 | } |
41 | 41 | |
42 | - return trim($campos,','); |
|
42 | + return trim($campos, ','); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | private function setCampos(string $campos): string |
46 | 46 | { |
47 | - $campos = str_replace(',',','.$this->_tabla->sql().'.',$campos); |
|
47 | + $campos = str_replace(',', ','.$this->_tabla->sql().'.', $campos); |
|
48 | 48 | |
49 | 49 | return $this->_tabla->sql().'.'.$campos; |
50 | 50 | } |