| Total Complexity | 6 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 10 | trait ChildNodeForwardCompatibility |
||
| 11 | { |
||
| 12 | // https://github.com/php/php-src/pull/11905 - behaviour changed in 8.3.0 |
||
| 13 | public function after(...$nodes): void |
||
| 14 | { |
||
| 15 | if (isset($this->parentNode)) |
||
| 16 | { |
||
| 17 | parent::after(...$nodes); |
||
| 18 | } |
||
| 19 | } |
||
| 20 | |||
| 21 | // https://github.com/php/php-src/pull/11905 |
||
| 22 | public function before(...$nodes): void |
||
| 23 | { |
||
| 24 | if (isset($this->parentNode)) |
||
| 25 | { |
||
| 26 | parent::before(...$nodes); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | // https://github.com/php/php-src/pull/11905 |
||
| 31 | public function replaceWith(...$nodes): void |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |