@@ -82,9 +82,9 @@ public function create(?string $path = null, array $paths = []): Configuration
8282
8383 $ prefix = self ::retrievePrefix ($ config );
8484
85- $ whitelistedFiles = null === $ path
85+ $ excludedFiles = null === $ path
8686 ? []
87- : $ this ->retrieveWhitelistedFiles (
87+ : $ this ->retrieveExcludedFiles (
8888 dirname ($ path ),
8989 $ config ,
9090 );
@@ -104,7 +104,7 @@ public function create(?string $path = null, array $paths = []): Configuration
104104 $ path ,
105105 $ prefix ,
106106 $ filesWithContents ,
107- self ::retrieveFilesWithContents ($ whitelistedFiles ),
107+ self ::retrieveFilesWithContents ($ excludedFiles ),
108108 new PatcherChain ($ patchers ),
109109 $ symbolsConfiguration ,
110110 );
@@ -130,7 +130,7 @@ public function createWithPaths(Configuration $config, array $paths): Configurat
130130 $ config ->getFilesWithContents (),
131131 $ filesWithContents ,
132132 ),
133- $ config ->getWhitelistedFilesWithContents (),
133+ $ config ->getExcludedFilesWithContents (),
134134 $ config ->getPatcher (),
135135 $ config ->getSymbolsConfiguration (),
136136 );
@@ -144,7 +144,7 @@ public function createWithPrefix(Configuration $config, string $prefix): Configu
144144 $ config ->getPath (),
145145 $ prefix ,
146146 $ config ->getFilesWithContents (),
147- $ config ->getWhitelistedFilesWithContents (),
147+ $ config ->getExcludedFilesWithContents (),
148148 $ config ->getPatcher (),
149149 $ config ->getSymbolsConfiguration (),
150150 );
@@ -269,28 +269,28 @@ private static function retrievePatchers(array $config): array
269269 /**
270270 * @return string[] Absolute paths
271271 */
272- private function retrieveWhitelistedFiles (string $ dirPath , array $ config ): array
272+ private function retrieveExcludedFiles (string $ dirPath , array $ config ): array
273273 {
274- if (!array_key_exists (ConfigurationKeys::WHITELISTED_FILES_KEYWORD , $ config )) {
274+ if (!array_key_exists (ConfigurationKeys::EXCLUDED_FILES_KEYWORD , $ config )) {
275275 return [];
276276 }
277277
278- $ whitelistedFiles = $ config [ConfigurationKeys::WHITELISTED_FILES_KEYWORD ];
278+ $ excludedFiles = $ config [ConfigurationKeys::EXCLUDED_FILES_KEYWORD ];
279279
280- if (!is_array ($ whitelistedFiles )) {
280+ if (!is_array ($ excludedFiles )) {
281281 throw new InvalidArgumentException (
282282 sprintf (
283- 'Expected whitelisted files to be an array of strings, found "%s" instead. ' ,
284- gettype ($ whitelistedFiles ),
283+ 'Expected excluded files to be an array of strings, found "%s" instead. ' ,
284+ gettype ($ excludedFiles ),
285285 ),
286286 );
287287 }
288288
289- foreach ($ whitelistedFiles as $ index => $ file ) {
289+ foreach ($ excludedFiles as $ index => $ file ) {
290290 if (!is_string ($ file )) {
291291 throw new InvalidArgumentException (
292292 sprintf (
293- 'Expected whitelisted files to be an array of string, the "%d" element is not. ' ,
293+ 'Expected excluded files to be an array of string, the "%d" element is not. ' ,
294294 $ index ,
295295 ),
296296 );
@@ -300,10 +300,10 @@ private function retrieveWhitelistedFiles(string $dirPath, array $config): array
300300 $ file = $ dirPath .DIRECTORY_SEPARATOR .$ file ;
301301 }
302302
303- $ whitelistedFiles [$ index ] = realpath ($ file );
303+ $ excludedFiles [$ index ] = realpath ($ file );
304304 }
305305
306- return array_filter ($ whitelistedFiles );
306+ return array_filter ($ excludedFiles );
307307 }
308308
309309 /**
0 commit comments