@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | if (!empty($route->getWhere())) { |
| 72 | 72 | foreach ($route->getWhere() as $attribute => $where) { |
| 73 | - $path = preg_replace('#{('.$attribute.')}#', '('.$where.')', $path); |
|
| 73 | + $path = preg_replace('#{(' . $attribute . ')}#', '(' . $where . ')', $path); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | $path = preg_replace("#{([\w]+)}#", '([^/]+)', $path); |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | |
| 107 | 107 | public function generatePath(array $params = []): string |
| 108 | 108 | { |
| 109 | - return preg_replace_callback('/\{(.*?)\}/', function ($m) use (&$params) { |
|
| 109 | + return preg_replace_callback('/\{(.*?)\}/', function($m) use (&$params) { |
|
| 110 | 110 | if (isset($params[$m[1]])) { |
| 111 | 111 | return $params[$m[1]]; |
| 112 | 112 | } |