@@ -43,6 +43,7 @@ public function getConfigSchema(): Nette\Schema\Schema
4343 'extends ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
4444 'implements ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
4545 'exclude ' => Expect::structure ([
46+ 'files ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
4647 'classes ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
4748 'extends ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
4849 'implements ' => Expect::anyOf (Expect::listOf ('string ' ), Expect::string ()->castTo ('array ' ))->default ([]),
@@ -78,15 +79,16 @@ public function loadConfiguration()
7879
7980 public function findClasses (\stdClass $ config ): array
8081 {
82+ $ exclude = $ config ->exclude ;
8183 $ robot = new RobotLoader ;
8284 $ robot ->setTempDirectory ($ this ->tempDir );
8385 $ robot ->addDirectory ($ config ->in );
8486 $ robot ->acceptFiles = $ config ->files ?: ['*.php ' ];
87+ $ robot ->ignoreDirs = array_merge ($ robot ->ignoreDirs , $ exclude ->files );
8588 $ robot ->reportParseErrors (false );
8689 $ robot ->refresh ();
8790 $ classes = array_unique (array_keys ($ robot ->getIndexedClasses ()));
8891
89- $ exclude = $ config ->exclude ;
9092 $ acceptRE = self ::buildNameRegexp ($ config ->classes );
9193 $ rejectRE = self ::buildNameRegexp ($ exclude ->classes );
9294 $ acceptParent = array_merge ($ config ->extends , $ config ->implements );
0 commit comments