Skip to content

Commit

Permalink
[TASK] Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
s2b committed Sep 30, 2020
1 parent 492f1fe commit fc56528
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Classes/Service/ComponentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ protected static function buildPattern(array $masks): ?string
$prefix = '';
if ($mask === '') {
continue;

} elseif ($mask === '*') {
return null;

} elseif ($mask[0] === '/') { // absolute fixing
$mask = ltrim($mask, '/');
$prefix = '(?<=^/)';
}
$pattern[] = $prefix . strtr(preg_quote($mask, '#'),
['\*\*' => '.*', '\*' => '[^/]*', '\?' => '[^/]', '\[\!' => '[^', '\[' => '[', '\]' => ']', '\-' => '-']);
$pattern[] = $prefix . strtr(
preg_quote($mask, '#'),
['\*\*' => '.*', '\*' => '[^/]*', '\?' => '[^/]', '\[\!' => '[^', '\[' => '[', '\]' => ']', '\-' => '-']
);
}
return $pattern ? '#/(' . implode('|', $pattern) . ')$#Di' : null;
}
Expand Down

0 comments on commit fc56528

Please sign in to comment.