1 | <?php |
||
26 | abstract class ContextPlugin implements \PEIP\INF\Context\ContextPlugin |
||
27 | { |
||
28 | protected $context; |
||
29 | |||
30 | protected $builders = []; |
||
31 | |||
32 | //protected static $builders = array(); |
||
|
|||
33 | |||
34 | /** |
||
35 | * Initializes the plugin with given context. |
||
36 | * Registers node-builders of the plugin in with the given context. |
||
37 | * |
||
38 | * @param \PEIP\INF\Context\Context $context context instance to register the plugin with |
||
39 | * |
||
40 | * @return |
||
41 | */ |
||
42 | public function init(\PEIP\INF\Context\Context $context) |
||
49 | |||
50 | /** |
||
51 | * Builds and modifies an arbitrary service/object instance from a config-obect. |
||
52 | * |
||
53 | * @see XMLContext::doBuild |
||
54 | * @see XMLContext::modifyService |
||
55 | * @implements \PEIP\INF\Context\Context |
||
56 | * |
||
57 | * @param object $config configuration object to build a service instance from. |
||
58 | * @param array $arguments arguments for the service constructor |
||
59 | * @param string $defaultClass class to create instance for if none is set in config |
||
60 | * |
||
61 | * @return object build and modified srvice instance |
||
62 | */ |
||
63 | public function buildAndModify($config, $arguments, $defaultClass = false) |
||
67 | } |
||
68 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.