| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | private function loadVersionFromGameap(): string |
||
| 33 | { |
||
| 34 | try { |
||
| 35 | $res = $this->client->get(self::GAMEAP_LATEST_VERSION_URI); |
||
| 36 | } catch (RequestException $e) { |
||
| 37 | return ''; |
||
| 38 | } |
||
| 39 | |||
| 40 | if ($res->getStatusCode() === Response::HTTP_OK) { |
||
| 41 | $lines = explode("\n", $res->getBody()->getContents()); |
||
| 42 | $parts = explode(': ', $lines[0]); |
||
| 43 | return $parts[1]; |
||
| 44 | } |
||
| 45 | |||
| 46 | return ''; |
||
| 47 | } |
||
| 68 |