Conditions | 6 |
Paths | 7 |
Total Lines | 21 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 3 | Features | 0 |
1 | <?php |
||
19 | public function create(): LoggableContextCollection |
||
20 | { |
||
21 | if (count($this->loggablePaths) === 0) { |
||
22 | return new LoggableContextCollection([]); |
||
23 | } |
||
24 | |||
25 | $classes = []; |
||
26 | |||
27 | if ($this->decorated) { |
||
28 | foreach ($this->decorated->create() as $loggableClass => $config) { |
||
29 | $classes[$loggableClass] = $config; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | foreach (RecursiveClassIterator::getReflectionClasses($this->loggablePaths) as $className => $reflectionClass) { |
||
34 | if ($loggable = $this->getLoggableAttribute($reflectionClass)) { |
||
35 | $classes[$className] = ['groups' => $loggable->getGroups()]; |
||
36 | } |
||
37 | } |
||
38 | |||
39 | return new LoggableContextCollection($classes); |
||
40 | } |
||
52 | } |