Conditions | 5 |
Paths | 16 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
31 | 1 | public static function create(array $data) |
|
32 | { |
||
33 | 1 | $configuration = new static(); |
|
34 | 1 | $configuration->ttl = |
|
35 | 1 | array_key_exists('enabled', $data) && null !== $data['enabled'] ? (int)$data['ttl'] : null; |
|
36 | 1 | $configuration->enabled = array_key_exists('enabled', $data) ? (bool)$data['enabled'] : false; |
|
37 | 1 | $configuration->strategy = array_key_exists('strategy', $data) ? $data['strategy'] : new ScalarKeyStrategy(); |
|
38 | |||
39 | 1 | return $configuration; |
|
40 | } |
||
41 | |||
71 |