| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function get(string $routeKey): string |
||
| 49 | { |
||
| 50 | $sampleUri = $routeKey; |
||
| 51 | |||
| 52 | foreach ($this->routes->getPlaceholders() as $placeholder => $regex) { |
||
| 53 | $sample = $this->samples[$placeholder] ?? '::unknown::'; |
||
| 54 | |||
| 55 | $sampleUri = str_replace('(' . $regex . ')', $sample, $sampleUri); |
||
| 56 | } |
||
| 57 | |||
| 58 | // auto route |
||
| 59 | return str_replace('[/...]', '/1/2/3/4/5', $sampleUri); |
||
| 60 | } |
||
| 62 |