Completed
Push — master ( 8d892a...1ee813 )
by John
02:08
created
src/Server/GenericRouter.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
  * Class GenericRouter
12 12
  * @package LunixREST\Server
13 13
  */
14
-class GenericRouter implements Router
15
-{
14
+class GenericRouter implements Router {
16 15
     /**
17 16
      * @var EndpointFactory
18 17
      */
@@ -22,8 +21,7 @@  discard block
 block discarded – undo
22 21
      * DefaultRouter constructor.
23 22
      * @param EndpointFactory $endpointFactory
24 23
      */
25
-    public function __construct(EndpointFactory $endpointFactory)
26
-    {
24
+    public function __construct(EndpointFactory $endpointFactory) {
27 25
         $this->endpointFactory = $endpointFactory;
28 26
     }
29 27
 
Please login to merge, or discard this patch.
src/Server/Router.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@
 block discarded – undo
11 11
  * Interface Router
12 12
  * @package LunixREST\Server
13 13
  */
14
-interface Router
15
-{
14
+interface Router {
16 15
     /**
17 16
      * @param APIRequest $request
18 17
      * @return APIResponseData
Please login to merge, or discard this patch.
src/Server/GenericServer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,8 +13,7 @@  discard block
 block discarded – undo
13 13
 use LunixREST\Server\Exceptions\ThrottleLimitExceededException;
14 14
 use LunixREST\Throttle\Throttle;
15 15
 
16
-class GenericServer implements Server
17
-{
16
+class GenericServer implements Server {
18 17
     /**
19 18
      * @var AccessControl
20 19
      */
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
      * @param APIRequest $request
86 85
      * @throws InvalidAPIKeyException
87 86
      */
88
-    protected function validateKey(APIRequest $request)
89
-    {
87
+    protected function validateKey(APIRequest $request) {
90 88
         if (!$this->accessControl->validateKey($request->getApiKey())) {
91 89
             throw new InvalidAPIKeyException('Invalid API key');
92 90
         }
@@ -97,8 +95,7 @@  discard block
 block discarded – undo
97 95
      * @throws NotAcceptableResponseTypeException
98 96
      */
99 97
     //TODO: Handle wildcards in request MIME types (*/*)
100
-    protected function validateAcceptableMIMETypes(APIRequest $request)
101
-    {
98
+    protected function validateAcceptableMIMETypes(APIRequest $request) {
102 99
         $formats = $this->responseFactory->getSupportedMIMETypes();
103 100
         if (empty($formats) || (
104 101
                 !empty($request->getAcceptableMIMETypes()) && empty(array_intersect($request->getAcceptableMIMETypes(),
Please login to merge, or discard this patch.
src/Server/Exceptions/AccessDeniedException.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\Server\Exceptions;
3 3
 
4
-class AccessDeniedException extends \Exception
5
-{
4
+class AccessDeniedException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.
src/Server/Exceptions/InvalidAPIKeyException.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\Server\Exceptions;
3 3
 
4
-class InvalidAPIKeyException extends \Exception
5
-{
4
+class InvalidAPIKeyException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.
src/Server/Exceptions/ThrottleLimitExceededException.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\Server\Exceptions;
3 3
 
4
-class ThrottleLimitExceededException extends \Exception
5
-{
4
+class ThrottleLimitExceededException extends \Exception {
6 5
 
7 6
 }
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 APIRequest $request
16 15
      * @return APIResponseData
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 APIRequest $request
16 15
      * @return APIResponseData
Please login to merge, or discard this patch.
src/APIResponse/APIResponse.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 APIResponse
8 8
  * @package LunixREST\APIResponse
9 9
  */
10
-class APIResponse
11
-{
10
+class APIResponse {
12 11
     /**
13 12
      * @var string
14 13
      */
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
      */
19 18
     protected $stream;
20 19
 
21
-    public function __construct(string $MIMEType, StreamInterface $stream)
22
-    {
20
+    public function __construct(string $MIMEType, StreamInterface $stream) {
23 21
         $this->MIMEType = $MIMEType;
24 22
         $this->stream = $stream;
25 23
     }
Please login to merge, or discard this patch.