private function replaceJavaScriptTags($html, array $javaScriptFiles)
    {
        foreach ($javaScriptFiles['links'] as $key => $file) {
            if (!$this->isExternalJavaScriptFile($file)) {
                $html = str_replace(
                    $javaScriptFiles['tags'][$key],
                    $this->getJavaScriptContent($file),
                    $html
                );
            }
        }

        return $html;
    }
private function replaceJavaScriptTags($html, array $javaScriptFiles)
    {
        foreach ($javaScriptFiles['links'] as $key => $file) {
            if (!$this->isExternalJavaScriptFile($file)) {
                $html = str_replace(
                    $javaScriptFiles['tags'][$key],
                    $this->getJavaScriptContent($file),
                    $html
                );
            }
        }

        return $html;
    }
private function replaceJavaScriptTags ( $ html , array $ javaScriptFiles ) { foreach ( $ javaScriptFiles [ 'links' ] as $ key => $ file ) { if ( ! $ this -> isExternalJavaScriptFile ( $ file ) ) { $ html = str_replace ( $ javaScriptFiles [ 'tags' ] [ $ key ] , $ this -> getJavaScriptContent ( $ file ) , $ html ) ; } } return $ html ; }
Replace the JavaScript tags that do external requests with inline
script blocks.

@param  string $html
@param  array  $javaScriptFiles
@return string
Replace the JavaScript tags that do external requests with inline script blocks .