Completed
Branch version2 (a24b39)
by John
03:03
created
src/JSONHTTPServer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,7 @@
 block discarded – undo
10 10
  * Class JSONHTTPServer
11 11
  * @package LunixREST
12 12
  */
13
-class JSONHTTPServer extends HTTPServer
14
-{
13
+class JSONHTTPServer extends HTTPServer {
15 14
     /**
16 15
      * @param ServerRequestInterface $serverRequest
17 16
      * @param ResponseInterface $response
Please login to merge, or discard this patch.
src/HTTPServer.php 1 patch
Braces   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * Class HTTPServer
26 26
  * @package LunixREST
27 27
  */
28
-class HTTPServer
29
-{
28
+class HTTPServer {
30 29
     use LoggerAwareTrait;
31 30
 
32 31
     /**
@@ -44,8 +43,7 @@  discard block
 block discarded – undo
44 43
      * @param RequestFactory $requestFactory
45 44
      * @param LoggerInterface $logger
46 45
      */
47
-    public function __construct(Server $server, RequestFactory $requestFactory, LoggerInterface $logger)
48
-    {
46
+    public function __construct(Server $server, RequestFactory $requestFactory, LoggerInterface $logger) {
49 47
         $this->server = $server;
50 48
         $this->requestFactory = $requestFactory;
51 49
         $this->logger = $logger;
@@ -81,8 +79,7 @@  discard block
 block discarded – undo
81 79
      * @param ResponseInterface $response
82 80
      * @return ResponseInterface
83 81
      */
84
-    protected function handleAPIRequest(APIRequest $APIRequest, ResponseInterface $response)
85
-    {
82
+    protected function handleAPIRequest(APIRequest $APIRequest, ResponseInterface $response) {
86 83
         try {
87 84
             $APIResponse = $this->server->handleRequest($APIRequest);
88 85
 
@@ -103,7 +100,7 @@  discard block
 block discarded – undo
103 100
         } catch (InvalidAPIKeyException | AccessDeniedException $e) {
104 101
             $this->logCaughtThrowableResultingInHTTPCode(403, $e, LogLevel::NOTICE);
105 102
             return $response->withStatus(403, "Access Denied");
106
-        }  catch (ElementConflictException $e) {
103
+        } catch (ElementConflictException $e) {
107 104
             $this->logCaughtThrowableResultingInHTTPCode(409, $e, LogLevel::NOTICE);
108 105
             return $response->withStatus(409, "Conflict");
109 106
         } catch (ThrottleLimitExceededException $e) {
Please login to merge, or discard this patch.