protected function parseFiles($wrapper, $prefix)
    {
        $this->verbose($prefix . 'Fetching files ...');
        $time       = microtime(true);
        $fileAmount = count($wrapper->getAllFileNames());
        $this->verbose(
            sprintf(
                "\r" . $prefix . "Collected %d files in %0.2f seconds.",
                $fileAmount,
                microtime(true) - $time
            )
        );

        $this->verbose($prefix . 'Parsing ' . $fileAmount . ' files ');
        $this->debug('  in ' . $wrapper->getBasePath());

        $time     = microtime(true);

        $progress = new ProgressBar($this->getOutput(), $fileAmount);
        $progress->setFormat('%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s% RAM');

        $dataTree = [];
        foreach ($wrapper->getDataTree() as $tree) {
            $dataTree = $wrapper->mergeTrees($dataTree, $tree);
            $progress->advance();
        }

        $progress->clear();

        $this->verbose(
            sprintf(
                $prefix . "Parsed %d files in %0.2f seconds.",
                $fileAmount,
                microtime(true) - $time
            )
        );

        return $dataTree;
    }
protected function parseFiles($wrapper, $prefix)
    {
        $this->verbose($prefix . 'Fetching files ...');
        $time       = microtime(true);
        $fileAmount = count($wrapper->getAllFileNames());
        $this->verbose(
            sprintf(
                "\r" . $prefix . "Collected %d files in %0.2f seconds.",
                $fileAmount,
                microtime(true) - $time
            )
        );

        $this->verbose($prefix . 'Parsing ' . $fileAmount . ' files ');
        $this->debug('  in ' . $wrapper->getBasePath());

        $time     = microtime(true);

        $progress = new ProgressBar($this->getOutput(), $fileAmount);
        $progress->setFormat('%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s% RAM');

        $dataTree = [];
        foreach ($wrapper->getDataTree() as $tree) {
            $dataTree = $wrapper->mergeTrees($dataTree, $tree);
            $progress->advance();
        }

        $progress->clear();

        $this->verbose(
            sprintf(
                $prefix . "Parsed %d files in %0.2f seconds.",
                $fileAmount,
                microtime(true) - $time
            )
        );

        return $dataTree;
    }
protected function parseFiles ( $ wrapper , $ prefix ) { $ this -> verbose ( $ prefix . 'Fetching files ...' ) ; $ time = microtime ( true ) ; $ fileAmount = count ( $ wrapper -> getAllFileNames ( ) ) ; $ this -> verbose ( sprintf ( "\r" . $ prefix . "Collected %d files in %0.2f seconds." , $ fileAmount , microtime ( true ) - $ time ) ) ; $ this -> verbose ( $ prefix . 'Parsing ' . $ fileAmount . ' files ' ) ; $ this -> debug ( '  in ' . $ wrapper -> getBasePath ( ) ) ; $ time = microtime ( true ) ; $ progress = new ProgressBar ( $ this -> getOutput ( ) , $ fileAmount ) ; $ progress -> setFormat ( '%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s% RAM' ) ; $ dataTree = [ ] ; foreach ( $ wrapper -> getDataTree ( ) as $ tree ) { $ dataTree = $ wrapper -> mergeTrees ( $ dataTree , $ tree ) ; $ progress -> advance ( ) ; } $ progress -> clear ( ) ; $ this -> verbose ( sprintf ( $ prefix . "Parsed %d files in %0.2f seconds." , $ fileAmount , microtime ( true ) - $ time ) ) ; return $ dataTree ; }
Parse files within a wrapper.

@param AbstractWrapper $wrapper
@param string          $prefix

@return mixed
Parse files within a wrapper .