| Total Complexity | 5 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class CallableEntry implements EntryInterface |
||
| 15 | { |
||
| 16 | /** @var callable The callable used to determine the value for the entry */ |
||
| 17 | private $callable; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * CallableEntry constructor. |
||
| 21 | * @param callable $callable The callable used to determine the value for the entry |
||
| 22 | */ |
||
| 23 | 3 | public function __construct(callable $callable) |
|
| 26 | 3 | } |
|
| 27 | |||
| 28 | /** {@inheritdoc} */ |
||
| 29 | 2 | public static function createFromCacheParameters(array $parameters): EntryInterface |
|
| 30 | { |
||
| 31 | 2 | return new static($parameters[0]); |
|
| 32 | } |
||
| 33 | |||
| 34 | /** {@inheritdoc} */ |
||
| 35 | 2 | public function getCacheParameters(): array |
|
| 38 | } |
||
| 39 | |||
| 40 | /** {@inheritdoc} */ |
||
| 41 | 3 | public function isFactory(): bool |
|
| 42 | { |
||
| 43 | 3 | return false; |
|
| 44 | } |
||
| 45 | |||
| 46 | /** {@inheritdoc} */ |
||
| 47 | 3 | public function getValue(ContainerInterface $container) |
|
| 50 | } |
||
| 51 | } |
||
| 52 |