| Conditions | 3 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function prefixStringValue(String_ $node): void |
||
| 40 | { |
||
| 41 | try { |
||
| 42 | $lastChar = substr($node->value, -1); |
||
| 43 | |||
| 44 | $newValue = $this->scoper->scopePhp( |
||
| 45 | $node->value, |
||
| 46 | $this->prefix, |
||
| 47 | $this->whitelist, |
||
| 48 | ); |
||
| 49 | |||
| 50 | if ("\n" !== $lastChar) { |
||
| 51 | $newValue = substr($newValue, 0, -1); |
||
| 52 | } |
||
| 53 | |||
| 54 | $node->value = $newValue; |
||
| 55 | } catch (PhpParserError $error) { |
||
| 56 | // Continue without scoping the heredoc which for some reasons contains invalid PHP code |
||
| 60 |