Issues (994)

src/phpwee/phpwee.php (1 issue)

1
<?
0 ignored issues
show
Security Best Practice introduced by
It is not recommended to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP?s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

Loading history...
2
namespace PHPWee;
3
require_once("src/CssMin/CssMin.php");
4
require_once("src/HtmlMin/HtmlMin.php");
5
require_once("src/JsMin/JsMin.php");
6
 	
7
8
// Open-source (BSD) PHP inline minifier functions for HTML, XHTML, HTML5, CSS 1-3 and Javascript.   
9
// BSD Licensed  - https://github.com/searchturbine/phpwee-php-minifier/blob/master/LICENSE
10
// 
11
// Usage
12
//	$output = 	 \PHPWee\Minify::html($any_html);
13
//  $output =     \PHPWee\Minify::css($any_css);
14
//  $output =     \PHPWee\Minify::js($any_js);
15
16
17
18
19
20
class Minify{
21
	
22
	public static function html($html){
23
		return HtmlMin::minify($html);
24
	}
25
	
26
	public static function css($css){
27
		return CssMin::minify($css);
28
	}
29
	
30
	public static function js($js){
31
		return JsMin::minify($js);
32
	}
33
	
34
}
35
	
36