@@ -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 |
@@ -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 | } |
@@ -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 |
@@ -11,8 +11,7 @@ discard block |
||
| 11 | 11 | * Class GenericRouter |
| 12 | 12 | * @package LunixREST\Server |
| 13 | 13 | */ |
| 14 | -class GenericRouter implements Router |
|
| 15 | -{ |
|
| 14 | +class GenericRouter implements Router { |
|
| 16 | 15 | /** |
| 17 | 16 | * @var EndpointFactory |
| 18 | 17 | */ |
@@ -22,8 +21,7 @@ discard block |
||
| 22 | 21 | * DefaultRouter constructor. |
| 23 | 22 | * @param EndpointFactory $endpointFactory |
| 24 | 23 | */ |
| 25 | - public function __construct(EndpointFactory $endpointFactory) |
|
| 26 | - { |
|
| 24 | + public function __construct(EndpointFactory $endpointFactory) { |
|
| 27 | 25 | $this->endpointFactory = $endpointFactory; |
| 28 | 26 | } |
| 29 | 27 | |
@@ -11,8 +11,7 @@ |
||
| 11 | 11 | * Interface Router |
| 12 | 12 | * @package LunixREST\Server |
| 13 | 13 | */ |
| 14 | -interface Router |
|
| 15 | -{ |
|
| 14 | +interface Router { |
|
| 16 | 15 | /** |
| 17 | 16 | * @param APIRequest $request |
| 18 | 17 | * @return APIResponseData |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | * Interface Endpoint |
| 10 | 10 | * @package LunixREST\Endpoints |
| 11 | 11 | */ |
| 12 | -interface Endpoint |
|
| 13 | -{ |
|
| 12 | +interface Endpoint { |
|
| 14 | 13 | /** |
| 15 | 14 | * @param APIRequest $request |
| 16 | 15 | * @return APIResponseData |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | * Class Endpoint |
| 10 | 10 | * @package LunixREST\Endpoints |
| 11 | 11 | */ |
| 12 | -class DefaultEndpoint implements Endpoint |
|
| 13 | -{ |
|
| 12 | +class DefaultEndpoint implements Endpoint { |
|
| 14 | 13 | /** |
| 15 | 14 | * @param APIRequest $request |
| 16 | 15 | * @return APIResponseData |
@@ -7,8 +7,7 @@ discard block |
||
| 7 | 7 | * Class APIResponse |
| 8 | 8 | * @package LunixREST\APIResponse |
| 9 | 9 | */ |
| 10 | -class APIResponse |
|
| 11 | -{ |
|
| 10 | +class APIResponse { |
|
| 12 | 11 | /** |
| 13 | 12 | * @var string |
| 14 | 13 | */ |
@@ -18,8 +17,7 @@ discard block |
||
| 18 | 17 | */ |
| 19 | 18 | protected $stream; |
| 20 | 19 | |
| 21 | - public function __construct(string $MIMEType, StreamInterface $stream) |
|
| 22 | - { |
|
| 20 | + public function __construct(string $MIMEType, StreamInterface $stream) { |
|
| 23 | 21 | $this->MIMEType = $MIMEType; |
| 24 | 22 | $this->stream = $stream; |
| 25 | 23 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | * APIResponseData constructor. |
| 9 | 9 | * @param null|object|array $data |
| 10 | 10 | */ |
| 11 | - public function __construct($data) |
|
| 12 | - { |
|
| 11 | + public function __construct($data) { |
|
| 13 | 12 | $this->data = $data; |
| 14 | 13 | } |
| 15 | 14 | |