@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | * @throws UnknownEndpointException |
23 | 23 | */ |
24 | 24 | public function getEndpoint(string $name, string $version): Endpoint { |
25 | - $className = $this->buildVersionedEndpointNamespace($version) . $name; |
|
26 | - if(!class_exists($className)){ |
|
25 | + $className = $this->buildVersionedEndpointNamespace($version).$name; |
|
26 | + if (!class_exists($className)) { |
|
27 | 27 | throw new UnknownEndpointException("Could not find $className"); |
28 | 28 | } |
29 | 29 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $classesInNamespace = []; |
40 | 40 | |
41 | 41 | $namespace = $this->buildVersionedEndpointNamespace($version); |
42 | - foreach(get_declared_classes() as $name) { |
|
42 | + foreach (get_declared_classes() as $name) { |
|
43 | 43 | if (strpos($name, $namespace) === 0) { |
44 | 44 | $classesInNamespace[] = $name; |
45 | 45 | } |
@@ -49,6 +49,6 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | protected function buildVersionedEndpointNamespace(string $version): string { |
52 | - return $this->endpointNamespace . '\v' . str_replace('.', '_', $version) . '\\'; |
|
52 | + return $this->endpointNamespace.'\v'.str_replace('.', '_', $version).'\\'; |
|
53 | 53 | } |
54 | 54 | } |