| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class AbstractInlineAsset |
||
| 10 | { |
||
| 11 | protected string $handle; |
||
| 12 | |||
| 13 | protected string $code; |
||
| 14 | |||
| 15 | protected ?ServerRequestPolicyInterface $policy = null; |
||
| 16 | |||
| 17 | public function __construct(string $handle, string $code, ?ServerRequestPolicyInterface $policy = null) |
||
| 18 | { |
||
| 19 | $this->handle = $handle; |
||
| 20 | $this->code = $code; |
||
| 21 | |||
| 22 | $this->policy = $policy ?? new NoPolicy(); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getHandle(): string |
||
| 26 | { |
||
| 27 | return $this->handle; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getCode(): string |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getPolicy(): ServerRequestPolicyInterface |
||
| 36 | { |
||
| 37 | return $this->policy; |
||
|
|
|||
| 38 | } |
||
| 39 | |||
| 40 | public function shouldBeLoaded(ServerRequestInterface $request): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |