@@ -38,6 +38,9 @@ discard block |
||
| 38 | 38 | protected $country; |
| 39 | 39 | |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $uri |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct($uri, $country="DE", $cache = false) |
| 42 | 45 | { |
| 43 | 46 | $this->country = $country; |
@@ -92,6 +95,9 @@ discard block |
||
| 92 | 95 | return isset($result[0]) ? $result[0] : false; |
| 93 | 96 | } |
| 94 | 97 | |
| 98 | + /** |
|
| 99 | + * @param string $result |
|
| 100 | + */ |
|
| 95 | 101 | protected function processResult($result) |
| 96 | 102 | { |
| 97 | 103 | return $result; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | protected $country; |
| 39 | 39 | |
| 40 | 40 | |
| 41 | - public function __construct($uri, $country="DE", $cache = false) |
|
| 41 | + public function __construct($uri, $country = "DE", $cache = false) |
|
| 42 | 42 | { |
| 43 | 43 | $this->country = $country; |
| 44 | 44 | $this->client = $this->setupClient($uri); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | $response = $this->client->send(); |
| 74 | 74 | if ($response->getStatusCode() !== 200) { |
| 75 | - throw new \RuntimeException('Query failed, because ' . $response->getReasonPhrase()); |
|
| 75 | + throw new \RuntimeException('Query failed, because '.$response->getReasonPhrase()); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $result = $response->getBody(); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $client->setMethod('GET'); |
| 28 | 28 | // more countries 'country' => 'DE,CH,AT' |
| 29 | 29 | // with countryCode 'zoom' => 2 |
| 30 | - $plz = 0 < (int) $par?1:0; |
|
| 30 | + $plz = 0 < (int) $par ? 1 : 0; |
|
| 31 | 31 | $client->setParameterGet(array('q' => $par, 'country' => 'CH', 'plz' => $plz, 'zoom' => 1)); |
| 32 | 32 | $response = $client->send(); |
| 33 | 33 | $result = $response->getBody(); |