1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-14 01:54:11 +02:00

do some trivial codestyle fixes

unix newlines, trailing spaces
This commit is contained in:
Elan Ruusamäe
2016-01-22 00:30:38 +02:00
parent 90bf31f53b
commit 379feaba99
40 changed files with 1424 additions and 1327 deletions

View File

@@ -1,27 +1,28 @@
<?php
/**
* Detect whether request should be debugged
*
* @package Minify
* @author Stephen Clay <steve@mrclay.org>
*/
class Minify_DebugDetector {
public static function shouldDebugRequest(Minify_Env $env)
{
if ($env->get('debug')) {
return true;
}
$cookieValue = $env->cookie('minifyDebug');
if ($cookieValue) {
foreach (preg_split('/\\s+/', $cookieValue) as $debugUri) {
$pattern = '@' . preg_quote($debugUri, '@') . '@i';
$pattern = str_replace(array('\\*', '\\?'), array('.*', '.'), $pattern);
if (preg_match($pattern, $env->getRequestUri())) {
return true;
}
}
}
return false;
}
}
<?php
/**
* Detect whether request should be debugged
*
* @package Minify
* @author Stephen Clay <steve@mrclay.org>
*/
class Minify_DebugDetector {
public static function shouldDebugRequest(Minify_Env $env)
{
if ($env->get('debug')) {
return true;
}
$cookieValue = $env->cookie('minifyDebug');
if ($cookieValue) {
foreach (preg_split('/\\s+/', $cookieValue) as $debugUri) {
$pattern = '@' . preg_quote($debugUri, '@') . '@i';
$pattern = str_replace(array('\\*', '\\?'), array('.*', '.'), $pattern);
if (preg_match($pattern, $env->getRequestUri())) {
return true;
}
}
}
return false;
}
}