1 | <?php |
||
26 | class NbsBrowser |
||
27 | { |
||
28 | const SOURCE = 'http://www.nbs.rs/kursnaListaModul/naZeljeniDan.faces'; |
||
29 | /** |
||
30 | * @var Client |
||
31 | */ |
||
32 | private $guzzleClient; |
||
33 | |||
34 | /** |
||
35 | * @var CookieJar |
||
36 | */ |
||
37 | private $guzzleCookieJar; |
||
38 | |||
39 | /** |
||
40 | * Get XML document with rates. |
||
41 | * |
||
42 | * @param \DateTime $date |
||
43 | * @param string $rateType |
||
44 | * @return StreamInterface |
||
45 | */ |
||
46 | 6 | public function getXmlDocument(\DateTime $date, $rateType) |
|
73 | |||
74 | /** |
||
75 | * Execute HTTP request and get raw body response. |
||
76 | * |
||
77 | * @param string $method HTTP Method. |
||
78 | * @param array $params Params to send with request. |
||
79 | * @return StreamInterface |
||
80 | */ |
||
81 | 6 | private function request($method, array $query = array(), array $params = array()) |
|
93 | |||
94 | /** |
||
95 | * Get NBS's form CSRF token. |
||
96 | * |
||
97 | * @return string CSRF token. |
||
98 | * |
||
99 | * @throws \RuntimeException When API is changed. |
||
100 | */ |
||
101 | 6 | private function getFormCsrfToken() |
|
119 | |||
120 | /** |
||
121 | * Get Guzzle Client. |
||
122 | * |
||
123 | * @return Client |
||
124 | */ |
||
125 | 6 | private function getGuzzleClient() |
|
133 | |||
134 | /** |
||
135 | * Get Guzzle CookieJar. |
||
136 | * |
||
137 | * @return CookieJar |
||
138 | */ |
||
139 | 6 | private function getGuzzleCookieJar() |
|
147 | } |
||
148 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.