Completed
Branch master (5acd24)
by John
02:19
created
src/HTTPServer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         }
91 91
 
92 92
         $body = $response->getBody();
93
-        while(!$body->eof()) {
93
+        while (!$body->eof()) {
94 94
             echo $body->read(1024);
95 95
         }
96 96
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * Class HTTPServer
27 27
  * @package LunixREST
28 28
  */
29
-class HTTPServer
30
-{
29
+class HTTPServer {
31 30
     use LoggerAwareTrait;
32 31
 
33 32
     /**
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
      * @param RequestFactory $requestFactory
46 45
      * @param LoggerInterface $logger
47 46
      */
48
-    public function __construct(Server $server, RequestFactory $requestFactory, LoggerInterface $logger)
49
-    {
47
+    public function __construct(Server $server, RequestFactory $requestFactory, LoggerInterface $logger) {
50 48
         $this->server = $server;
51 49
         $this->requestFactory = $requestFactory;
52 50
         $this->logger = $logger;
@@ -82,8 +80,7 @@  discard block
 block discarded – undo
82 80
      * @param ResponseInterface $response
83 81
      * @return ResponseInterface
84 82
      */
85
-    protected function handleAPIRequest(APIRequest $APIRequest, ResponseInterface $response)
86
-    {
83
+    protected function handleAPIRequest(APIRequest $APIRequest, ResponseInterface $response) {
87 84
         try {
88 85
             $APIResponse = $this->server->handleRequest($APIRequest);
89 86
 
@@ -120,8 +117,7 @@  discard block
 block discarded – undo
120 117
      * Dumps a PSR-7 ResponseInterface to the SAPI.
121 118
      * @param ResponseInterface $response
122 119
      */
123
-    public static function dumpResponse(ResponseInterface $response)
124
-    {
120
+    public static function dumpResponse(ResponseInterface $response) {
125 121
         $statusLine = sprintf(
126 122
             "HTTP/%s %d %s",
127 123
             $response->getProtocolVersion(),
Please login to merge, or discard this patch.
Server/ResponseFactory/Exceptions/UnableToCreateAPIResponseException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
  * Class NotAcceptableResponseTypeException
9 9
  * @package LunixREST\Server\ResponseFactory\Exceptions
10 10
  */
11
-class UnableToCreateAPIResponseException extends UnableToHandleRequestException
12
-{
11
+class UnableToCreateAPIResponseException extends UnableToHandleRequestException {
13 12
 
14 13
 }
Please login to merge, or discard this patch.
Server/ResponseFactory/Exceptions/NotAcceptableResponseTypeException.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 NotAcceptableResponseTypeException
7 7
  * @package LunixREST\Server\ResponseFactory\Exceptions
8 8
  */
9
-class NotAcceptableResponseTypeException extends UnableToCreateAPIResponseException
10
-{
9
+class NotAcceptableResponseTypeException extends UnableToCreateAPIResponseException {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
ResponseFactory/Exceptions/UnableToSerializeResponseDataException.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 NotAcceptableResponseTypeException
7 7
  * @package LunixREST\Server\ResponseFactory\Exceptions
8 8
  */
9
-class UnableToSerializeResponseDataException extends UnableToCreateAPIResponseException
10
-{
9
+class UnableToSerializeResponseDataException extends UnableToCreateAPIResponseException {
11 10
 
12 11
 }
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 EndpointExecutionException
10
-{
9
+class InvalidRequestException extends EndpointExecutionException {
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 EndpointExecutionException
10
-{
9
+class UnsupportedMethodException extends EndpointExecutionException {
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 EndpointExecutionException
10
-{
9
+class ElementNotFoundException extends EndpointExecutionException {
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 EndpointExecutionException
10
-{
9
+class ElementConflictException extends EndpointExecutionException {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Router/Endpoint/Exceptions/EndpointExecutionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
  * Class EndpointExecutionException
9 9
  * @package LunixREST\Server\Router\Endpoint\Exceptions
10 10
  */
11
-class EndpointExecutionException extends UnableToRouteRequestException
12
-{
11
+class EndpointExecutionException extends UnableToRouteRequestException {
13 12
 
14 13
 }
Please login to merge, or discard this patch.