| Conditions | 5 |
| Paths | 5 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | private function mobileAppStore($previewUrl, $withCountry = false) |
||
|
|
|||
| 31 | { |
||
| 32 | $storeId = null; |
||
| 33 | $platform = null; |
||
| 34 | $country = null; |
||
| 35 | $matches = []; |
||
| 36 | |||
| 37 | if (strpos($previewUrl, self::ANDROID_SUBSTRING) !== false) { |
||
| 38 | $request = new \GuzzleHttp\Psr7\Request('GET', $previewUrl); |
||
| 39 | parse_str($request->getUri()->getQuery(), $output); |
||
| 40 | $storeId = $output['id'] ?: null; |
||
| 41 | $platform = self::PLATFORM_ANDROID; |
||
| 42 | } elseif (preg_match(self::IOS_REGEX, $previewUrl, $matches)) { |
||
| 43 | $storeId = ! empty($matches['id']) ? $matches['id'] : null; |
||
| 44 | $platform = self::PLATFORM_IOS; |
||
| 45 | } |
||
| 46 | |||
| 47 | $data = [ |
||
| 48 | 'storeId' => $storeId, |
||
| 49 | 'platform' => $platform, |
||
| 50 | ]; |
||
| 51 | |||
| 52 | return $data; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.