From fc565281a36f3f35b0208f9369c545d543381dd3 Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Wed, 30 Sep 2020 19:43:32 +0200 Subject: [PATCH] [TASK] Fix linting issues --- src/Classes/Service/ComponentService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Classes/Service/ComponentService.php b/src/Classes/Service/ComponentService.php index a096f46..f5e8ef0 100644 --- a/src/Classes/Service/ComponentService.php +++ b/src/Classes/Service/ComponentService.php @@ -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; }