private function processFinders(array $config)
    {
        $finders = array();
        $filter = $this->getBlacklistFilter();

        foreach ($config as $methods) {
            $finder = Finder::create()
                        ->files()
                        ->filter($filter)
                        ->ignoreVCS(true);

            if (isset($methods->in)) {
                $base = $this->getBasePath();
                $methods->in = (array) $methods->in;

                array_walk(
                    $methods->in,
                    function (&$directory) use ($base) {
                        $directory = Path::canonical(
                            $base . DIRECTORY_SEPARATOR . $directory
                        );
                    }
                );
            }

            foreach ($methods as $method => $arguments) {
                if (false === method_exists($finder, $method)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The method "Finder::%s" does not exist.',
                            $method
                        )
                    );
                }

                $arguments = (array) $arguments;

                foreach ($arguments as $argument) {
                    $finder->$method($argument);
                }
            }

            $finders[] = $finder;
        }

        return $finders;
    }
private function processFinders(array $config)
    {
        $finders = array();
        $filter = $this->getBlacklistFilter();

        foreach ($config as $methods) {
            $finder = Finder::create()
                        ->files()
                        ->filter($filter)
                        ->ignoreVCS(true);

            if (isset($methods->in)) {
                $base = $this->getBasePath();
                $methods->in = (array) $methods->in;

                array_walk(
                    $methods->in,
                    function (&$directory) use ($base) {
                        $directory = Path::canonical(
                            $base . DIRECTORY_SEPARATOR . $directory
                        );
                    }
                );
            }

            foreach ($methods as $method => $arguments) {
                if (false === method_exists($finder, $method)) {
                    throw new InvalidArgumentException(
                        sprintf(
                            'The method "Finder::%s" does not exist.',
                            $method
                        )
                    );
                }

                $arguments = (array) $arguments;

                foreach ($arguments as $argument) {
                    $finder->$method($argument);
                }
            }

            $finders[] = $finder;
        }

        return $finders;
    }
private function processFinders ( array $ config ) { $ finders = array ( ) ; $ filter = $ this -> getBlacklistFilter ( ) ; foreach ( $ config as $ methods ) { $ finder = Finder :: create ( ) -> files ( ) -> filter ( $ filter ) -> ignoreVCS ( true ) ; if ( isset ( $ methods -> in ) ) { $ base = $ this -> getBasePath ( ) ; $ methods -> in = ( array ) $ methods -> in ; array_walk ( $ methods -> in , function ( & $ directory ) use ( $ base ) { $ directory = Path :: canonical ( $ base . DIRECTORY_SEPARATOR . $ directory ) ; } ) ; } foreach ( $ methods as $ method => $ arguments ) { if ( false === method_exists ( $ finder , $ method ) ) { throw new InvalidArgumentException ( sprintf ( 'The method "Finder::%s" does not exist.' , $ method ) ) ; } $ arguments = ( array ) $ arguments ; foreach ( $ arguments as $ argument ) { $ finder -> $ method ( $ argument ) ; } } $ finders [ ] = $ finder ; } return $ finders ; }
Processes the Finders configuration list.

@param array $config The configuration.

@return Finder[] The list of Finders.

@throws InvalidArgumentException If the configured method does not exist.
Processes the Finders configuration list .