| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) |
||
| 49 | { |
||
| 50 | /** @var RouteNotFoundException $notFound */ |
||
| 51 | $notFound = null; |
||
| 52 | |||
| 53 | foreach ($this->generators as $generator) { |
||
| 54 | try { |
||
| 55 | return $generator->generate($name, $parameters, $referenceType); |
||
| 56 | } catch (RouteNotFoundException $e) { |
||
| 57 | $notFound = $e; |
||
| 58 | } |
||
| 59 | } |
||
| 60 | throw $notFound; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.