protected function getJsContent(string $file, bool $minify): string
    {
        $content = file_get_contents($file);

        if ($content === false) {
            throw new RuntimeException(sprintf('File could be read: %s', $file));
        }

        if ($minify) {
            $content = JSMin::minify($content);
        }

        return $content;
    }
protected function getJsContent(string $file, bool $minify): string
    {
        $content = file_get_contents($file);

        if ($content === false) {
            throw new RuntimeException(sprintf('File could be read: %s', $file));
        }

        if ($minify) {
            $content = JSMin::minify($content);
        }

        return $content;
    }
protected function getJsContent ( string $ file , bool $ minify ) : string { $ content = file_get_contents ( $ file ) ; if ( $ content === false ) { throw new RuntimeException ( sprintf ( 'File could be read: %s' , $ file ) ) ; } if ( $ minify ) { $ content = JSMin :: minify ( $ content ) ; } return $ content ; }
Minimise JS.

@param string $file Name of default JS file
@param bool $minify Minify js if true

@throws RuntimeException

@return string JavaScript code
Minimise JS .