| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | final class CachedRouteNameResolver implements RouteNameResolverInterface |
||
| 25 | { |
||
| 26 | use CachedTrait; |
||
| 27 | |||
| 28 | const CACHE_KEY_PREFIX = 'route_name_'; |
||
| 29 | |||
| 30 | private $decorated; |
||
| 31 | |||
| 32 | public function __construct(CacheItemPoolInterface $cacheItemPool, RouteNameResolverInterface $decorated) |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function getRouteName(string $resourceClass, $operationType /**, array $context = []**/): string |
||
| 51 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.