Completed
Branch version2 (a24b39)
by John
03:03
created
src/Server/Router/Endpoint/Endpoint.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
  * Interface Endpoint
15 15
  * @package LunixREST\Server\Router\Endpoint
16 16
  */
17
-interface Endpoint
18
-{
17
+interface Endpoint {
19 18
     /**
20 19
      * @param APIRequest $request
21 20
      * @return APIResponseData
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/DefaultEndpoint.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@
 block discarded – undo
13 13
  * Class Endpoint
14 14
  * @package LunixREST\Server\Router\Endpoint
15 15
  */
16
-class DefaultEndpoint implements Endpoint
17
-{
16
+class DefaultEndpoint implements Endpoint {
18 17
     /**
19 18
      * @param APIRequest $request
20 19
      * @return APIResponseData
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/Exceptions/InvalidRequestException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
  * Class InvalidRequestException
7 7
  * @package LunixREST\Server\Router\Endpoint\Exceptions
8 8
  */
9
-class InvalidRequestException extends \Exception
10
-{
9
+class InvalidRequestException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/Exceptions/ElementConflictException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
  * Class ElementConflictException
7 7
  * @package LunixREST\Server\Router\Endpoint\Exceptions
8 8
  */
9
-class ElementConflictException extends \Exception
10
-{
9
+class ElementConflictException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/Exceptions/ElementNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
  * Class ElementNotFoundException
7 7
  * @package LunixREST\Server\Router\Endpoint\Exceptions
8 8
  */
9
-class ElementNotFoundException extends \Exception
10
-{
9
+class ElementNotFoundException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/Exceptions/UnsupportedMethodException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
  * Class UnsupportedMethodException
7 7
  * @package LunixREST\Server\Router\Endpoint\Exceptions
8 8
  */
9
-class UnsupportedMethodException extends \Exception
10
-{
9
+class UnsupportedMethodException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/CachingEndpoint.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,8 +7,7 @@  discard block
 block discarded – undo
7 7
  * Class CachingEndpoint
8 8
  * @package LunixREST\Endpoint
9 9
  */
10
-abstract class CachingEndpoint extends LoggingEndpoint
11
-{
10
+abstract class CachingEndpoint extends LoggingEndpoint {
12 11
     /**
13 12
      * @var CacheItemPoolInterface
14 13
      */
@@ -17,8 +16,7 @@  discard block
 block discarded – undo
17 16
     /**
18 17
      * @param CacheItemPoolInterface $cacheItemPool
19 18
      */
20
-    public function setCachePool(CacheItemPoolInterface $cacheItemPool)
21
-    {
19
+    public function setCachePool(CacheItemPoolInterface $cacheItemPool) {
22 20
         $this->cachePool = $cacheItemPool;
23 21
     }
24 22
 }
Please login to merge, or discard this patch.
src/Server/Router/EndpointFactory/RegisteredEndpointFactory.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function register(string $name, string $version, Endpoint $endpoint)
24 24
     {
25
-        if(!isset($this->endpoints[$version])) {
25
+        if (!isset($this->endpoints[$version])) {
26 26
             $this->endpoints[$version] = [];
27 27
         }
28 28
         $this->endpoints[$version][strtolower($name)] = $endpoint;
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
     public function getEndpoint(string $name, string $version): Endpoint
38 38
     {
39 39
         $lowercaseName = strtolower($name);
40
-        if(!isset($this->endpoints[$version]) || !isset($this->endpoints[$version][$lowercaseName])) {
41
-            throw new UnknownEndpointException('Could not find endpoint: ' . $name . ' of version: ' . $version);
40
+        if (!isset($this->endpoints[$version]) || !isset($this->endpoints[$version][$lowercaseName])) {
41
+            throw new UnknownEndpointException('Could not find endpoint: '.$name.' of version: '.$version);
42 42
         }
43 43
 
44 44
         return $this->endpoints[$version][$lowercaseName];
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@  discard block
 block discarded – undo
10 10
  * Class RegisteredEndpointFactory
11 11
  * @package LunixREST\Server\Router\EndpointFactory
12 12
  */
13
-class RegisteredEndpointFactory implements EndpointFactory
14
-{
13
+class RegisteredEndpointFactory implements EndpointFactory {
15 14
     /**
16 15
      * @var Endpoint[][]
17 16
      */
@@ -22,8 +21,7 @@  discard block
 block discarded – undo
22 21
      * @param string $version
23 22
      * @param Endpoint $endpoint
24 23
      */
25
-    public function register(string $name, string $version, Endpoint $endpoint)
26
-    {
24
+    public function register(string $name, string $version, Endpoint $endpoint) {
27 25
         if(!isset($this->endpoints[$version])) {
28 26
             $this->endpoints[$version] = [];
29 27
         }
Please login to merge, or discard this patch.
src/Server/Router/EndpointFactory/EndpointFactory.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 EndpointFactory
10 10
  * @package LunixREST\Server\Router\Endpoint
11 11
  */
12
-interface EndpointFactory
13
-{
12
+interface EndpointFactory {
14 13
     /**
15 14
      * @param string $name
16 15
      * @param string $version
Please login to merge, or discard this patch.