| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class KeyValueUtility |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Get the value from SingleValueInterface, or call $compute callback and write to it. |
||
| 16 | * |
||
| 17 | * @param SingleValueInterface $store The storage. |
||
| 18 | * @param callable $compute The method to create the value. |
||
| 19 | * @return mixed The value. |
||
| 20 | */ |
||
| 21 | public static function getOrSet(SingleValueInterface $store, callable $compute) |
||
| 32 |