Completed
Branch version2 (a24b39)
by John
03:03
created
src/Server/Server.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
  * Interface Server
16 16
  * @package LunixREST\Server
17 17
  */
18
-interface Server
19
-{
18
+interface Server {
20 19
     /**
21 20
      * @param APIRequest $request
22 21
      * @return APIResponse
Please login to merge, or discard this patch.
src/Configuration/INIConfiguration.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $this->config = parse_ini_file($filename, true);
25 25
 
26 26
         if ($this->config === false) {
27
-            throw new INIParseException('Could not parse: ' . $filename, true);
27
+            throw new INIParseException('Could not parse: '.$filename, true);
28 28
         }
29 29
     }
30 30
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
  * Class INIConfiguration
9 9
  * @package LunixREST\Configuration
10 10
  */
11
-class INIConfiguration implements Configuration
12
-{
11
+class INIConfiguration implements Configuration {
13 12
     /**
14 13
      * @var
15 14
      */
@@ -19,8 +18,7 @@  discard block
 block discarded – undo
19 18
      * @param string $filename
20 19
      * @throws INIParseException
21 20
      */
22
-    public function __construct($filename)
23
-    {
21
+    public function __construct($filename) {
24 22
         $this->config = parse_ini_file($filename, true);
25 23
 
26 24
         if ($this->config === false) {
@@ -33,8 +31,7 @@  discard block
 block discarded – undo
33 31
      * @param $namespace
34 32
      * @return mixed
35 33
      */
36
-    public function get($key, $namespace)
37
-    {
34
+    public function get($key, $namespace) {
38 35
         return $this->config[$namespace][$key] ?? null;
39 36
     }
40 37
 
Please login to merge, or discard this patch.
src/Configuration/Configuration.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@
 block discarded – undo
5 5
  * Interface Configuration
6 6
  * @package LunixREST\Configuration
7 7
  */
8
-interface Configuration
9
-{
8
+interface Configuration {
10 9
     /**
11 10
      * @param $key
12 11
      * @param null|string $namespace
Please login to merge, or discard this patch.
src/Configuration/Exceptions/INIParseException.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 INIParseException
7 7
  * @package LunixREST\Configuration\Exceptions
8 8
  */
9
-class INIParseException extends \Exception
10
-{
9
+class INIParseException extends \Exception {
11 10
 
12 11
 }
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
@@ -6,7 +6,6 @@
 block discarded – undo
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
 }
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
@@ -6,7 +6,6 @@
 block discarded – undo
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
 }
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
@@ -6,7 +6,6 @@
 block discarded – undo
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
 }
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
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
  * Class GenericServer
22 22
  * @package LunixREST\Server
23 23
  */
24
-class GenericServer implements Server
25
-{
24
+class GenericServer implements Server {
26 25
     /**
27 26
      * @var AccessControl
28 27
      */
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
      * @param APIRequest $request
97 96
      * @throws InvalidAPIKeyException
98 97
      */
99
-    protected function validateKey(APIRequest $request)
100
-    {
98
+    protected function validateKey(APIRequest $request) {
101 99
         if (!$this->accessControl->validateKey($request->getApiKey())) {
102 100
             throw new InvalidAPIKeyException('Invalid API key');
103 101
         }
@@ -107,8 +105,7 @@  discard block
 block discarded – undo
107 105
      * @param APIRequest $request
108 106
      * @throws NotAcceptableResponseTypeException
109 107
      */
110
-    protected function validateAcceptableMIMETypes(APIRequest $request)
111
-    {
108
+    protected function validateAcceptableMIMETypes(APIRequest $request) {
112 109
         $supportedFormats = $this->responseFactory->getSupportedMIMETypes();
113 110
         $requestedFormats = $request->getAcceptableMIMETypes();
114 111
 
Please login to merge, or discard this patch.
src/Server/APIResponse/APIResponse.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
  * Class APIResponse
9 9
  * @package LunixREST\Server\APIResponse
10 10
  */
11
-class APIResponse
12
-{
11
+class APIResponse {
13 12
     /**
14 13
      * @var string
15 14
      */
@@ -19,8 +18,7 @@  discard block
 block discarded – undo
19 18
      */
20 19
     protected $stream;
21 20
 
22
-    public function __construct(string $MIMEType, StreamInterface $stream)
23
-    {
21
+    public function __construct(string $MIMEType, StreamInterface $stream) {
24 22
         $this->MIMEType = $MIMEType;
25 23
         $this->stream = $stream;
26 24
     }
Please login to merge, or discard this patch.