Total Complexity | 7 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Environment |
||
10 | { |
||
11 | |||
12 | private $apiPix; |
||
13 | private $apiBolecode; |
||
14 | private $apiAuth; |
||
15 | private $apiBoleto; |
||
16 | private $apiBoletoConsulta; |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | * @param string $api |
||
21 | * |
||
22 | */ |
||
23 | private function __construct($apiAuth, $apiPix, $apiBolecode, $apiBoleto, $apiBoletoConsulta) |
||
24 | { |
||
25 | $this->apiAuth = $apiAuth; |
||
26 | $this->apiPix = $apiPix; |
||
27 | $this->apiBolecode = $apiBolecode; |
||
28 | $this->apiBoleto = $apiBoleto; |
||
29 | $this->apiBoletoConsulta = $apiBoletoConsulta; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * |
||
34 | * @return Environment |
||
35 | */ |
||
36 | public static function production() |
||
37 | { |
||
38 | return new Environment( |
||
39 | 'https://sts.itau.com.br/api/oauth/token', |
||
40 | 'https://secure.api.itau/pix_recebimentos/v2', |
||
41 | 'https://secure.api.itau/pix_recebimentos_conciliacoes/v2', |
||
42 | 'https://api.itau.com.br/cash_management/v2', |
||
43 | 'https://api.itau.com.br/cash_management/v2', |
||
44 | 'https://secure.api.cloud.itau.com.br/boletoscash/v2' |
||
|
|||
45 | ); |
||
46 | } |
||
47 | |||
48 | public function getApiPixUrl(): string |
||
49 | { |
||
50 | return $this->apiPix; |
||
51 | } |
||
52 | |||
53 | public function getApiBoleCodeUrl(): string |
||
56 | } |
||
57 | |||
58 | public function getApiBoletoUrl(): string |
||
59 | { |
||
60 | return $this->apiBoleto; |
||
61 | } |
||
62 | |||
63 | public function getApiBoletoConsultaUrl(): string |
||
64 | { |
||
65 | return $this->apiBoletoConsulta; |
||
66 | } |
||
67 | |||
68 | public function getApiUrlAuth(): string |
||
71 | } |
||
72 | } |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.