11
11
12
12
class FunctionMapGenerator
13
13
{
14
- public function createFunctionMap (string $ filename ): void {
14
+ public function createFunctionMap (string $ filename ): void
15
+ {
15
16
$ this ->writeFunctionMap ($ filename , $ this ->getFunctionMap ());
16
17
}
17
18
18
- public function getFunctionMap (): array {
19
+ private function getFunctionMap (): array
20
+ {
19
21
$ classes = array_filter (get_declared_classes (), $ this ->filterItems (...));
20
22
$ interfaces = array_filter (get_declared_interfaces (), $ this ->filterItems (...));
21
23
$ functions = array_filter (get_defined_functions ()['internal ' ], $ this ->filterItems (...));
@@ -107,7 +109,8 @@ private function filterItems(string $name): bool {
107
109
return false ;
108
110
}
109
111
110
- private function getFunctionMapEntry (ReflectionFunctionAbstract $ function ): array {
112
+ private function getFunctionMapEntry (ReflectionFunctionAbstract $ function ): array
113
+ {
111
114
$ returnType = match (true ) {
112
115
$ function ->hasReturnType () => (string ) $ function ->getReturnType (),
113
116
$ function ->hasTentativeReturnType () => (string ) $ function ->getTentativeReturnType (),
@@ -128,7 +131,8 @@ private function getFunctionMapEntry(ReflectionFunctionAbstract $function): arra
128
131
return $ functionMapEntry ;
129
132
}
130
133
131
- private function removeDoubleBackslash (string $ string ): string {
134
+ private function removeDoubleBackslash (string $ string ): string
135
+ {
132
136
return str_replace ('\\\\' , '\\' , $ string );
133
137
}
134
138
}
0 commit comments