| Conditions | 4 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | 2 | public function getRegex() |
|
| 48 | { |
||
| 49 | 2 | if (!$this->regex) { |
|
| 50 | 2 | $map = $this->map; |
|
| 51 | 2 | foreach ($this->params as $key => $value) { |
|
| 52 | 2 | if (stristr($map, ":" . $key) !== false) { |
|
| 53 | 2 | $map = str_replace(":" . $key, "(" . $value . ")", $map); |
|
| 54 | // unset($params[$key]); |
||
| 55 | 2 | $this->variables[] = $key; |
|
| 56 | } |
||
| 57 | } |
||
| 58 | 2 | $this->regex = $map; |
|
| 59 | } |
||
| 60 | |||
| 61 | 2 | return $this->regex; |
|
| 62 | } |
||
| 64 |