LoggableContextFactory::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Locastic\Loggastic\Metadata\LoggableContext\Factory;
4
5
final class LoggableContextFactory implements LoggableContextFactoryInterface
6
{
7
    public function __construct(private readonly LoggableContextCollectionFactoryInterface $loggableContextCollectionFactory)
8
    {
9
    }
10
11
    public function create(string $loggableClass): ?array
12
    {
13
        $loggableContextCollection = $this->loggableContextCollectionFactory->create();
14
15
        return $loggableContextCollection->getByClass($loggableClass);
16
    }
17
}
18