File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ public static function begin(
177
177
$ paths = array_map (static fn (string $ path ): string => $ currentWorkingDirectoryFileHelper ->normalizePath ($ currentWorkingDirectoryFileHelper ->absolutizePath ($ path )), $ paths );
178
178
179
179
$ analysedPathsFromConfig = [];
180
- $ containerFactory = new ContainerFactory ($ currentWorkingDirectory );
180
+ $ containerFactory = new ContainerFactory ($ currentWorkingDirectory, true );
181
181
$ projectConfig = null ;
182
182
if ($ projectConfigFile !== null ) {
183
183
if (!is_file ($ projectConfigFile )) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class ContainerFactory
49
49
private string $ configDirectory ;
50
50
51
51
/** @api */
52
- public function __construct (private string $ currentWorkingDirectory )
52
+ public function __construct (private string $ currentWorkingDirectory, private bool $ checkDuplicateFiles = false )
53
53
{
54
54
$ this ->fileHelper = new FileHelper ($ currentWorkingDirectory );
55
55
@@ -235,6 +235,10 @@ private function detectDuplicateIncludedFiles(
235
235
return $ normalized ;
236
236
}
237
237
238
+ if (!$ this ->checkDuplicateFiles ) {
239
+ return $ normalized ;
240
+ }
241
+
238
242
$ duplicateFiles = array_unique (array_diff_key ($ normalized , $ deduplicated ));
239
243
240
244
throw new DuplicateIncludedFilesException ($ duplicateFiles );
You can’t perform that action at this time.
0 commit comments