| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 1 | public function __invoke(RequestInterface $request, ResponseInterface $response): ?string |
|
| 46 | { |
||
| 47 | 1 | $scriptData = ScraperUtil::extractScriptData($response->getBody()->getContents()); |
|
| 48 | |||
| 49 | 1 | foreach ($scriptData as $key => $scriptValue) { |
|
| 50 | 1 | if (isset($scriptValue[1][1][0][0][3][4][2])) { |
|
| 51 | 1 | return GPlayApps::GOOGLE_PLAY_URL . $scriptValue[1][1][0][0][3][4][2] . |
|
| 52 | 1 | '&' . GPlayApps::REQ_PARAM_LOCALE . '=' . urlencode($this->appId->getLocale()) . |
|
| 53 | 1 | '&' . GPlayApps::REQ_PARAM_COUNTRY . '=' . urlencode($this->appId->getCountry()); |
|
| 54 | break; |
||
|
|
|||
| 55 | } |
||
| 56 | } |
||
| 57 | |||
| 58 | return null; |
||
| 59 | } |
||
| 61 |
The
breakstatement is not necessary if it is preceded for example by areturnstatement:If you would like to keep this construct to be consistent with other
casestatements, you can safely mark this issue as a false-positive.