| Conditions | 3 |
| Paths | 5 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | private function scopeStringValue(String_ $node): void |
||
| 37 | { |
||
| 38 | try { |
||
| 39 | $lastChar = substr($node->value, -1); |
||
| 40 | |||
| 41 | $newValue = $this->scoper->scopePhp($node->value, $this->prefix, $this->whitelist); |
||
| 42 | |||
| 43 | if ("\n" !== $lastChar) { |
||
| 44 | $newValue = substr($newValue, 0, -1); |
||
| 45 | } |
||
| 46 | |||
| 47 | $node->value = $newValue; |
||
| 48 | } catch (PhpParserError $error) { |
||
| 49 | // Continue without scoping the heredoc which for some reasons contains invalid PHP code |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |