protected function preprocessWindowsPaths($contents)
    {
        $expression = "/'([A-Za-z]:)?((\\\\|\/)[^\\/:*?\"\'<>|\r\n]*)*'/";

        $paths = array();
        preg_match_all($expression, $contents, $paths);

        $modified = $contents;
        foreach ($paths[0] as $path) {
            $normalizedPath = str_replace('\\\\', '/', $path);
            $modified = str_replace($path, $normalizedPath, $modified);
        }

        if ($contents !== $modified) {
            $this->myCommand->info('Preprocessed windows paths in "bootstrap/cache/config.php".');
        }

        return $modified;
    }
protected function preprocessWindowsPaths($contents)
    {
        $expression = "/'([A-Za-z]:)?((\\\\|\/)[^\\/:*?\"\'<>|\r\n]*)*'/";

        $paths = array();
        preg_match_all($expression, $contents, $paths);

        $modified = $contents;
        foreach ($paths[0] as $path) {
            $normalizedPath = str_replace('\\\\', '/', $path);
            $modified = str_replace($path, $normalizedPath, $modified);
        }

        if ($contents !== $modified) {
            $this->myCommand->info('Preprocessed windows paths in "bootstrap/cache/config.php".');
        }

        return $modified;
    }
protected function preprocessWindowsPaths ( $ contents ) { $ expression = "/'([A-Za-z]:)?((\\\\|\/)[^\\/:*?\"\'<>|\r\n]*)*'/" ; $ paths = array ( ) ; preg_match_all ( $ expression , $ contents , $ paths ) ; $ modified = $ contents ; foreach ( $ paths [ 0 ] as $ path ) { $ normalizedPath = str_replace ( '\\\\' , '/' , $ path ) ; $ modified = str_replace ( $ path , $ normalizedPath , $ modified ) ; } if ( $ contents !== $ modified ) { $ this -> myCommand -> info ( 'Preprocessed windows paths in "bootstrap/cache/config.php".' ) ; } return $ modified ; }
Processor function. Pre-processes windows paths.

@param string $contents the 'bootstrap/cache/config.php' file contents.

@return string the modified file contents.
Processor function . Pre - processes windows paths .