Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
31 | 1 | public function loadConfiguration() |
|
32 | { |
||
33 | 1 | $config = $this->getConfig($this->default); |
|
34 | 1 | $this->validateConfigTypes($config); |
|
|
|||
35 | 1 | $builder = $this->getContainerBuilder(); |
|
36 | |||
37 | 1 | $loggerCallable = $this->buildDefinitionFromCallable($config['loggerCallable']); |
|
38 | |||
39 | 1 | $builder->addDefinition($this->prefix('listener')) |
|
40 | 1 | ->setClass(LoggableSubscriber::class, [ |
|
41 | 1 | '@' . $this->getClassAnalyzer()->getClass(), |
|
42 | 1 | $config['isRecursive'], |
|
43 | 1 | '@' . $loggerCallable->getClass() |
|
44 | ]) |
||
45 | 1 | ->setAutowired(FALSE) |
|
46 | 1 | ->addTag(EventsExtension::TAG_SUBSCRIBER); |
|
47 | 1 | } |
|
48 | |||
60 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.