@@ -7,8 +7,7 @@ |
||
| 7 | 7 | * Interface Throttle |
| 8 | 8 | * @package LunixREST\Throttle |
| 9 | 9 | */ |
| 10 | -interface Throttle |
|
| 11 | -{ |
|
| 10 | +interface Throttle { |
|
| 12 | 11 | /** |
| 13 | 12 | * Returns true if the given request should be throttled in our implementation |
| 14 | 13 | * @param \LunixREST\APIRequest\APIRequest $request |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\APIRequest\HeaderParser; |
| 3 | 3 | |
| 4 | -interface HeaderParser |
|
| 5 | -{ |
|
| 4 | +interface HeaderParser { |
|
| 6 | 5 | public function parse(array $headers): ParsedHeaders; |
| 7 | 6 | } |
@@ -1,8 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\APIRequest\HeaderParser; |
| 3 | 3 | |
| 4 | -class ParsedHeaders |
|
| 5 | -{ |
|
| 4 | +class ParsedHeaders { |
|
| 6 | 5 | /** |
| 7 | 6 | * @var array |
| 8 | 7 | */ |
@@ -16,15 +15,13 @@ discard block |
||
| 16 | 15 | * @param array $acceptableMIMETypes |
| 17 | 16 | * @param $APIKey |
| 18 | 17 | */ |
| 19 | - public function __construct($contentType, array $acceptableMIMETypes, $APIKey) |
|
| 20 | - { |
|
| 18 | + public function __construct($contentType, array $acceptableMIMETypes, $APIKey) { |
|
| 21 | 19 | $this->contentType = $contentType; |
| 22 | 20 | $this->acceptableMIMETypes = $acceptableMIMETypes; |
| 23 | 21 | $this->APIKey = $APIKey; |
| 24 | 22 | } |
| 25 | 23 | |
| 26 | - public function getContentType() |
|
| 27 | - { |
|
| 24 | + public function getContentType() { |
|
| 28 | 25 | return $this->contentType; |
| 29 | 26 | } |
| 30 | 27 | |
@@ -33,8 +30,7 @@ discard block |
||
| 33 | 30 | return $this->acceptableMIMETypes; |
| 34 | 31 | } |
| 35 | 32 | |
| 36 | - public function getAPIKey() |
|
| 37 | - { |
|
| 33 | + public function getAPIKey() { |
|
| 38 | 34 | return $this->APIKey; |
| 39 | 35 | } |
| 40 | 36 | } |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\APIRequest\URLParser\Exceptions; |
| 3 | 3 | |
| 4 | -class InvalidRequestURLException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class InvalidRequestURLException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -4,8 +4,7 @@ |
||
| 4 | 4 | use LunixREST\APIRequest\URLParser\Exceptions\InvalidRequestURLException; |
| 5 | 5 | use Psr\Http\Message\UriInterface; |
| 6 | 6 | |
| 7 | -interface URLParser |
|
| 8 | -{ |
|
| 7 | +interface URLParser { |
|
| 9 | 8 | /** |
| 10 | 9 | * Parses API request data out of a url |
| 11 | 10 | * @param UriInterface $uri |
@@ -9,10 +9,8 @@ |
||
| 9 | 9 | * Class BasicRequestFactory |
| 10 | 10 | * @package LunixREST\Request\RequestFactory |
| 11 | 11 | */ |
| 12 | -class DefaultRequestFactory extends GenericRequestFactory |
|
| 13 | -{ |
|
| 14 | - public function __construct(URLParser $URLParser) |
|
| 15 | - { |
|
| 12 | +class DefaultRequestFactory extends GenericRequestFactory { |
|
| 13 | + public function __construct(URLParser $URLParser) { |
|
| 16 | 14 | parent::__construct($URLParser, new DefaultHeaderParser()); |
| 17 | 15 | } |
| 18 | 16 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * Interface Endpoint |
| 9 | 9 | * @package LunixREST\Endpoints |
| 10 | 10 | */ |
| 11 | -interface Endpoint |
|
| 12 | -{ |
|
| 11 | +interface Endpoint { |
|
| 13 | 12 | /** |
| 14 | 13 | * @param APIRequest $request |
| 15 | 14 | * @return null|array|object |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Configuration\Exceptions; |
| 3 | 3 | |
| 4 | -class INIParseException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class INIParseException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -5,8 +5,7 @@ |
||
| 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 |