@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Exceptions; |
| 3 | 3 | |
| 4 | -class AccessDeniedException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class AccessDeniedException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Exceptions; |
| 3 | 3 | |
| 4 | -class INIParseException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class INIParseException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Exceptions; |
| 3 | 3 | |
| 4 | -class ThrottleLimitExceededException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class ThrottleLimitExceededException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Exceptions; |
| 3 | 3 | |
| 4 | -class INIKeyNotFoundException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class INIKeyNotFoundException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | public function get($key) |
| 41 | 41 | { |
| 42 | 42 | //TODO: Cache the file contents |
| 43 | - $config = parse_ini_file($this->filename, (bool)$this->nameSpace); |
|
| 43 | + $config = parse_ini_file($this->filename, (bool) $this->nameSpace); |
|
| 44 | 44 | |
| 45 | 45 | if ($config === false) { |
| 46 | - throw new INIParseException('Could not parse: ' . $this->filename, true); |
|
| 46 | + throw new INIParseException('Could not parse: '.$this->filename, true); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | if ($this->nameSpace) { |
@@ -9,8 +9,7 @@ discard block |
||
| 9 | 9 | * Class INIConfiguration |
| 10 | 10 | * @package LunixREST\Configuration |
| 11 | 11 | */ |
| 12 | -class INIConfiguration implements Configuration |
|
| 13 | -{ |
|
| 12 | +class INIConfiguration implements Configuration { |
|
| 14 | 13 | /** |
| 15 | 14 | * @var null |
| 16 | 15 | */ |
@@ -24,8 +23,7 @@ discard block |
||
| 24 | 23 | * @param string $filename |
| 25 | 24 | * @param string $nameSpace |
| 26 | 25 | */ |
| 27 | - public function __construct($filename, $nameSpace = null) |
|
| 28 | - { |
|
| 26 | + public function __construct($filename, $nameSpace = null) { |
|
| 29 | 27 | $this->filename = $filename; |
| 30 | 28 | $this->nameSpace = $nameSpace; |
| 31 | 29 | } |
@@ -37,8 +35,7 @@ discard block |
||
| 37 | 35 | * @throws INIKeyNotFoundException |
| 38 | 36 | * @throws INIParseException |
| 39 | 37 | */ |
| 40 | - public function get($key) |
|
| 41 | - { |
|
| 38 | + public function get($key) { |
|
| 42 | 39 | //TODO: Cache the file contents |
| 43 | 40 | $config = parse_ini_file($this->filename, (bool)$this->nameSpace); |
| 44 | 41 | |
@@ -60,8 +57,7 @@ discard block |
||
| 60 | 57 | /** |
| 61 | 58 | * @param $key |
| 62 | 59 | */ |
| 63 | - public function set($key) |
|
| 64 | - { |
|
| 60 | + public function set($key) { |
|
| 65 | 61 | //TODO write this |
| 66 | 62 | } |
| 67 | 63 | } |
@@ -1,8 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Configuration; |
| 3 | 3 | |
| 4 | -interface Configuration |
|
| 5 | -{ |
|
| 4 | +interface Configuration { |
|
| 6 | 5 | public function get($key); |
| 7 | 6 | |
| 8 | 7 | public function set($key); |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace LunixREST\Server\Exceptions; |
| 3 | 3 | |
| 4 | -class MethodNotFoundException extends \Exception |
|
| 5 | -{ |
|
| 4 | +class MethodNotFoundException extends \Exception { |
|
| 6 | 5 | |
| 7 | 6 | } |
@@ -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\Request\Request $request |
@@ -6,8 +6,7 @@ discard block |
||
| 6 | 6 | * Class MultiAccessControl |
| 7 | 7 | * @package LunixREST\AccessControl |
| 8 | 8 | */ |
| 9 | -abstract class MultiAccessControl implements AccessControl |
|
| 10 | -{ |
|
| 9 | +abstract class MultiAccessControl implements AccessControl { |
|
| 11 | 10 | /** |
| 12 | 11 | * @var AccessControl[] |
| 13 | 12 | */ |
@@ -16,8 +15,7 @@ discard block |
||
| 16 | 15 | /** |
| 17 | 16 | * @param AccessControl[] $accessControls array of access controls |
| 18 | 17 | */ |
| 19 | - public function __construct(array $accessControls) |
|
| 20 | - { |
|
| 18 | + public function __construct(array $accessControls) { |
|
| 21 | 19 | $this->accessControls = $accessControls; |
| 22 | 20 | } |
| 23 | 21 | } |