protected function _appendExtensionsToPaths(array $paths, array $extensions)
    {
        $getPathsWithExtensions = function($path) use($extensions) {
            if ($this->_hasExtension($path)) {
                return [$path];
            }

            $addExtension = function($extension) use($path) {
                return $this->_addExtension($path, $extension);
            };

            return array_map($addExtension, $extensions);
        };

        return call_user_func_array('array_merge', array_map($getPathsWithExtensions, $paths));
    }
protected function _appendExtensionsToPaths(array $paths, array $extensions)
    {
        $getPathsWithExtensions = function($path) use($extensions) {
            if ($this->_hasExtension($path)) {
                return [$path];
            }

            $addExtension = function($extension) use($path) {
                return $this->_addExtension($path, $extension);
            };

            return array_map($addExtension, $extensions);
        };

        return call_user_func_array('array_merge', array_map($getPathsWithExtensions, $paths));
    }
protected function _appendExtensionsToPaths ( array $ paths , array $ extensions ) { $ getPathsWithExtensions = function ( $ path ) use ( $ extensions ) { if ( $ this -> _hasExtension ( $ path ) ) { return [ $ path ] ; } $ addExtension = function ( $ extension ) use ( $ path ) { return $ this -> _addExtension ( $ path , $ extension ) ; } ; return array_map ( $ addExtension , $ extensions ) ; } ; return call_user_func_array ( 'array_merge' , array_map ( $ getPathsWithExtensions , $ paths ) ) ; }
Append the extensions to the paths.

@param array $paths The file paths to append to.
@param array $extensions The extensions.
@return array The full combination of every path with every extension.
Append the extensions to the paths .