| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function createFromArray(array $arr): Block |
||
| 29 | { |
||
| 30 | $context = $arr['context']; |
||
| 31 | $themeDescriptor = $this->themeUnserializer->createFromArray($arr['theme']); |
||
| 32 | |||
| 33 | if (isset($arr['ttl'])) { |
||
| 34 | return new CacheableBlock($themeDescriptor, $context, $arr['key'], $arr['ttl'], $arr['tags']); |
||
| 35 | } else { |
||
| 36 | return new Block($themeDescriptor, $context); |
||
| 37 | } |
||
| 40 | } |