short array syntax

This commit is contained in:
Alexander Mohorev
2014-03-03 20:21:55 +03:00
parent 90c7bf288d
commit 6e7edfdf5b
11 changed files with 77 additions and 77 deletions

View File

@@ -508,11 +508,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;
@@ -542,7 +542,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));