@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | private static function checkRequestDataIsArray($requestData): void |
| 54 | 54 | { |
| 55 | - if(!is_array($requestData)) { |
|
| 55 | + if (!is_array($requestData)) { |
|
| 56 | 56 | throw new UnableToCreateResourceParametersException("Unable to read request as array or null"); |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -9,8 +9,7 @@ |
||
| 9 | 9 | * Class ArrayResourceParametersFactory |
| 10 | 10 | * @package LunixREST\Server\Router\Endpoint\ResourceEndpoint |
| 11 | 11 | */ |
| 12 | -abstract class ArrayResourceParametersFactory implements ResourceParametersFactory |
|
| 13 | -{ |
|
| 12 | +abstract class ArrayResourceParametersFactory implements ResourceParametersFactory { |
|
| 14 | 13 | /** |
| 15 | 14 | * @param APIRequest $request |
| 16 | 15 | * @return ResourceParameters |
@@ -12,8 +12,7 @@ discard block |
||
| 12 | 12 | * @package LunixREST\Server\Router\EndpointFactory |
| 13 | 13 | * @deprecated in favor of injecting the LoggerInterface manually in EndpointFactories. This adds no additional value. |
| 14 | 14 | */ |
| 15 | -abstract class LoggingEndpointFactory implements EndpointFactory |
|
| 16 | -{ |
|
| 15 | +abstract class LoggingEndpointFactory implements EndpointFactory { |
|
| 17 | 16 | /** |
| 18 | 17 | * @var LoggerInterface |
| 19 | 18 | */ |
@@ -23,8 +22,7 @@ discard block |
||
| 23 | 22 | * LoggingEndpointFactory constructor. |
| 24 | 23 | * @param LoggerInterface $logger |
| 25 | 24 | */ |
| 26 | - public function __construct(LoggerInterface $logger) |
|
| 27 | - { |
|
| 25 | + public function __construct(LoggerInterface $logger) { |
|
| 28 | 26 | $this->logger = $logger; |
| 29 | 27 | } |
| 30 | 28 | |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | * @package LunixREST\Server\Router\EndpointFactory |
| 14 | 14 | * @deprecated in favor of injecting the CacheItemPoolInterface manually in EndpointFactories. This adds no additional value. |
| 15 | 15 | */ |
| 16 | -abstract class CachingEndpointFactory extends LoggingEndpointFactory |
|
| 17 | -{ |
|
| 16 | +abstract class CachingEndpointFactory extends LoggingEndpointFactory { |
|
| 18 | 17 | /** |
| 19 | 18 | * @var CacheItemPoolInterface |
| 20 | 19 | */ |
@@ -25,8 +24,7 @@ discard block |
||
| 25 | 24 | * @param CacheItemPoolInterface $cachePool |
| 26 | 25 | * @param LoggerInterface $logger |
| 27 | 26 | */ |
| 28 | - public function __construct(CacheItemPoolInterface $cachePool, LoggerInterface $logger) |
|
| 29 | - { |
|
| 27 | + public function __construct(CacheItemPoolInterface $cachePool, LoggerInterface $logger) { |
|
| 30 | 28 | $this->cachePool = $cachePool; |
| 31 | 29 | parent::__construct($logger); |
| 32 | 30 | } |
@@ -8,8 +8,7 @@ discard block |
||
| 8 | 8 | * Class CacheItemPoolAwareTrait |
| 9 | 9 | * @package LunixREST\Server\Router\Endpoint |
| 10 | 10 | */ |
| 11 | -trait CacheItemPoolAwareTrait |
|
| 12 | -{ |
|
| 11 | +trait CacheItemPoolAwareTrait { |
|
| 13 | 12 | /** |
| 14 | 13 | * @var CacheItemPoolInterface |
| 15 | 14 | */ |
@@ -18,8 +17,7 @@ discard block |
||
| 18 | 17 | /** |
| 19 | 18 | * @param CacheItemPoolInterface $cacheItemPool |
| 20 | 19 | */ |
| 21 | - public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool) |
|
| 22 | - { |
|
| 20 | + public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool) { |
|
| 23 | 21 | $this->cacheItemPool = $cacheItemPool; |
| 24 | 22 | } |
| 25 | 23 | } |
@@ -9,8 +9,7 @@ discard block |
||
| 9 | 9 | * @package LunixREST\Endpoint |
| 10 | 10 | * @deprecated This has been deprecated in favor of using the CacheItemPoolAwareTrait. |
| 11 | 11 | */ |
| 12 | -abstract class CachingEndpoint extends LoggingEndpoint |
|
| 13 | -{ |
|
| 12 | +abstract class CachingEndpoint extends LoggingEndpoint { |
|
| 14 | 13 | /** |
| 15 | 14 | * @var CacheItemPoolInterface |
| 16 | 15 | */ |
@@ -19,8 +18,7 @@ discard block |
||
| 19 | 18 | /** |
| 20 | 19 | * @param CacheItemPoolInterface $cacheItemPool |
| 21 | 20 | */ |
| 22 | - public function setCachePool(CacheItemPoolInterface $cacheItemPool) |
|
| 23 | - { |
|
| 21 | + public function setCachePool(CacheItemPoolInterface $cacheItemPool) { |
|
| 24 | 22 | $this->cachePool = $cacheItemPool; |
| 25 | 23 | } |
| 26 | 24 | } |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | * @package LunixREST\Server\Router\Endpoint |
| 10 | 10 | * @deprecated in favor of just directly using the LoggerAwareTrait. |
| 11 | 11 | */ |
| 12 | -abstract class LoggingEndpoint implements Endpoint |
|
| 13 | -{ |
|
| 12 | +abstract class LoggingEndpoint implements Endpoint { |
|
| 14 | 13 | use LoggerAwareTrait; |
| 15 | 14 | } |