We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 019067d commit f17505eCopy full SHA for f17505e
TwigCS/Config/Config.php
@@ -48,15 +48,21 @@ public function findFiles()
48
{
49
$paths = $this->get('paths');
50
$exclude = $this->get('exclude');
51
+ $workingDir = $this->get('workingDirectory');
52
53
// Build the finder.
54
$files = Finder::create()
- ->in($this->get('workingDirectory'))
55
+ ->in($workingDir)
56
->name($this->config['pattern'])
57
->files();
58
59
// Include all matching paths.
60
foreach ($paths as $path) {
61
+ // Trim absolute path
62
+ if (substr($path, 0, strlen($workingDir)) == $workingDir) {
63
+ $path = ltrim(substr($path, strlen($workingDir)), '/');
64
+ }
65
+
66
$files->path($path);
67
}
68
0 commit comments