@@ -9,7 +9,6 @@ |
||
9 | 9 | * Class LoggingEndpoint |
10 | 10 | * @package LunixREST\Endpoint |
11 | 11 | */ |
12 | -abstract class LoggingEndpoint implements Endpoint |
|
13 | -{ |
|
12 | +abstract class LoggingEndpoint implements Endpoint { |
|
14 | 13 | use LoggerAwareTrait; |
15 | 14 | } |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * Interface EndpointFactory |
9 | 9 | * @package LunixREST\Endpoint |
10 | 10 | */ |
11 | -interface EndpointFactory |
|
12 | -{ |
|
11 | +interface EndpointFactory { |
|
13 | 12 | /** |
14 | 13 | * @param string $name |
15 | 14 | * @param string $version |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class UnsupportedMethodException |
7 | 7 | * @package LunixREST\Endpoint\Exceptions |
8 | 8 | */ |
9 | -class UnsupportedMethodException extends \Exception |
|
10 | -{ |
|
9 | +class UnsupportedMethodException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class UnknownEndpointException |
7 | 7 | * @package LunixREST\Endpoint\Exceptions |
8 | 8 | */ |
9 | -class UnknownEndpointException extends \Exception |
|
10 | -{ |
|
9 | +class UnknownEndpointException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class MethodNotFoundException |
7 | 7 | * @package LunixREST\Server\Exceptions |
8 | 8 | */ |
9 | -class MethodNotFoundException extends \Exception |
|
10 | -{ |
|
9 | +class MethodNotFoundException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class InvalidAPIKeyException |
7 | 7 | * @package LunixREST\Server\Exceptions |
8 | 8 | */ |
9 | -class InvalidAPIKeyException extends \Exception |
|
10 | -{ |
|
9 | +class InvalidAPIKeyException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class ThrottleLimitExceededException |
7 | 7 | * @package LunixREST\Server\Exceptions |
8 | 8 | */ |
9 | -class ThrottleLimitExceededException extends \Exception |
|
10 | -{ |
|
9 | +class ThrottleLimitExceededException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -6,7 +6,6 @@ |
||
6 | 6 | * Class AccessDeniedException |
7 | 7 | * @package LunixREST\Server\Exceptions |
8 | 8 | */ |
9 | -class AccessDeniedException extends \Exception |
|
10 | -{ |
|
9 | +class AccessDeniedException extends \Exception { |
|
11 | 10 | |
12 | 11 | } |
@@ -18,8 +18,7 @@ discard block |
||
18 | 18 | * Class GenericServer |
19 | 19 | * @package LunixREST\Server |
20 | 20 | */ |
21 | -class GenericServer implements Server |
|
22 | -{ |
|
21 | +class GenericServer implements Server { |
|
23 | 22 | /** |
24 | 23 | * @var AccessControl |
25 | 24 | */ |
@@ -90,8 +89,7 @@ discard block |
||
90 | 89 | * @param APIRequest $request |
91 | 90 | * @throws InvalidAPIKeyException |
92 | 91 | */ |
93 | - protected function validateKey(APIRequest $request) |
|
94 | - { |
|
92 | + protected function validateKey(APIRequest $request) { |
|
95 | 93 | if (!$this->accessControl->validateKey($request->getApiKey())) { |
96 | 94 | throw new InvalidAPIKeyException('Invalid API key'); |
97 | 95 | } |
@@ -101,8 +99,7 @@ discard block |
||
101 | 99 | * @param APIRequest $request |
102 | 100 | * @throws NotAcceptableResponseTypeException |
103 | 101 | */ |
104 | - protected function validateAcceptableMIMETypes(APIRequest $request) |
|
105 | - { |
|
102 | + protected function validateAcceptableMIMETypes(APIRequest $request) { |
|
106 | 103 | //TODO: Handle wildcards in request MIME types (*/*) |
107 | 104 | $formats = $this->responseFactory->getSupportedMIMETypes(); |
108 | 105 | if (empty($formats) || ( |