Skip to content

Commit

Permalink
Cleanup imports and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed Jun 11, 2024
1 parent 4c19eb8 commit 3f3901e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/ApplicationFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Laravel\VaporCli;

use Illuminate\Support\Str;
use Symfony\Component\Finder\Finder;

class ApplicationFiles
Expand Down
12 changes: 5 additions & 7 deletions src/VaporIgnore.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Laravel\VaporCli;

use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\File;
use Illuminate\Support\LazyCollection;
use Illuminate\Support\Str;
use SplFileObject;
Expand Down Expand Up @@ -44,15 +42,15 @@ protected static function parseLine($baseDir, $line): false|array|null
$line = trim($line);

return Arr::map(match ($line) {
'', '#' => [], # ignore empty lines and comments
'', '#' => [], // ignore empty lines and comments
default => glob("$baseDir/$line")
}, static function($line) use ($baseDir) {
}, static function ($line) use ($baseDir) {
return Str::of($line)
->after($baseDir)
->trim('/')
->replace('/', '\/')
->prepend('/^')
->append('/')
->pipe(function ($line) {
return '/^'.preg_quote($line, '/').'/';
})
->toString();
});
}
Expand Down

0 comments on commit 3f3901e

Please sign in to comment.