@@ -29,10 +29,14 @@ |
||
| 29 | 29 | return $source->withCode( |
| 30 | 30 | \preg_replace_callback( |
| 31 | 31 | $this->pattern, |
| 32 | - static function (array $matches) use ($context) { |
|
| 33 | - try { |
|
| 32 | + static function (array $matches) use ($context) |
|
| 33 | + { |
|
| 34 | + try |
|
| 35 | + { |
|
| 34 | 36 | return $context->resolveValue($matches['name']) ?? $matches['default'] ?? null; |
| 35 | - } catch (ContextException $e) { |
|
| 37 | + } |
|
| 38 | + catch (ContextException $e) |
|
| 39 | + { |
|
| 36 | 40 | return $matches['default'] ?? throw $e; |
| 37 | 41 | } |
| 38 | 42 | }, |