@@ -8,8 +8,7 @@ discard block |
||
8 | 8 | * Class APIResponse |
9 | 9 | * @package LunixREST\Server\APIResponse |
10 | 10 | */ |
11 | -class APIResponse |
|
12 | -{ |
|
11 | +class APIResponse { |
|
13 | 12 | /** |
14 | 13 | * @var string |
15 | 14 | */ |
@@ -19,8 +18,7 @@ discard block |
||
19 | 18 | */ |
20 | 19 | protected $stream; |
21 | 20 | |
22 | - public function __construct(string $MIMEType, StreamInterface $stream) |
|
23 | - { |
|
21 | + public function __construct(string $MIMEType, StreamInterface $stream) { |
|
24 | 22 | $this->MIMEType = $MIMEType; |
25 | 23 | $this->stream = $stream; |
26 | 24 | } |
@@ -9,8 +9,7 @@ discard block |
||
9 | 9 | * Class CachePoolThrottle |
10 | 10 | * @package LunixREST\Server\Throttle |
11 | 11 | */ |
12 | -abstract class CachePoolThrottle implements Throttle |
|
13 | -{ |
|
12 | +abstract class CachePoolThrottle implements Throttle { |
|
14 | 13 | /** |
15 | 14 | * @var CacheItemPoolInterface |
16 | 15 | */ |
@@ -30,8 +29,7 @@ discard block |
||
30 | 29 | * @param int $limit |
31 | 30 | * @param int $perXSeconds |
32 | 31 | */ |
33 | - public function __construct(CacheItemPoolInterface $cacheItemPool, int $limit = 60, int $perXSeconds = 60) |
|
34 | - { |
|
32 | + public function __construct(CacheItemPoolInterface $cacheItemPool, int $limit = 60, int $perXSeconds = 60) { |
|
35 | 33 | $this->cacheItemPool = $cacheItemPool; |
36 | 34 | $this->limit = $limit; |
37 | 35 | $this->perXSeconds = $perXSeconds; |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * Class NoThrottle |
9 | 9 | * @package LunixREST\Server\Throttle |
10 | 10 | */ |
11 | -class NoThrottle implements Throttle |
|
12 | -{ |
|
11 | +class NoThrottle implements Throttle { |
|
13 | 12 | /** |
14 | 13 | * Never throttle |
15 | 14 | * @param \LunixREST\Server\APIRequest\APIRequest $request |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * Interface Throttle |
9 | 9 | * @package LunixREST\Server\Throttle |
10 | 10 | */ |
11 | -interface Throttle |
|
12 | -{ |
|
11 | +interface Throttle { |
|
13 | 12 | /** |
14 | 13 | * Returns true if the given request should be throttled in our implementation |
15 | 14 | * @param \LunixREST\Server\APIRequest\APIRequest $request |
@@ -8,8 +8,7 @@ discard block |
||
8 | 8 | * Class APIKeyCachePoolThrottle |
9 | 9 | * @package LunixREST\Server\Throttle |
10 | 10 | */ |
11 | -class APIKeyCachePoolThrottle extends CachePoolThrottle |
|
12 | -{ |
|
11 | +class APIKeyCachePoolThrottle extends CachePoolThrottle { |
|
13 | 12 | /** |
14 | 13 | * @var string |
15 | 14 | */ |
@@ -22,8 +21,7 @@ discard block |
||
22 | 21 | * @param int $perXSeconds |
23 | 22 | * @param string $keyPrefix |
24 | 23 | */ |
25 | - public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '') |
|
26 | - { |
|
24 | + public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '') { |
|
27 | 25 | parent::__construct($cacheItemPool, $limit, $perXSeconds); |
28 | 26 | $this->keyPrefix = $keyPrefix; |
29 | 27 | } |
@@ -9,8 +9,7 @@ discard block |
||
9 | 9 | * Class AllAccessListAccessControl |
10 | 10 | * @package LunixREST\Server\AccessControl |
11 | 11 | */ |
12 | -class AllAccessConfigurationListAccessControl implements AccessControl |
|
13 | -{ |
|
12 | +class AllAccessConfigurationListAccessControl implements AccessControl { |
|
14 | 13 | /** |
15 | 14 | * @var Configuration |
16 | 15 | */ |
@@ -30,8 +29,7 @@ discard block |
||
30 | 29 | * @param $namespace |
31 | 30 | * @param string $configKey key to use when accessing the list of valid keys from the $config |
32 | 31 | */ |
33 | - public function __construct(Configuration $config, string $namespace, string $configKey = 'keys') |
|
34 | - { |
|
32 | + public function __construct(Configuration $config, string $namespace, string $configKey = 'keys') { |
|
35 | 33 | $this->config = $config; |
36 | 34 | $this->configKey = $configKey; |
37 | 35 | $this->namespace = $namespace; |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * Class PublicAccessControl |
9 | 9 | * @package LunixREST\Server\AccessControl |
10 | 10 | */ |
11 | -class PublicAccessControl implements AccessControl |
|
12 | -{ |
|
11 | +class PublicAccessControl implements AccessControl { |
|
13 | 12 | /** |
14 | 13 | * @param \LunixREST\Server\APIRequest\APIRequest $request |
15 | 14 | * @return bool |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * Interface AccessControl |
9 | 9 | * @package LunixREST\Server\AccessControl |
10 | 10 | */ |
11 | -interface AccessControl |
|
12 | -{ |
|
11 | +interface AccessControl { |
|
13 | 12 | /** |
14 | 13 | * Validates if a given request should be able to access what it's trying to |
15 | 14 | * @param APIRequest $request |
@@ -8,8 +8,7 @@ discard block |
||
8 | 8 | * Class OneKeyAccessControl |
9 | 9 | * @package LunixREST\Server\AccessControl |
10 | 10 | */ |
11 | -class OneKeyAccessControl implements AccessControl |
|
12 | -{ |
|
11 | +class OneKeyAccessControl implements AccessControl { |
|
13 | 12 | /** |
14 | 13 | * @var string |
15 | 14 | */ |
@@ -18,8 +17,7 @@ discard block |
||
18 | 17 | /** |
19 | 18 | * @param string $key |
20 | 19 | */ |
21 | - public function __construct($key) |
|
22 | - { |
|
20 | + public function __construct($key) { |
|
23 | 21 | $this->key = $key; |
24 | 22 | } |
25 | 23 |