Skip to content

Commit 10604b3

Browse files
SilverFirevova07
authored andcommitted
Removed FileHelper::normalizeOptions() to use parent implementaion (#95)
1 parent 6b1d757 commit 10604b3

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/helpers/FileHelper.php

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function findFiles($dir, $options = [], $type = GetAction::TYPE_IM
3737
if (!isset($options['basePath'])) {
3838
$options['basePath'] = realpath($dir);
3939
// this should also be done only once
40-
$options = self::normalizeOptions($options);
40+
$options = static::normalizeOptions($options);
4141
}
4242
$list = [];
4343
$handle = opendir($dir);
@@ -157,31 +157,4 @@ private static function firstWildcardInPattern($pattern)
157157

158158
return array_reduce($wildcards, $wildcardSearch, false);
159159
}
160-
161-
/**
162-
* @inheritdoc
163-
*
164-
* @codeCoverageIgnore
165-
*/
166-
private static function normalizeOptions(array $options)
167-
{
168-
if (!array_key_exists('caseSensitive', $options)) {
169-
$options['caseSensitive'] = true;
170-
}
171-
if (isset($options['except'])) {
172-
foreach ($options['except'] as $key => $value) {
173-
if (is_string($value)) {
174-
$options['except'][$key] = self::parseExcludePattern($value, $options['caseSensitive']);
175-
}
176-
}
177-
}
178-
if (isset($options['only'])) {
179-
foreach ($options['only'] as $key => $value) {
180-
if (is_string($value)) {
181-
$options['only'][$key] = self::parseExcludePattern($value, $options['caseSensitive']);
182-
}
183-
}
184-
}
185-
return $options;
186-
}
187160
}

0 commit comments

Comments
 (0)