| Conditions | 3 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | protected function runVariableMacro(string & $content, int $depth): void // Intentionally & |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Remove lines with inline variables definition and put then into DocuScope |
||
| 14 | */ |
||
| 15 | $content = preg_replace_callback( |
||
| 16 | '/\{\$([a-zA-Z_0-9]+)\}/m', |
||
| 17 | function(array $input) use ($depth): string { |
||
| 18 | $line = $this->docuScope->getInlineVariable($input[1]); |
||
| 19 | |||
| 20 | if ($depth <= parent::MAX_EXECUTE_DEPTH) { |
||
| 21 | foreach ($this->getMacrosToRunOnInlineVariables() as $macro) { |
||
| 22 | $macro->runVariableMacro($line, $depth + 1); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | return $line; |
||
| 27 | }, |
||
| 28 | $content |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |