| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 9 | public function __construct($enabled = true, array $throttle = [], array $methods = []) |
|
| 24 | { |
||
| 25 | 9 | if (\is_array($enabled)) { |
|
| 26 | // supports doctrine annotations |
||
| 27 | 8 | foreach ($enabled as $key => $value) { |
|
| 28 | 8 | $this->$key = $value; |
|
| 29 | } |
||
| 30 | } else { |
||
| 31 | 1 | $this->enabled = $enabled; |
|
| 32 | 1 | $this->throttle = $throttle; |
|
| 33 | 1 | $this->methods = $methods; |
|
| 34 | } |
||
| 54 |