Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | final class ContextProcessor implements ProcessorInterface |
||
22 | { |
||
23 | // Context injection pattern @{key|default} |
||
24 | private const PATTERN = '/@\\{(?P<name>[a-z0-9_\\.\\-]+)(?: *\\| *(?P<default>[^}]+))?}/i'; |
||
25 | |||
26 | /** @var string */ |
||
27 | private $pattern = ''; |
||
28 | |||
29 | /** |
||
30 | * @param string $pattern |
||
31 | */ |
||
32 | public function __construct(string $pattern = null) |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function process(ViewSource $source, ContextInterface $context): ViewSource |
||
47 |
This check looks for imports that have been defined, but are not used in the scope.