public function update(array $matchers, $contents): RouteTreeNode
    {
        if ($this->matchers === $matchers && $this->contents === $contents) {
            return $this;
        }

        $clone           = clone $this;
        $clone->matchers = $matchers;
        $clone->contents = $contents;

        return $clone;
    }
public function update(array $matchers, $contents): RouteTreeNode
    {
        if ($this->matchers === $matchers && $this->contents === $contents) {
            return $this;
        }

        $clone           = clone $this;
        $clone->matchers = $matchers;
        $clone->contents = $contents;

        return $clone;
    }
public function update ( array $ matchers , $ contents ) : RouteTreeNode { if ( $ this -> matchers === $ matchers && $ this -> contents === $ contents ) { return $ this ; } $ clone = clone $ this ; $ clone -> matchers = $ matchers ; $ clone -> contents = $ contents ; return $ clone ; }
Update RouteTreeNode class.

@param array                                                                                                                        $matchers
@param \Viserio\Component\Routing\TreeGenerator\ChildrenNodeCollection|\Viserio\Component\Routing\TreeGenerator\MatchedRouteDataMap $contents

@throws \RuntimeException

@return \Viserio\Component\Routing\TreeGenerator\RouteTreeNode
Update RouteTreeNode class .