public function getTree($ref = 'HEAD', $path = null)
    {
        if (is_string($path) && '' !== $path) {
            $outputLines = $this
                ->getCaller()
                ->execute(LsTreeCommand::getInstance($this)->tree($ref, $path))
                ->getOutputLines(true);

            $path = TreeObject::createFromOutputLine($this, $outputLines[0]);
        }

        return new Tree($this, $ref, $path);
    }
public function getTree($ref = 'HEAD', $path = null)
    {
        if (is_string($path) && '' !== $path) {
            $outputLines = $this
                ->getCaller()
                ->execute(LsTreeCommand::getInstance($this)->tree($ref, $path))
                ->getOutputLines(true);

            $path = TreeObject::createFromOutputLine($this, $outputLines[0]);
        }

        return new Tree($this, $ref, $path);
    }
public function getTree ( $ ref = 'HEAD' , $ path = null ) { if ( is_string ( $ path ) && '' !== $ path ) { $ outputLines = $ this -> getCaller ( ) -> execute ( LsTreeCommand :: getInstance ( $ this ) -> tree ( $ ref , $ path ) ) -> getOutputLines ( true ) ; $ path = TreeObject :: createFromOutputLine ( $ this , $ outputLines [ 0 ] ) ; } return new Tree ( $ this , $ ref , $ path ) ; }
Retrieve an instance of Tree
Tree Object is Countable, Iterable and has ArrayAccess for easy manipulation

@param string|TreeishInterface $ref  the treeish to check
@param string|NodeObject       $path Object or null for root

@throws \RuntimeException
@throws \Symfony\Component\Process\Exception\LogicException
@throws InvalidArgumentException
@throws \Symfony\Component\Process\Exception\RuntimeException
@return Objects\Tree
Retrieve an instance of Tree Tree Object is Countable Iterable and has ArrayAccess for easy manipulation