lib/GitHub/Receiver/Repositories/Contents.php
public function getContents(string $path = '', string $ref = AbstractApi::BRANCH_MASTER): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/contents/:path?:args',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $path,
            http_build_query(['ref' => $ref])));
    }
public function getContents(string $path = '', string $ref = AbstractApi::BRANCH_MASTER): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/contents/:path?:args',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $path,
            http_build_query(['ref' => $ref])));
    }
public function getContents ( string $ path = '' , string $ ref = AbstractApi :: BRANCH_MASTER ) : array { return $ this -> getApi ( ) -> request ( $ this -> getApi ( ) -> sprintf ( '/repos/:owner/:repo/contents/:path?:args' , $ this -> getRepositories ( ) -> getOwner ( ) , $ this -> getRepositories ( ) -> getRepo ( ) , $ path , http_build_query ( [ 'ref' => $ ref ] ) ) ) ; }
This method returns the contents of a file or directory in a repository.

@link https://developer.github.com/v3/repos/contents/#get-contents

@param string $path
@param string $ref

@return array
This method returns the contents of a file or directory in a repository .