\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set. "
. "You may need to set \$min_documentRoot to this in config.php
";
}
-
+
}
-//*/
\ No newline at end of file
+//*/
diff --git a/config-test.php b/config-test.php
index 7524a3d..8b903a5 100644
--- a/config-test.php
+++ b/config-test.php
@@ -4,7 +4,6 @@
*
* To test config options, place them in this file and add "&test" to your Minify URL.
* Note that if this is on a public server, anyone can execute your test.
- *
+ *
* @package Minify
*/
-
diff --git a/config.php b/config.php
index 02f01ca..3eb084d 100644
--- a/config.php
+++ b/config.php
@@ -2,7 +2,7 @@
/**
* Configuration for "min", the default application built with the Minify
* library
- *
+ *
* @package Minify
*/
@@ -47,7 +47,7 @@ $min_errorLogger = false;
* /min/f=file1.js send the cookie minDebug=file1.js
* You can manually enable debugging by appending "&debug" to a URI.
* E.g. /min/?f=script1.js,script2.js&debug
- *
+ *
* In 'debug' mode, Minify combines files with no minification and adds comments
* to indicate line #s of the original files.
*/
@@ -73,11 +73,11 @@ $min_allowDebugFlag = false;
/**
* Leave an empty string to use PHP's $_SERVER['DOCUMENT_ROOT'].
*
- * On some servers, this value may be misconfigured or missing. If so, set this
+ * On some servers, this value may be misconfigured or missing. If so, set this
* to your full document root path with no trailing slash.
* E.g. '/home/accountname/public_html' or 'c:\\xampp\\htdocs'
*
- * If /min/ is directly inside your document root, just uncomment the
+ * If /min/ is directly inside your document root, just uncomment the
* second line. The third line might work on some Apache servers.
*/
$min_documentRoot = '';
@@ -87,7 +87,7 @@ $min_documentRoot = '';
/**
- * Cache file locking. Set to false if filesystem is NFS. On at least one
+ * Cache file locking. Set to false if filesystem is NFS. On at least one
* NFS system flock-ing attempts stalled PHP for 30 seconds!
*/
$min_cacheFileLocking = true;
@@ -96,9 +96,9 @@ $min_cacheFileLocking = true;
/**
* Combining multiple CSS files can place @import declarations after rules, which
* is invalid. Minify will attempt to detect when this happens and place a
- * warning comment at the top of the CSS output. To resolve this you can either
- * move the @imports within your CSS files, or enable this option, which will
- * move all @imports to the top of the output. Note that moving @imports could
+ * warning comment at the top of the CSS output. To resolve this you can either
+ * move the @imports within your CSS files, or enable this option, which will
+ * move all @imports to the top of the output. Note that moving @imports could
* affect CSS values (which is why this option is disabled by default).
*/
$min_serveOptions['bubbleCssImports'] = false;
@@ -134,8 +134,8 @@ $min_serveOptions['maxAge'] = 1800;
* particular directories below DOCUMENT_ROOT, set this here.
* You will still need to include the directory in the
* f or b GET parameters.
- *
- * // = shortcut for DOCUMENT_ROOT
+ *
+ * // = shortcut for DOCUMENT_ROOT
*/
//$min_serveOptions['minApp']['allowDirs'] = array('//js', '//css');
@@ -149,7 +149,7 @@ $min_serveOptions['minApp']['groupsOnly'] = false;
/**
* By default, Minify will not minify files with names containing .min or -min
* before the extension. E.g. myFile.min.js will not be processed by JSMin
- *
+ *
* To minify all files, set this option to null. You could also specify your
* own pattern that is matched against the filename.
*/
@@ -160,8 +160,8 @@ $min_serveOptions['minApp']['groupsOnly'] = false;
* If you minify CSS files stored in symlink-ed directories, the URI rewriting
* algorithm can fail. To prevent this, provide an array of link paths to
* target paths, where the link paths are within the document root.
- *
- * Because paths need to be normalized for this to work, use "//" to substitute
+ *
+ * Because paths need to be normalized for this to work, use "//" to substitute
* the doc root in the link paths (the array keys). E.g.:
*
* array('//symlink' => '/real/target/path') // unix
@@ -173,17 +173,17 @@ $min_symlinks = array();
/**
* If you upload files from Windows to a non-Windows server, Windows may report
- * incorrect mtimes for the files. This may cause Minify to keep serving stale
+ * incorrect mtimes for the files. This may cause Minify to keep serving stale
* cache files when source file changes are made too frequently (e.g. more than
* once an hour).
- *
- * Immediately after modifying and uploading a file, use the touch command to
+ *
+ * Immediately after modifying and uploading a file, use the touch command to
* update the mtime on the server. If the mtime jumps ahead by a number of hours,
- * set this variable to that number. If the mtime moves back, this should not be
+ * set this variable to that number. If the mtime moves back, this should not be
* needed.
*
- * In the Windows SFTP client WinSCP, there's an option that may fix this
- * issue without changing the variable below. Under login > environment,
+ * In the Windows SFTP client WinSCP, there's an option that may fix this
+ * issue without changing the variable below. Under login > environment,
* select the option "Adjust remote timestamp with DST".
* @link http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time
*/
@@ -198,4 +198,3 @@ $min_uploaderHoursBehind = 0;
*/
//$min_factories['minify'] = ... a callable accepting a Minify\App object
//$min_factories['controller'] = ... a callable accepting a Minify\App object
-
diff --git a/index.php b/index.php
index 7b58bcc..e3fea30 100644
--- a/index.php
+++ b/index.php
@@ -1,9 +1,9 @@
options['quiet']) {
$this->errorExit($this->options['badRequestHeader'], self::URL_DEBUG);
} else {
- list(,$statusCode) = explode(' ', $this->options['badRequestHeader']);
+ list(, $statusCode) = explode(' ', $this->options['badRequestHeader']);
return array(
'success' => false,
@@ -470,7 +470,7 @@ class Minify
public function errorExit($header, $url = '', $msgHtml = '')
{
$url = htmlspecialchars($url, ENT_QUOTES);
- list(,$h1) = explode(' ', $header, 2);
+ list(, $h1) = explode(' ', $header, 2);
$h1 = htmlspecialchars($h1);
// FastCGI environments require 3rd arg to header() to be set
list(, $code) = explode(' ', $header, 3);
@@ -593,7 +593,8 @@ class Minify
! $source // yes, we ran out of sources
|| $type === self::TYPE_CSS // yes, to process CSS individually (avoiding PCRE bugs/limits)
|| $minifier !== $lastMinifier // yes, minifier changed
- || $options !== $lastOptions)) { // yes, options changed
+ || $options !== $lastOptions // yes, options changed
+ )) {
// minify previous sources with last settings
$imploded = implode($implodeSeparator, $groupToProcessTogether);
$groupToProcessTogether = array();
diff --git a/lib/Minify/App.php b/lib/Minify/App.php
index bc885b2..4ed15a6 100644
--- a/lib/Minify/App.php
+++ b/lib/Minify/App.php
@@ -82,8 +82,7 @@ class App extends Container
$varDefined = get_defined_vars();
- $varNames = array_filter($varNames, function($name) use($varDefined)
- {
+ $varNames = array_filter($varNames, function ($name) use ($varDefined) {
return array_key_exists($name, $varDefined);
});
diff --git a/lib/Minify/CSSmin.php b/lib/Minify/CSSmin.php
index 753c510..0003f73 100644
--- a/lib/Minify/CSSmin.php
+++ b/lib/Minify/CSSmin.php
@@ -73,16 +73,16 @@ class Minify_CSSmin
}
if ($options['currentDir']) {
return Minify_CSS_UriRewriter::rewrite(
- $css
- ,$options['currentDir']
- ,$options['docRoot']
- ,$options['symlinks']
+ $css,
+ $options['currentDir'],
+ $options['docRoot'],
+ $options['symlinks']
);
}
return Minify_CSS_UriRewriter::prepend(
- $css
- ,$options['prependRelativePath']
+ $css,
+ $options['prependRelativePath']
);
}
}
diff --git a/lib/Minify/Cache/Null.php b/lib/Minify/Cache/Null.php
index 4f654a6..165043e 100644
--- a/lib/Minify/Cache/Null.php
+++ b/lib/Minify/Cache/Null.php
@@ -64,4 +64,4 @@ class Minify_Cache_Null implements Minify_CacheInterface
public function fetch($id)
{
}
-}
\ No newline at end of file
+}
diff --git a/lib/Minify/Cache/WinCache.php b/lib/Minify/Cache/WinCache.php
index 46e285a..3dd1c40 100644
--- a/lib/Minify/Cache/WinCache.php
+++ b/lib/Minify/Cache/WinCache.php
@@ -136,4 +136,4 @@ class Minify_Cache_WinCache implements Minify_CacheInterface
return true;
}
-}
\ No newline at end of file
+}
diff --git a/lib/Minify/Controller/Files.php b/lib/Minify/Controller/Files.php
index 85a76d0..7d517f4 100644
--- a/lib/Minify/Controller/Files.php
+++ b/lib/Minify/Controller/Files.php
@@ -68,4 +68,3 @@ class Minify_Controller_Files extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources);
}
}
-
diff --git a/lib/Minify/Controller/Groups.php b/lib/Minify/Controller/Groups.php
index af8af33..d3813f2 100644
--- a/lib/Minify/Controller/Groups.php
+++ b/lib/Minify/Controller/Groups.php
@@ -73,4 +73,3 @@ class Minify_Controller_Groups extends Minify_Controller_Files
return parent::createConfiguration($options);
}
}
-
diff --git a/lib/Minify/Controller/Page.php b/lib/Minify/Controller/Page.php
index 7001fe0..ca2778c 100644
--- a/lib/Minify/Controller/Page.php
+++ b/lib/Minify/Controller/Page.php
@@ -66,4 +66,3 @@ class Minify_Controller_Page extends Minify_Controller_Base
return new Minify_ServeConfiguration($options, $sources, $selectionId);
}
}
-
diff --git a/lib/Minify/ControllerInterface.php b/lib/Minify/ControllerInterface.php
index 35b4de3..1527ff6 100644
--- a/lib/Minify/ControllerInterface.php
+++ b/lib/Minify/ControllerInterface.php
@@ -19,4 +19,4 @@ interface Minify_ControllerInterface
* @return Minify_Env
*/
public function getEnv();
-}
\ No newline at end of file
+}
diff --git a/lib/Minify/HTML.php b/lib/Minify/HTML.php
index 5dfb095..ef98b38 100644
--- a/lib/Minify/HTML.php
+++ b/lib/Minify/HTML.php
@@ -99,32 +99,34 @@ class Minify_HTML
// replace SCRIPTs (and minify) with placeholders
$this->_html = preg_replace_callback(
- '/(\\s*){$ws2}"
: "{$ws1}{$openScript}{$js}{$ws2}"
);
diff --git a/lib/Minify/ImportProcessor.php b/lib/Minify/ImportProcessor.php
index 85d9ff5..f8ed4b4 100644
--- a/lib/Minify/ImportProcessor.php
+++ b/lib/Minify/ImportProcessor.php
@@ -66,7 +66,7 @@ class Minify_ImportProcessor
$this->_currentDir = dirname($file);
// remove UTF-8 BOM if present
- if (pack("CCC",0xef,0xbb,0xbf) === substr($content, 0, 3)) {
+ if (pack("CCC", 0xef, 0xbb, 0xbf) === substr($content, 0, 3)) {
$content = substr($content, 3);
}
// ensure uniform EOLs
diff --git a/lib/Minify/JS/ClosureCompiler.php b/lib/Minify/JS/ClosureCompiler.php
index b842622..1919035 100644
--- a/lib/Minify/JS/ClosureCompiler.php
+++ b/lib/Minify/JS/ClosureCompiler.php
@@ -195,13 +195,13 @@ class Minify_JS_ClosureCompiler
curl_close($ch);
} else {
throw new Minify_JS_ClosureCompiler_Exception(
- "Could not make HTTP request: allow_url_open is false and cURL not available"
+ "Could not make HTTP request: allow_url_open is false and cURL not available"
);
}
if (false === $contents) {
throw new Minify_JS_ClosureCompiler_Exception(
- "No HTTP response from server"
+ "No HTTP response from server"
);
}
diff --git a/lib/Minify/NailgunClosureCompiler.php b/lib/Minify/NailgunClosureCompiler.php
index bdc49da..8ce4520 100644
--- a/lib/Minify/NailgunClosureCompiler.php
+++ b/lib/Minify/NailgunClosureCompiler.php
@@ -110,4 +110,4 @@ class Minify_NailgunClosureCompiler extends Minify_ClosureCompiler
$this->shell("$serverCommand /dev/null 2>/dev/null & sleep 10");
}
-}
\ No newline at end of file
+}
diff --git a/lib/Minify/Source/Factory.php b/lib/Minify/Source/Factory.php
index f36d1b2..3e6e378 100644
--- a/lib/Minify/Source/Factory.php
+++ b/lib/Minify/Source/Factory.php
@@ -170,7 +170,7 @@ class Minify_Source_Factory
if ($this->options['noMinPattern'] && preg_match($this->options['noMinPattern'], $basename)) {
if (preg_match('~\.(css|less)$~i', $basename)) {
$spec['minifyOptions']['compress'] = false;
- // we still want URI rewriting to work for CSS
+ // we still want URI rewriting to work for CSS
} else {
$spec['minifier'] = 'Minify::nullMinifier';
}
diff --git a/lib/Minify/YUICompressor.php b/lib/Minify/YUICompressor.php
index a45f572..47723fc 100644
--- a/lib/Minify/YUICompressor.php
+++ b/lib/Minify/YUICompressor.php
@@ -154,4 +154,3 @@ class Minify_YUICompressor
}
}
}
-
diff --git a/lib/MrClay/Cli.php b/lib/MrClay/Cli.php
index e9ef3b3..fc736ab 100644
--- a/lib/MrClay/Cli.php
+++ b/lib/MrClay/Cli.php
@@ -390,4 +390,3 @@ class Cli
$this->errors[$letter][] = sprintf($msg, $value);
}
}
-
diff --git a/min_extras/cli/rewrite-uris.php b/min_extras/cli/rewrite-uris.php
index 0ca560f..08ca7c8 100755
--- a/min_extras/cli/rewrite-uris.php
+++ b/min_extras/cli/rewrite-uris.php
@@ -27,7 +27,7 @@ $outfile = $cli->values['o'];
$testRun = $cli->values['t'];
$docRoot = $cli->values['d'];
-$pathRewriter = function($css, $options) {
+$pathRewriter = function ($css, $options) {
return Minify_CSS_UriRewriter::rewrite($css, $options['currentDir'], $options['docRoot']);
};
@@ -54,9 +54,8 @@ $combined = Minify::combine($sources) . "\n";
if ($testRun) {
echo $combined;
echo Minify_CSS_UriRewriter::$debugText . "\n";
-} else {
+} else {
$fp = $cli->openOutput();
fwrite($fp, $combined);
$cli->closeOutput();
}
-
diff --git a/min_extras/config.php b/min_extras/config.php
index cb33edd..c7143b6 100644
--- a/min_extras/config.php
+++ b/min_extras/config.php
@@ -4,6 +4,6 @@
require __DIR__ . '/../config.php';
-$minifyCachePath = isset($min_cachePath)
- ? $min_cachePath
+$minifyCachePath = isset($min_cachePath)
+ ? $min_cachePath
: '';
diff --git a/min_extras/tools/minifyTextarea.php b/min_extras/tools/minifyTextarea.php
index a5b5926..64c04f8 100644
--- a/min_extras/tools/minifyTextarea.php
+++ b/min_extras/tools/minifyTextarea.php
@@ -13,7 +13,8 @@ $app->cache = new Minify_Cache_Null();
$env = $app->env;
-function h($txt) {
+function h($txt)
+{
return htmlspecialchars($txt, ENT_QUOTES, 'UTF-8');
}
@@ -22,13 +23,12 @@ if ($env->post('textIn')) {
}
if ($env->post('method') === 'Minify and serve') {
-
$base = trim($env->post('base'));
if ($base) {
$textIn = preg_replace(
- '@(]*>)@i'
- ,'$1'
- ,$textIn
+ '@(]*>)@i',
+ '$1',
+ $textIn
);
}
@@ -58,7 +58,6 @@ $tpl = array();
$tpl['classes'] = array('Minify_HTML', 'JSMin\\JSMin', 'Minify_CSS', 'Minify_Lines');
if (in_array($env->post('method'), $tpl['classes'])) {
-
$args = array($textIn);
if ($env->post('method') === 'Minify_HTML') {
$args[] = array(
@@ -88,7 +87,8 @@ sendPage($tpl);
* @param string $input
* @return string HTML
*/
-function getExceptionMsg(Exception $e, $input) {
+function getExceptionMsg(Exception $e, $input)
+{
$msg = "