function addCommandsDirectory(string $path) {
        $path = \realpath($path);
        if($path === false) {
            throw new \InvalidArgumentException('Invalid path specified');
        }
        
        if($path !== $this->basepath && !\in_array($path, $this->commandsDirectories, true)) {
            $this->commandsDirectories[] = $path;
        }
        
        return $this;
    }
function addCommandsDirectory(string $path) {
        $path = \realpath($path);
        if($path === false) {
            throw new \InvalidArgumentException('Invalid path specified');
        }
        
        if($path !== $this->basepath && !\in_array($path, $this->commandsDirectories, true)) {
            $this->commandsDirectories[] = $path;
        }
        
        return $this;
    }
function addCommandsDirectory ( string $ path ) { $ path = \ realpath ( $ path ) ; if ( $ path === false ) { throw new \ InvalidArgumentException ( 'Invalid path specified' ) ; } if ( $ path !== $ this -> basepath && ! \ in_array ( $ path , $ this -> commandsDirectories , true ) ) { $ this -> commandsDirectories [ ] = $ path ; } return $ this ; }
Adds a commands directory to be used in `resolveCommandPath`.
@param string  $path
@return $this
@throws \InvalidArgumentException
Adds a commands directory to be used in resolveCommandPath .