Completed
Push — master ( d8f29d...158cdb )
by John
02:28
created
src/Request/URLParser/Exceptions/InvalidRequestURLException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Request\URLParser\Exceptions;
3 3
 
4
-class InvalidRequestURLException extends \Exception
5
-{
4
+class InvalidRequestURLException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.
src/Request/URLParser/ParsedURL.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use LunixREST\Request\RequestData\RequestData;
5 5
 
6
-class ParsedURL
7
-{
6
+class ParsedURL {
8 7
     /**
9 8
      * @var RequestData
10 9
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
      * @param array $acceptableMIMETypes
40 39
      * @param string|null $instance
41 40
      */
42
-    public function __construct(RequestData $requestData, $version, $apiKey, $endpoint, $acceptableMIMETypes, $instance)
43
-    {
41
+    public function __construct(RequestData $requestData, $version, $apiKey, $endpoint, $acceptableMIMETypes, $instance) {
44 42
         $this->requestData = $requestData;
45 43
         $this->version = $version;
46 44
         $this->apiKey = $apiKey;
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
     /**
69 67
      * @return string|null
70 68
      */
71
-    public function getAPIKey()
72
-    {
69
+    public function getAPIKey() {
73 70
         return $this->apiKey;
74 71
     }
75 72
 
@@ -92,8 +89,7 @@  discard block
 block discarded – undo
92 89
     /**
93 90
      * @return string|null
94 91
      */
95
-    public function getInstance()
96
-    {
92
+    public function getInstance() {
97 93
         return $this->instance;
98 94
     }
99 95
 }
Please login to merge, or discard this patch.
src/Request/URLParser/BasicURLParser.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
  * Class BasicURLParser
12 12
  * @package LunixREST\Request\URLParser
13 13
  */
14
-class BasicURLParser implements URLParser
15
-{
14
+class BasicURLParser implements URLParser {
16 15
 
17 16
     /**
18 17
      * @var MIMEProvider
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      * BasicURLParser constructor.
24 23
      * @param MIMEProvider $MIMEProvider
25 24
      */
26
-    public function __construct(MIMEProvider $MIMEProvider)
27
-    {
25
+    public function __construct(MIMEProvider $MIMEProvider) {
28 26
         $this->MIMEProvider = $MIMEProvider;
29 27
     }
30 28
 
Please login to merge, or discard this patch.
src/Request/URLParser/URLParser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@
 block discarded – undo
3 3
 
4 4
 use LunixREST\Request\URLParser\Exceptions\InvalidRequestURLException;
5 5
 
6
-interface URLParser
7
-{
6
+interface URLParser {
8 7
     /**
9 8
      * Parses API request data out of a url
10 9
      * @param $url
Please login to merge, or discard this patch.
src/Request/RequestData/JSONRequestData.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use LunixREST\Request\BodyParser\Exceptions\InvalidRequestDataException;
5 5
 
6
-class JSONRequestData implements RequestData
7
-{
6
+class JSONRequestData implements RequestData {
8 7
 
9 8
     protected $jsonString;
10 9
 
@@ -15,8 +14,7 @@  discard block
 block discarded – undo
15 14
      * @param $body
16 15
      * @throws InvalidRequestDataException
17 16
      */
18
-    public function __construct($body)
19
-    {
17
+    public function __construct($body) {
20 18
         $this->jsonString = $body;
21 19
         $this->parsedData = json_decode($body, true);
22 20
         if ($this->parsedData === null) {
@@ -40,8 +38,7 @@  discard block
 block discarded – undo
40 38
      * @param string $key
41 39
      * @return mixed
42 40
      */
43
-    public function get(string $key)
44
-    {
41
+    public function get(string $key) {
45 42
         return $this->parsedData[$key] ?? null;
46 43
     }
47 44
 
Please login to merge, or discard this patch.
src/Request/RequestData/RequestData.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Request\RequestData;
3 3
 
4
-interface RequestData
5
-{
4
+interface RequestData {
6 5
     /**
7 6
      * Returns the raw data that the requestData tried to parse
8 7
      * @return string
Please login to merge, or discard this patch.
src/Request/RequestData/URLEncodedQueryStringRequestData.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,15 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Request\RequestData;
3 3
 
4
-class URLEncodedQueryStringRequestData implements RequestData
5
-{
4
+class URLEncodedQueryStringRequestData implements RequestData {
6 5
 
7 6
     protected $queryString;
8 7
 
9 8
     protected $parsedData = [];
10 9
 
11
-    public function __construct($queryString)
12
-    {
10
+    public function __construct($queryString) {
13 11
         $this->queryString = $queryString;
14 12
         parse_str($queryString, $this->parsedData);
15 13
     }
@@ -30,8 +28,7 @@  discard block
 block discarded – undo
30 28
      * @param string $key
31 29
      * @return mixed
32 30
      */
33
-    public function get(string $key)
34
-    {
31
+    public function get(string $key) {
35 32
         return $this->parsedData[$key] ?? null;
36 33
     }
37 34
 
Please login to merge, or discard this patch.
src/Request/BodyParser/URLEncodedBodyParser.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
 use LunixREST\Request\RequestData\RequestData;
6 6
 use LunixREST\Request\RequestData\URLEncodedQueryStringRequestData;
7 7
 
8
-class URLEncodedBodyParser implements BodyParser
9
-{
8
+class URLEncodedBodyParser implements BodyParser {
10 9
 
11 10
     /**
12 11
      * Parses API request data out of a url
Please login to merge, or discard this patch.
src/Request/BodyParser/BodyParser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 use LunixREST\Request\BodyParser\Exceptions\InvalidRequestDataException;
5 5
 use LunixREST\Request\RequestData\RequestData;
6 6
 
7
-interface BodyParser
8
-{
7
+interface BodyParser {
9 8
     /**
10 9
      * Parses API request data out of a url
11 10
      * @param $rawBody
Please login to merge, or discard this patch.