@@ -30,26 +30,10 @@ final class SymbolsConfiguration
3030 private SymbolRegistry $ exposedFunctions ;
3131 private SymbolRegistry $ exposedConstants ;
3232
33- /**
34- * @var string[]
35- */
36- private array $ excludedClassNames ;
37-
38- /**
39- * @var string[]
40- */
41- private array $ excludedFunctionNames ;
42-
43- /**
44- * @var string[]
45- */
46- private array $ excludedConstantNames ;
47-
48- /**
49- * @param string[] $excludedClassNames
50- * @param string[] $excludedFunctionNames
51- * @param string[] $excludedConstantNames
52- */
33+ private SymbolRegistry $ excludedClasses ;
34+ private SymbolRegistry $ excludedFunctions ;
35+ private SymbolRegistry $ excludedConstants ;
36+
5337 public static function create (
5438 bool $ exposeGlobalConstants = false ,
5539 bool $ exposeGlobalClasses = false ,
@@ -58,12 +42,12 @@ public static function create(
5842 // Does not contain the list of excluded symbols which go to the
5943 // Reflector (which has no notion of namespaces)
6044 ?NamespaceRegistry $ exposedNamespaces = null ,
61- SymbolRegistry $ exposedClasses = null ,
62- SymbolRegistry $ exposedFunctions = null ,
63- SymbolRegistry $ exposedConstants = null ,
64- array $ excludedClassNames = [] ,
65- array $ excludedFunctionNames = [] ,
66- array $ excludedConstantNames = []
45+ ? SymbolRegistry $ exposedClasses = null ,
46+ ? SymbolRegistry $ exposedFunctions = null ,
47+ ? SymbolRegistry $ exposedConstants = null ,
48+ ? SymbolRegistry $ excludedClasses = null ,
49+ ? SymbolRegistry $ excludedFunctions = null ,
50+ ? SymbolRegistry $ excludedConstants = null
6751 ): self {
6852 return new self (
6953 $ exposeGlobalConstants ,
@@ -74,17 +58,12 @@ public static function create(
7458 $ exposedClasses ?? SymbolRegistry::create (),
7559 $ exposedFunctions ?? SymbolRegistry::create (),
7660 $ exposedConstants ?? SymbolRegistry::createForConstants (),
77- $ excludedClassNames ,
78- $ excludedFunctionNames ,
79- $ excludedConstantNames ,
61+ $ excludedClasses ?? SymbolRegistry:: create () ,
62+ $ excludedFunctions ?? SymbolRegistry:: create () ,
63+ $ excludedConstants ?? SymbolRegistry:: createForConstants () ,
8064 );
8165 }
8266
83- /**
84- * @param string[] $excludedClassNames
85- * @param string[] $excludedFunctionNames
86- * @param string[] $excludedConstantNames
87- */
8867 private function __construct (
8968 bool $ exposeGlobalConstants ,
9069 bool $ exposeGlobalClasses ,
@@ -94,9 +73,9 @@ private function __construct(
9473 SymbolRegistry $ exposedClasses ,
9574 SymbolRegistry $ exposedFunctions ,
9675 SymbolRegistry $ exposedConstants ,
97- array $ excludedClassNames ,
98- array $ excludedFunctionNames ,
99- array $ excludedConstantNames
76+ SymbolRegistry $ excludedClasses ,
77+ SymbolRegistry $ excludedFunctions ,
78+ SymbolRegistry $ excludedConstants
10079 ) {
10180 $ this ->exposeGlobalConstants = $ exposeGlobalConstants ;
10281 $ this ->exposeGlobalClasses = $ exposeGlobalClasses ;
@@ -106,9 +85,9 @@ private function __construct(
10685 $ this ->exposedClasses = $ exposedClasses ;
10786 $ this ->exposedFunctions = $ exposedFunctions ;
10887 $ this ->exposedConstants = $ exposedConstants ;
109- $ this ->excludedClassNames = $ excludedClassNames ;
110- $ this ->excludedFunctionNames = $ excludedFunctionNames ;
111- $ this ->excludedConstantNames = $ excludedConstantNames ;
88+ $ this ->excludedClasses = $ excludedClasses ;
89+ $ this ->excludedFunctions = $ excludedFunctions ;
90+ $ this ->excludedConstants = $ excludedConstants ;
11291 }
11392
11493 public function shouldExposeGlobalConstants (): bool
@@ -151,27 +130,18 @@ public function getExposedConstants(): SymbolRegistry
151130 return $ this ->exposedConstants ;
152131 }
153132
154- /**
155- * @return string[]
156- */
157- public function getExcludedClassNames (): array
133+ public function getExcludedClasses (): SymbolRegistry
158134 {
159- return $ this ->excludedClassNames ;
135+ return $ this ->excludedClasses ;
160136 }
161137
162- /**
163- * @return string[]
164- */
165- public function getExcludedFunctionNames (): array
138+ public function getExcludedFunctions (): SymbolRegistry
166139 {
167- return $ this ->excludedFunctionNames ;
140+ return $ this ->excludedFunctions ;
168141 }
169142
170- /**
171- * @return string[]
172- */
173- public function getExcludedConstantNames (): array
143+ public function getExcludedConstants (): SymbolRegistry
174144 {
175- return $ this ->excludedConstantNames ;
145+ return $ this ->excludedConstants ;
176146 }
177147}
0 commit comments