Total Complexity | 5 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Orden implements OrdenOLimiteInterface |
||
8 | { |
||
9 | private $_orden; |
||
10 | |||
11 | 2 | public function __construct(string $orden) |
|
12 | { |
||
13 | 2 | $this->_orden = $this->setOrden($orden); |
|
14 | 1 | } |
|
15 | |||
16 | 1 | public function sql(): string |
|
17 | { |
||
18 | 1 | return 'ORDER BY '. $this->_orden; |
|
19 | } |
||
20 | |||
21 | 2 | private function setOrden(string $orden): string |
|
22 | { |
||
23 | 2 | $this->estaVacio($orden); |
|
24 | |||
25 | 1 | return $orden; |
|
26 | } |
||
27 | |||
28 | 2 | private function estaVacio(string $orden): void |
|
33 | |||
34 | } |
||
35 | } |
||
36 | } |