Completed
Pull Request — master (#18)
by John
02:39
created
src/Endpoint/DoctrineNamespaceEndpointFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      * @throws UnknownEndpointException
21 21
      */
22 22
     public function getEndpoint(string $name, string $version): Endpoint {
23
-        $className = $this->buildVersionedEndpointNamespace($version) . $name;
23
+        $className = $this->buildVersionedEndpointNamespace($version).$name;
24 24
         return new $className($this->entityManager);
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,12 +10,10 @@
 block discarded – undo
10 10
  * Class DoctrineNamespaceEndpointFactory
11 11
  * @package LunixREST\Endpoint
12 12
  */
13
-class DoctrineNamespaceEndpointFactory extends NamespaceEndpointFactory
14
-{
13
+class DoctrineNamespaceEndpointFactory extends NamespaceEndpointFactory {
15 14
     protected $entityManager;
16 15
 
17
-    public function __construct(string $endpointNamespace, EntityManager $em)
18
-    {
16
+    public function __construct(string $endpointNamespace, EntityManager $em) {
19 17
         parent::__construct($endpointNamespace);
20 18
         $this->entityManager = $em;
21 19
     }
Please login to merge, or discard this patch.
src/Endpoint/NamespaceEndpointFactory.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function getEndpoint(string $name, string $version): Endpoint
27 27
     {
28
-        $className = $this->buildVersionedEndpointNamespace($version) . $name;
28
+        $className = $this->buildVersionedEndpointNamespace($version).$name;
29 29
         if (!class_exists($className)) {
30 30
             throw new UnknownEndpointException("Could not find $className");
31 31
         }
@@ -54,6 +54,6 @@  discard block
 block discarded – undo
54 54
 
55 55
     protected function buildVersionedEndpointNamespace(string $version): string
56 56
     {
57
-        return $this->endpointNamespace . '\v' . str_replace('.', '_', $version) . '\\';
57
+        return $this->endpointNamespace.'\v'.str_replace('.', '_', $version).'\\';
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use LunixREST\Endpoint\Exceptions\UnknownEndpointException;
5 5
 
6
-class NamespaceEndpointFactory implements EndpointFactory
7
-{
6
+class NamespaceEndpointFactory implements EndpointFactory {
8 7
 
9 8
     protected $endpointNamespace;
10 9
 
@@ -12,8 +11,7 @@  discard block
 block discarded – undo
12 11
      * NamespaceEndpointFactory constructor.
13 12
      * @param string $endpointNamespace
14 13
      */
15
-    public function __construct(string $endpointNamespace)
16
-    {
14
+    public function __construct(string $endpointNamespace) {
17 15
         $this->endpointNamespace = $endpointNamespace;
18 16
     }
19 17
 
Please login to merge, or discard this patch.
src/Endpoint/EndpointFactory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use LunixREST\Endpoint\Exceptions\UnknownEndpointException;
5 5
 
6
-interface EndpointFactory
7
-{
6
+interface EndpointFactory {
8 7
     /**
9 8
      * @param string $name
10 9
      * @param string $version
Please login to merge, or discard this patch.
src/Endpoint/Exceptions/UnknownEndpointException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Endpoint\Exceptions;
3 3
 
4
-class UnknownEndpointException extends \Exception
5
-{
4
+class UnknownEndpointException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.
src/Endpoint/Exceptions/UnsupportedMethodException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Endpoint\Exceptions;
3 3
 
4
-class UnsupportedMethodException extends \Exception
5
-{
4
+class UnsupportedMethodException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.
src/Endpoint/DoctrineEndpoint.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,12 +8,10 @@
 block discarded – undo
8 8
  * Class DoctrineEndpoint
9 9
  * @package LunixREST\Endpoints
10 10
  */
11
-class DoctrineEndpoint extends DefaultEndpoint
12
-{
11
+class DoctrineEndpoint extends DefaultEndpoint {
13 12
     protected $entityManager;
14 13
 
15
-    public function __construct(EntityManager $em)
16
-    {
14
+    public function __construct(EntityManager $em) {
17 15
         $this->entityManager = $em;
18 16
     }
19 17
 }
Please login to merge, or discard this patch.
src/Endpoint/DefaultEndpoint.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
  * Class Endpoint
10 10
  * @package LunixREST\Endpoints
11 11
  */
12
-class DefaultEndpoint implements Endpoint
13
-{
12
+class DefaultEndpoint implements Endpoint {
14 13
     /**
15 14
      * @param Request $request
16 15
      * @return ResponseData
Please login to merge, or discard this patch.
src/Endpoint/Endpoint.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
  * Interface Endpoint
10 10
  * @package LunixREST\Endpoints
11 11
  */
12
-interface Endpoint
13
-{
12
+interface Endpoint {
14 13
     /**
15 14
      * @param Request $request
16 15
      * @return ResponseData
Please login to merge, or discard this patch.
src/Exceptions/InstanceNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Exceptions;
3 3
 
4
-class InstanceNotFoundException extends \Exception
5
-{
4
+class InstanceNotFoundException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.