protected function assertDir(string $dir, array $options)
    {
        if (is_dir($dir)) {
            return true;
        }
        
        if (!(bool)($options['optional'] ?? false)) {
            throw new LoadException("Config directory '$dir' doesn't exist");
        }

        return false;
    }
protected function assertDir(string $dir, array $options)
    {
        if (is_dir($dir)) {
            return true;
        }
        
        if (!(bool)($options['optional'] ?? false)) {
            throw new LoadException("Config directory '$dir' doesn't exist");
        }

        return false;
    }
protected function assertDir ( string $ dir , array $ options ) { if ( is_dir ( $ dir ) ) { return true ; } if ( ! ( bool ) ( $ options [ 'optional' ] ?? false ) ) { throw new LoadException ( "Config directory '$dir' doesn't exist" ) ; } return false ; }
Assert the directory exists

@param string $dir
@param array  $options
@return boolean
@throws LoadException
Assert the directory exists