Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Timo Schinkel <[email protected]>
  • Loading branch information
martinssipenko and timoschinkel authored Jun 29, 2022
1 parent 1042e3e commit 588eaba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/PatternMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function isMatch(Pattern $pattern, string $filename): bool
'?' => '[^\/]',
'**' => '.*',
'/**' => '\/.*',
'**/' => '.*',
'**/' => '.*\/',
'/**/' => '\/([^\/]+\/)*',
];

Expand Down
1 change: 1 addition & 0 deletions tests/PatternMatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public function provideNoMatchFoundExceptionIsThrownForFilename(): array

// **
[new Pattern('**/foo', ['@owner']), 'foo.ext'],
[new Pattern('**/foo', ['@owner']), 'bar-foo/file.ext'],
[new Pattern('foo/**', ['@owner']), 'foo.ext'],
];
}
Expand Down

0 comments on commit 588eaba

Please sign in to comment.