改名
This commit is contained in:
@@ -261,14 +261,8 @@ class Node extends HttpService
|
|||||||
*/
|
*/
|
||||||
public function addChild(Node $node, string $field): Node
|
public function addChild(Node $node, string $field): Node
|
||||||
{
|
{
|
||||||
$field = (string)$field;
|
$this->childes[] = $node;
|
||||||
/** @var Node $oLod */
|
return $node;
|
||||||
$oLod = $this->childes[$field] ?? null;
|
|
||||||
if (!empty($oLod)) {
|
|
||||||
$node = $oLod;
|
|
||||||
}
|
|
||||||
$this->childes[$field] = $node;
|
|
||||||
return $this->childes[$field];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user