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