mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-12 10:18:27 +01:00
short array syntax
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user