| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function modifyAnnotatedRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot) |
||
| 46 | { |
||
| 47 | if (!$class->hasMethod($this->titleMethodName)) { |
||
| 48 | throw new \RuntimeException( |
||
| 49 | sprintf( |
||
| 50 | 'Title method %s does not exist on class %s.', |
||
| 51 | $this->titleMethodName, |
||
| 52 | $class->getName())); |
||
|
|
|||
| 53 | } |
||
| 54 | |||
| 55 | $route->setDefault('_title_callback', $class->getName() . '::' . $this->titleMethodName); |
||
| 56 | } |
||
| 57 | } |
||
| 58 |