Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 2db4774

Browse files
author
Andrey Helldar
committed
The passed values are moved to a attribute
1 parent e7585d1 commit 2db4774

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Services/Finder.php

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
final class Finder
88
{
9+
protected $exclude_dirs = ['vendor', 'node_modules', '.idea', '.git', '.github', 'tests'];
10+
11+
protected $names = ['*.php', '*.json', '*.yml', '*.yaml', '*.twig'];
12+
13+
protected $contains = ['env(', 'getenv('];
14+
915
protected $instance;
1016

1117
protected $files = [];
@@ -45,9 +51,9 @@ protected function search($path): void
4551
protected function find($path): SymfonyFinder
4652
{
4753
return $this->instance->in($path)->files()
48-
->exclude(['vendor', 'node_modules', '.idea', '.git', '.github', 'tests'])
49-
->name(['*.php', '*.json', '*.yml', '*.yaml', '*.twig'])
50-
->contains(['env(', 'getenv(']);
54+
->exclude($this->exclude_dirs)
55+
->name($this->names)
56+
->contains($this->contains);
5157
}
5258

5359
protected function push(string $path): void

0 commit comments

Comments
 (0)