Create new instance of self with some properties of its parents

@return static
164632
protected function createChildInstance()
    {
        $instance = new static(...\func_get_args());

        if (isset($this->document)) {
            $instance->setDomDocument($this->document);
        }

        if (isset($this->root_instance)) {
            $instance->root_instance = $this->root_instance;
        } else {
            $instance->root_instance = $this;
        }

        if (\is_bool($this->xml_mode)) {
            $instance->xml_mode = $this->xml_mode;
        }

        if (isset($this->document) && $this->dom_xpath instanceof \DOMXPath) {
            $instance->dom_xpath = $this->dom_xpath;
        }

        return $instance;
    }
1078663
public function create()
    {
        $instance = self::createOrderLineItem($this);
        $this->setId($instance->getId());
        return $instance;
    }
658088
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(CallEventFactory::instance());
        }

        return self::$instance;
    }
972824
public function newInstance()
    {
        $escaper = $this->escaper;
        $aura = $this->aura;

        return new MetaHelper(
            [
                'title' => function () use ($aura, $escaper) {
                    return new Helper\Title(
                        $aura->get('title'),
                        $aura->get('metas'),
                        $escaper
                    );
                },
                'description' => function () use ($aura) {
                    return new Helper\Description(
                        $aura->get('metas')
                    );
                },
                'robots' => function () use ($aura) {
                    return new Helper\Robots(
                        $aura->get('metas')
                    );
                },
                'icons' => function () use ($aura) {
                    return new Helper\Icons(
                        $aura->get('links')
                    );
                },
                'charset' => function () use ($aura) {
                    return new Helper\Charset(
                        $aura->get('metas')
                    );
                },
                'compat' => function () use ($aura) {
                    return new Helper\Compat(
                        $aura->get('metas')
                    );
                },
                'viewport' => function () use ($aura) {
                    return new Helper\Viewport(
                        $aura->get('metas')
                    );
                },
                'url' => function () use ($aura) {
                    return new Helper\Url(
                        $aura->get('metas')
                    );
                },
                'locale' => function () use ($aura) {
                    return new Helper\Loc(
                        $aura->get('metas')
                    );
                },
                'image' => function () use ($aura) {
                    return new Helper\Image(
                        $aura->get('metas'),
                        $aura->get('links')
                    );
                },
                'containerClass' => function () use ($escaper) {
                    return new Helper\ContainerClass($escaper);
                },
                'bodyClass' => function () use ($escaper) {
                    return new Helper\ContainerClass($escaper);
                },
                'metas' => function () use ($aura) {
                    return $aura->get('metas');
                },
                'links' => function () use ($aura) {
                    return $aura->get('links');
                },
                'scripts' => function () use ($aura) {
                    return $aura->get('scripts');
                },
                'scriptsFoot' => function () use ($aura) {
                    return $aura->get('scriptsFoot');
                },
                'styles' => function () use ($aura) {
                    return $aura->get('styles');
                }
            ]
        );

    }
229641
public function CloneInstance()
	{
		$result = new ChildNodeIterator();
		$result->AssignFrom( $this );
		$result->excludeComments = $this->excludeComments;
		$result->excludeWhitespace = $this->excludeWhitespace;
		return $result;
	}
747584
public function create()
    {
        $instance = self::createCustomer($this);
        $this->setId($instance->getId());
        return $instance;
    }
1222894
public function create()
    {
        $instance = self::createWishList($this);
        $this->setId($instance->getId());
        return $instance;
    }
671892
public function create()
    {
        $instance = self::createReturnLineItem($this);
        $this->setId($instance->getId());
        return $instance;
    }
1334691
private static function initInstance(): Instance
    {
        $instance = new Instance();
        $instance->setOptions(Config::get('translator'));
        $instance->init();
        return $instance;
    }
126980
public function CloneInstance()
	{
		$result = new FollowingNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
332104
public function CloneInstance()
	{
		$result = new PrecedingNodeIterator();
		$result->AssignFrom( $this );
		$result->kind = $this->kind;
		return $result;
	}
537106
public function create(): self
    {
        $this->payload = null;
        $this->isPayloadDetached = false;
        $this->signatures = [];
        $this->isPayloadEncoded = null;

        return $this;
    }
685578
def create_instance(self, parent):
        """"""
        self.kwargs['instantiate'] = True
        self.kwargs['parent'] = parent
        instance = self.cls(*self.args, **self.kwargs)
        instance._field_seqno = self._field_seqno
        return instance
962728
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                InvocableInspector::instance(),
                Invoker::instance()
            );
        }

        return self::$instance;
    }
1049393
public function nest()
    {
        $parentColumn = $this->parentColumn;
        if (!$parentColumn) {
            return $this;
        }

        // Set id as keys.
        $this->items = $this->getDictionary();

        $keysToDelete = [];

        // Add empty collection to each items.
        $collection = $this->each(function ($item) {
            if (!$item->{$this->childrenName}) {
                $item->{$this->childrenName} = app()->make('Illuminate\Support\Collection');
            }
        });

        // Remove items with missing ancestor.
        if ($this->removeItemsWithMissingAncestor) {
            $collection = $this->reject(function ($item) use ($parentColumn) {
                if ($item->$parentColumn) {
                    $missingAncestor = $this->anAncestorIsMissing($item);

                    return $missingAncestor;
                }
            });
        }

        // Add items to children collection.
        foreach ($collection->items as $key => $item) {
            if ($item->$parentColumn && isset($collection[$item->$parentColumn])) {
                $collection[$item->$parentColumn]->{$this->childrenName}->push($item);
                $keysToDelete[] = $item->id;
            }
        }

        // Delete moved items.
        $this->items = array_values(Arr::except($collection->items, $keysToDelete));

        return $this;
    }
650629
public function getPrevious()
    {
        $start = clone $this->begin;
        $start->sub(static::getDateInterval());

        return new static($start, $this->factory);
    }
3761
public function create()
    {
        $instance = self::createDiscountPromotion($this);
        $this->setId($instance->getId());
        return $instance;
    }