Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function resolveOperationPath(string $resourceShortName, array $operation, bool $collection) : string |
||
38 | { |
||
39 | if (!isset($operation['route_name'])) { |
||
40 | return $this->deferred->resolveOperationPath($resourceShortName, $operation, $collection); |
||
41 | } |
||
42 | |||
43 | $route = $this->router->getRouteCollection()->get($operation['route_name']); |
||
44 | if (null === $route) { |
||
45 | throw new InvalidArgumentException(sprintf('The route "%s" of the ressource "%s" was not found.', $operation['route_name'], $ressourceShortName)); |
||
46 | } |
||
47 | |||
48 | return $route->getPath(); |
||
49 | } |
||
50 | } |
||
51 |