| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 20 | 2 | public static function getCacheKeyCompat(Package\PackageInterface $p, $processedUrl) |
|
| 21 | { |
||
| 22 | 2 | static $rgetCacheKey, $my, $params; |
|
| 23 | 2 | if (!$rgetCacheKey) { |
|
| 24 | 1 | $rgetCacheKey = new \ReflectionMethod('Composer\Downloader\FileDownloader', 'getCacheKey'); |
|
| 25 | 1 | $rgetCacheKey->setAccessible(true); |
|
| 26 | 1 | $my = new self; |
|
| 27 | 1 | $params = count($rgetCacheKey->getParameters()); |
|
| 28 | 1 | } |
|
| 29 | 2 | if ($params === 1) { |
|
| 30 | 2 | return $rgetCacheKey->invoke($my, $p); |
|
| 31 | } |
||
| 32 | |||
| 33 | // @codeCoverageIgnoreStart |
||
| 34 | return $rgetCacheKey->invoke($my, $p, $processedUrl); |
||
| 35 | // @codeCoverageIgnoreEnd |
||
| 36 | } |
||
| 37 | } |
||
| 38 |