private function validateDirs($config): void
    {
        // Check that dirs key exists
        if (! Validator::key('dirs')->validate($config)) {
            throw new InvalidConfigException('"dirs" parameter is not an array.');
        }
        // Clean dirs value
        if ($config['dirs'] === null) {
            $this->config['dirs'] = $config['dirs'] = [];
        }
        // Validate each dirs
        if (! Validator::arrayVal()
            ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs'])
        ) {
            throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
        }
    }
private function validateDirs($config): void
    {
        // Check that dirs key exists
        if (! Validator::key('dirs')->validate($config)) {
            throw new InvalidConfigException('"dirs" parameter is not an array.');
        }
        // Clean dirs value
        if ($config['dirs'] === null) {
            $this->config['dirs'] = $config['dirs'] = [];
        }
        // Validate each dirs
        if (! Validator::arrayVal()
            ->each(Validator::stringType(), Validator::stringType())->validate($config['dirs'])
        ) {
            throw new InvalidConfigException('Some directories in "dirs" parameter are not strings.');
        }
    }
private function validateDirs ( $ config ) : void { // Check that dirs key exists if ( ! Validator :: key ( 'dirs' ) -> validate ( $ config ) ) { throw new InvalidConfigException ( '"dirs" parameter is not an array.' ) ; } // Clean dirs value if ( $ config [ 'dirs' ] === null ) { $ this -> config [ 'dirs' ] = $ config [ 'dirs' ] = [ ] ; } // Validate each dirs if ( ! Validator :: arrayVal ( ) -> each ( Validator :: stringType ( ) , Validator :: stringType ( ) ) -> validate ( $ config [ 'dirs' ] ) ) { throw new InvalidConfigException ( 'Some directories in "dirs" parameter are not strings.' ) ; } }
Validate directories contained in configuration.

@param mixed $config The configuration.

@throws InvalidConfigException If a directory is invalid (source or target).
Validate directories contained in configuration .