diff --git a/library/Icinga/Web/JavaScript.php b/library/Icinga/Web/JavaScript.php index c209672aa..aa9f049ee 100644 --- a/library/Icinga/Web/JavaScript.php +++ b/library/Icinga/Web/JavaScript.php @@ -5,10 +5,6 @@ namespace Icinga\Web; use Icinga\Application\Icinga; use JShrink\Minifier; -// @codingStandardsIgnoreStart -require_once ICINGA_LIBDIR . '/vendor/JShrink/Minifier.php'; -// @codingStandardsIgnoreStop - class JavaScript { protected static $jsFiles = array( @@ -68,7 +64,7 @@ class JavaScript } foreach (self::$jsFiles as $file) { - $js .= file_get_contents($basedir . '/' . $file); + $js .= file_get_contents($basedir . '/' . $file); } foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $name => $module) { @@ -77,6 +73,7 @@ class JavaScript } } if ($minified) { + require_once ICINGA_LIBDIR . '/vendor/JShrink/Minifier.php'; $out .= Minifier::minify($js, array('flaggedComments' => false)); } else { $out .= $js; diff --git a/library/Icinga/Web/StyleSheet.php b/library/Icinga/Web/StyleSheet.php index fab961768..6114643e6 100644 --- a/library/Icinga/Web/StyleSheet.php +++ b/library/Icinga/Web/StyleSheet.php @@ -27,7 +27,7 @@ class StyleSheet $less = new LessCompiler(); $basedir = Icinga::app()->getBootstrapDirecory(); foreach (self::$lessFiles as $file) { - $less->addFile($basedir . '/' . $file); + $less->addFile($basedir . '/' . $file); } $less->addLoadedModules(); $less->addFile($basedir . '/css/pdf/pdfprint.less'); @@ -53,7 +53,7 @@ class StyleSheet $less = new LessCompiler(); $basedir = Icinga::app()->getBootstrapDirecory(); foreach (self::$lessFiles as $file) { - $less->addFile($basedir . '/' . $file); + $less->addFile($basedir . '/' . $file); } $less->addLoadedModules(); if ($minified) {