@@ -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) |
| 65 | 65 | { |
| 66 | - if(isset($value['join'])) |
|
| 66 | + if (isset($value['join'])) |
|
| 67 | 67 | { |
| 68 | 68 | foreach ($value['join'] as $value) |
| 69 | 69 | { |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | public function __construct(Tabla $Tabla, Campos $Campos, array $Joins) |
| 14 | 14 | { |
| 15 | - $this->_joins = array_reverse( (array) $Joins); |
|
| 15 | + $this->_joins = array_reverse((array) $Joins); |
|
| 16 | 16 | $this->_tabla = $Tabla; |
| 17 | 17 | $this->_campos = $this->setCampos($Campos->sql()); |
| 18 | 18 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $sql = $join->sql().' '.$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 | } |
@@ -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 |