Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions fixtures/set032-isolated-finder/expected-tree
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
build/set032-isolated-finder
├── actual-tree
├── file1.php
└── file2.php
└── dir
├── file1.php
└── file2.php

1 directory, 3 files
2 directories, 3 files
5 changes: 5 additions & 0 deletions src/Console/ConsoleScoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ private static function getFiles(Configuration $config, string $outputDir): arra

private static function getCommonDirectoryPath(Configuration $config): string
{
$configPath = $config->getPath();
$filesWithContent = $config->getFilesWithContents();
$excludedFilesWithContents = $config->getExcludedFilesWithContents();

Expand All @@ -293,6 +294,10 @@ private static function getCommonDirectoryPath(Configuration $config): string
),
];

if (null !== $configPath) {
$directoryPaths[] = $configPath;
}

$commonPath = Path::getLongestCommonBasePath(...array_unique($directoryPaths));
Assert::notNull($commonPath, 'Expected to find a common path.');

Expand Down
Loading