Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function make(\ReflectionClass $reflection, ?string $namespace = null): string |
||
9 | { |
||
10 | $hash = hash('sha256', $reflection->getName() . $reflection->getFileName()); |
||
|
|||
11 | |||
12 | $name = "{$reflection->getShortName()}_$hash"; |
||
13 | if ($namespace !== null) { |
||
14 | return "$namespace\\$name"; |
||
15 | } |
||
16 | |||
17 | return $name; |
||
18 | } |
||
19 | } |