public function addDirectory(string $directory): self
    {
        if (! \in_array($directory, $this->directories, true)) {
            $this->directories[] = $directory;
        }

        return $this;
    }
public function addDirectory(string $directory): self
    {
        if (! \in_array($directory, $this->directories, true)) {
            $this->directories[] = $directory;
        }

        return $this;
    }
public function addDirectory ( string $ directory ) : self { if ( ! \ in_array ( $ directory , $ this -> directories , true ) ) { $ this -> directories [ ] = $ directory ; } return $ this ; }
Add directory.

@param string $directory

@return $this
Add directory .