Total Complexity | 8 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class Cidades { |
||
7 | |||
8 | public $http; |
||
9 | |||
10 | public function __construct(Connection $connection) |
||
11 | { |
||
12 | $this->http = $connection; |
||
13 | } |
||
14 | |||
15 | // Retorna a listagem de cobranças |
||
16 | public function getAll(array $filtros){ |
||
17 | $filtro = ''; |
||
18 | if(is_array($filtros)){ |
||
|
|||
19 | if($filtros){ |
||
20 | foreach($filtros as $key => $f){ |
||
21 | if(!empty($f)){ |
||
22 | if($filtro){ |
||
23 | $filtro .= '&'; |
||
24 | } |
||
25 | $filtro .= $key.'='.$f; |
||
26 | } |
||
27 | } |
||
28 | $filtro = '?'.$filtro; |
||
29 | } |
||
30 | } |
||
31 | return $this->http->get('/cities'.$filtro); |
||
32 | } |
||
33 | |||
34 | // Retorna os dados da cobrança de acordo com o Id |
||
35 | public function getById($id){ |
||
37 | } |
||
38 | |||
39 | } |
||
40 |