src/endobox/Box.php
private function visit(&$touched)
    {
        $key = \spl_object_hash($this);
        if (isset($touched[$key])) {
            throw new \RuntimeException("Cycle (endless loop) detected in box graph.");
        }
        $touched[$key] = true;
        // just for convenience
        return $this;
    }
private function visit(&$touched)
    {
        $key = \spl_object_hash($this);
        if (isset($touched[$key])) {
            throw new \RuntimeException("Cycle (endless loop) detected in box graph.");
        }
        $touched[$key] = true;
        // just for convenience
        return $this;
    }
private function visit ( & $ touched ) { $ key = \ spl_object_hash ( $ this ) ; if ( isset ( $ touched [ $ key ] ) ) { throw new \ RuntimeException ( "Cycle (endless loop) detected in box graph." ) ; } $ touched [ $ key ] = true ; // just for convenience return $ this ; }
Mark this box as visited or throw a RuntimeException if we have detected a cycle in the graph.
Mark this box as visited or throw a RuntimeException if we have detected a cycle in the graph .