Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
21 | 16 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
22 | { |
||
23 | 16 | $extraction = new ClassMethods(); |
|
24 | 16 | $extraction->addStrategy('created_at', new DateTimeFormatterStrategy()); |
|
25 | 16 | $extraction->addStrategy('due', new DateTimeFormatterStrategy()); |
|
26 | 16 | $extraction->addStrategy('active', new BooleanStrategy(1, 0)); |
|
27 | 16 | $extraction->addStrategy('grants', new CollectionStrategy(new ClassMethods(), Grant::class)); |
|
28 | 16 | $extraction->addStrategy('owner', new NestedEntityStrategy(new ClassMethods())); |
|
29 | |||
30 | 16 | $extraction->setNamingStrategy(new MapNamingStrategy([], [ |
|
31 | 16 | 'isActive' => 'active', |
|
32 | ])); |
||
33 | |||
34 | 16 | return $extraction; |
|
35 | } |
||
36 | } |
||
37 |