Completed
Push — master ( 178f73...c3bdfb )
by John
02:04
created
src/Endpoint/Exceptions/UnknownEndpointException.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 UnknownEndpointException
7 7
  * @package LunixREST\Endpoint\Exceptions
8 8
  */
9
-class UnknownEndpointException extends \Exception
10
-{
9
+class UnknownEndpointException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/Server/Exceptions/MethodNotFoundException.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 MethodNotFoundException
7 7
  * @package LunixREST\Server\Exceptions
8 8
  */
9
-class MethodNotFoundException extends \Exception
10
-{
9
+class MethodNotFoundException 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/APIRequest/URLParser/URLParser.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 URLParser
10 10
  * @package LunixREST\APIRequest\URLParser
11 11
  */
12
-interface URLParser
13
-{
12
+interface URLParser {
14 13
     /**
15 14
      * Parses API request data out of a url
16 15
      * @param UriInterface $uri
Please login to merge, or discard this patch.
src/APIRequest/URLParser/ParsedURL.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@  discard block
 block discarded – undo
6 6
  * Class ParsedURL
7 7
  * @package LunixREST\APIRequest\URLParser
8 8
  */
9
-class ParsedURL
10
-{
9
+class ParsedURL {
11 10
     /**
12 11
      * @var string
13 12
      */
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      * @param array $acceptableMIMETypes
43 42
      * @param null|string $queryString
44 43
      */
45
-    public function __construct(string $endpoint, ?string $element, ?string $version, ?string $apiKey, array $acceptableMIMETypes, ?string $queryString)
46
-    {
44
+    public function __construct(string $endpoint, ?string $element, ?string $version, ?string $apiKey, array $acceptableMIMETypes, ?string $queryString) {
47 45
         $this->endpoint = $endpoint;
48 46
         $this->element = $element;
49 47
         $this->version = $version;
@@ -63,24 +61,21 @@  discard block
 block discarded – undo
63 61
     /**
64 62
      * @return null|string
65 63
      */
66
-    public function getElement()
67
-    {
64
+    public function getElement() {
68 65
         return $this->element;
69 66
     }
70 67
 
71 68
     /**
72 69
      * @return null|string
73 70
      */
74
-    public function getVersion()
75
-    {
71
+    public function getVersion() {
76 72
         return $this->version;
77 73
     }
78 74
 
79 75
     /**
80 76
      * @return null|string
81 77
      */
82
-    public function getApiKey()
83
-    {
78
+    public function getApiKey() {
84 79
         return $this->apiKey;
85 80
     }
86 81
 
@@ -95,8 +90,7 @@  discard block
 block discarded – undo
95 90
     /**
96 91
      * @return null|string
97 92
      */
98
-    public function getQueryString()
99
-    {
93
+    public function getQueryString() {
100 94
         return $this->queryString;
101 95
     }
102 96
 }
Please login to merge, or discard this patch.
src/APIRequest/URLParser/Exceptions/InvalidRequestURLException.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 InvalidRequestURLException
7 7
  * @package LunixREST\APIRequest\URLParser\Exceptions
8 8
  */
9
-class InvalidRequestURLException extends \Exception
10
-{
9
+class InvalidRequestURLException extends \Exception {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
src/APIRequest/HeaderParser/DefaultHeaderParser.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@  discard block
 block discarded – undo
6 6
  * Class DefaultHeaderParser
7 7
  * @package LunixREST\APIRequest\HeaderParser
8 8
  */
9
-class DefaultHeaderParser implements HeaderParser
10
-{
9
+class DefaultHeaderParser implements HeaderParser {
11 10
 
12 11
     /**
13 12
      * @var string
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
      * DefaultHeaderParser constructor.
19 18
      * @param string $apiKeyHeaderKey
20 19
      */
21
-    public function __construct($apiKeyHeaderKey = 'x-api-key')
22
-    {
20
+    public function __construct($apiKeyHeaderKey = 'x-api-key') {
23 21
         $this->apiKeyHeaderKey = $apiKeyHeaderKey;
24 22
     }
25 23
 
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
      * @param array $headers
64 62
      * @return null
65 63
      */
66
-    protected function findAPIKey(array $headers)
67
-    {
64
+    protected function findAPIKey(array $headers) {
68 65
         foreach ($headers as $key => $values) {
69 66
             if (strtolower($key) == strtolower($this->apiKeyHeaderKey)) {
70 67
                 foreach($values as $value) {
@@ -79,8 +76,7 @@  discard block
 block discarded – undo
79 76
      * @param array $headers
80 77
      * @return null
81 78
      */
82
-    protected function getContentType(array $headers)
83
-    {
79
+    protected function getContentType(array $headers) {
84 80
         foreach ($headers as $key => $values) {
85 81
             if (strtolower($key) == 'content-type') {
86 82
                 foreach ($values as $value) {
Please login to merge, or discard this patch.