mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-08 08:17:24 +01:00
fix code style
This commit is contained in:
@@ -281,14 +281,14 @@ class BaseFileHelper
|
||||
$options['basePath'] = realpath($dir);
|
||||
// this should also be done only once
|
||||
if (isset($options['except'])) {
|
||||
foreach($options['except'] as $key=>$value) {
|
||||
foreach ($options['except'] as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$options['except'][$key] = static::parseExcludePattern($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($options['only'])) {
|
||||
foreach($options['only'] as $key=>$value) {
|
||||
foreach ($options['only'] as $key => $value) {
|
||||
if (is_string($value)) {
|
||||
$options['only'][$key] = static::parseExcludePattern($value);
|
||||
}
|
||||
@@ -398,7 +398,7 @@ class BaseFileHelper
|
||||
if ($pattern === $baseName) {
|
||||
return true;
|
||||
}
|
||||
} else if ($flags & self::PATTERN_ENDSWITH) {
|
||||
} elseif ($flags & self::PATTERN_ENDSWITH) {
|
||||
/* "*literal" matching against "fooliteral" */
|
||||
$n = StringHelper::byteLength($pattern);
|
||||
if (StringHelper::byteSubstr($pattern, 1, $n) === StringHelper::byteSubstr($baseName, -$n, $n)) {
|
||||
@@ -473,7 +473,7 @@ class BaseFileHelper
|
||||
*/
|
||||
private static function lastExcludeMatchingFromList($basePath, $path, $excludes)
|
||||
{
|
||||
foreach(array_reverse($excludes) as $exclude) {
|
||||
foreach (array_reverse($excludes) as $exclude) {
|
||||
if (is_string($exclude)) {
|
||||
$exclude = self::parseExcludePattern($exclude);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user