| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 85 | function route(Route $route, array $attributes = []) |
||
| 86 | { |
||
| 87 | $attributes += $route->getDefaults(); |
||
| 88 | |||
| 89 | $path = preg_replace_callback('~\<(\w+)\>~', function ($matches) use ($attributes) |
||
| 90 | { |
||
| 91 | return $attributes[$matches[1]] ?? null; |
||
| 92 | }, $route->getFilterPath()); |
||
| 93 | |||
| 94 | return preg_replace('~(\(/\)|\(|\)|//)~', '', $path); |
||
| 95 | } |
||
| 96 |