Completed
Push — master ( 2713f3...df1fa1 )
by John
01:46
created
src/Endpoint/NamespaceEndpointFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.