Commit d3171b6c by AlexGx

fix code style php5.4 syntax

parent 045eb9f7
......@@ -509,11 +509,11 @@ class BaseFileHelper
if (!is_string($pattern)) {
throw new InvalidParamException('Exclude/include pattern must be a string.');
}
$result = array(
$result = [
'pattern' => $pattern,
'flags' => 0,
'firstWildcard' => false,
);
];
if (!isset($pattern[0])) {
return $result;
}
......@@ -546,7 +546,7 @@ class BaseFileHelper
*/
private static function firstWildcardInPattern($pattern)
{
$wildcards = array('*','?','[','\\');
$wildcards = ['*', '?', '[', '\\'];
$wildcardSearch = function ($r, $c) use ($pattern) {
$p = strpos($pattern, $c);
return $r===false ? $p : ($p===false ? $r : min($r, $p));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment