| Total Complexity | 7 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class TipoDeJoin |
||
| 7 | { |
||
| 8 | private $_tiposValidos = [ |
||
| 9 | 'inner' => 'INNER JOIN', |
||
| 10 | 'right' => 'RIGHT JOIN', |
||
| 11 | 'left' => 'LEFT JOIN', |
||
| 12 | 'full' => 'FULL JOIN' |
||
| 13 | ]; |
||
| 14 | |||
| 15 | private $_join; |
||
| 16 | |||
| 17 | 6 | public function __construct(string $join) |
|
| 18 | { |
||
| 19 | 6 | $this->_join = $this->setJoin($join); |
|
| 20 | 4 | } |
|
| 21 | |||
| 22 | 3 | public function sql(): string |
|
| 23 | { |
||
| 24 | 3 | return $this->_join; |
|
| 25 | } |
||
| 26 | |||
| 27 | 6 | public function setJoin(string $join): string |
|
| 33 | } |
||
| 34 | |||
| 35 | 6 | private function estaVacio(string $string): void |
|
| 36 | { |
||
| 37 | 6 | if(empty($string)) |
|
| 38 | { |
||
| 39 | 1 | throw new Exception("Error Processing Request"); |
|
| 40 | } |
||
| 41 | 5 | } |
|
| 42 | |||
| 43 | 5 | private function esValido(string $string): void |
|
| 48 | } |
||
| 49 | } |
||
| 50 | } |