| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1.0008 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 1 | public function build(ReflectionClass $reflectionClass, Service $annotation, Definition $definition) |
|
| 24 | { |
||
| 25 | /** @var Definition $definition */ |
||
| 26 | 1 | [$serviceId, $definition] = parent::build($reflectionClass, $annotation, $definition); |
|
|
|
|||
| 27 | |||
| 28 | 1 | $definition->setPublic(false); |
|
| 29 | 1 | $this->container->setDefinition($serviceId, $definition); |
|
| 30 | |||
| 31 | /** @var CompilerPassInterface $compilerPass */ |
||
| 32 | 1 | $compilerPass = $this->container->get($serviceId); |
|
| 33 | 1 | $this->container->addCompilerPass( |
|
| 34 | $compilerPass, |
||
| 35 | 1 | $annotation->type, |
|
| 36 | 1 | $annotation->priority |
|
| 37 | ); |
||
| 38 | |||
| 39 | 1 | return [$serviceId, $definition]; |
|
| 40 | } |
||
| 41 | } |
||
| 42 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.