Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
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 | 1 | break; |
|
|
|||
55 | } |
||
56 | } |
||
57 | |||
58 | return null; |
||
59 | } |
||
61 |
The
break
statement is not necessary if it is preceded for example by areturn
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.