| @@ -114,8 +114,9 @@ | ||
| 114 | 114 | throw new ReferenceNodeNotFoundException($siblingName); |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | + * @since 4.17.0 Declare the nullable parameter explicitly. | |
| 118 | 119 | * @since 2.24.0 Make index optional to avoid rebuilding array when appending |
| 119 | 120 | * @since 2.10.2 |
| 120 | 121 | * |
| 121 | 122 | * @param int|null $index appends to end if null |
| @@ -121,9 +122,9 @@ | ||
| 121 | 122 | * @param int|null $index appends to end if null |
| 122 | 123 | * |
| 123 | 124 | * @throws NameCollisionException |
| 124 | 125 | */ |
| 125 | - protected function insert(Node $node, int $index = null) | |
| 126 | + protected function insert(Node $node, ?int $index = null) | |
| 126 | 127 | { |
| 127 | 128 | $this->checkNameCollisionDeep($node); |
| 128 | 129 | |
| 129 | 130 | if ($index === null) { |