| Total Complexity | 6 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class ScriptLocalization implements ScriptLocalizationInterface |
||
| 11 | { |
||
| 12 | protected string $handle; |
||
| 13 | |||
| 14 | protected string $variable; |
||
| 15 | |||
| 16 | protected array $data; |
||
| 17 | |||
| 18 | protected ?ServerRequestPolicyInterface $policy = null; |
||
| 19 | |||
| 20 | public function __construct( |
||
| 21 | string $handle, |
||
| 22 | string $variable, |
||
| 23 | array $data, |
||
| 24 | ?ServerRequestPolicyInterface $policy |
||
| 25 | ) { |
||
| 26 | $this->handle = $handle; |
||
| 27 | $this->variable = $variable; |
||
| 28 | $this->data = $data; |
||
| 29 | |||
| 30 | $this->policy = $policy ?? new NoPolicy(); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getHandle(): string |
||
| 34 | { |
||
| 35 | return $this->handle; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getVariable(): string |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getData(): array |
||
| 44 | { |
||
| 45 | return $this->data; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getPolicy(): ?ServerRequestPolicyInterface |
||
| 49 | { |
||
| 50 | return $this->policy; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function shouldBeLoaded(ServerRequestInterface $request): bool |
||
| 56 | } |
||
| 57 | } |
||
| 58 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.