public function setDirectory($directory = __DIR__)
    {
        if (!is_dir($directory)) {
            $message = "Directory {$directory} doesn't exist.";
            throw new \RuntimeException($message);
        }
        $this->directory = $directory;
        $this->gitattributesFile = $directory
            . DIRECTORY_SEPARATOR
            . '.gitattributes';

        return $this;
    }
public function setDirectory($directory = __DIR__)
    {
        if (!is_dir($directory)) {
            $message = "Directory {$directory} doesn't exist.";
            throw new \RuntimeException($message);
        }
        $this->directory = $directory;
        $this->gitattributesFile = $directory
            . DIRECTORY_SEPARATOR
            . '.gitattributes';

        return $this;
    }
public function setDirectory ( $ directory = __DIR__ ) { if ( ! is_dir ( $ directory ) ) { $ message = "Directory {$directory} doesn't exist." ; throw new \ RuntimeException ( $ message ) ; } $ this -> directory = $ directory ; $ this -> gitattributesFile = $ directory . DIRECTORY_SEPARATOR . '.gitattributes' ; return $ this ; }
Set the directory to analyse.

@param  string $directory The directory to analyse.
@throws \RuntimeException

@return \Stolt\LeanPackage\Analyser
Set the directory to analyse .