Passed
Push — feature/container-extend ( b81097...93c762 )
by Chema
03:26
created

DependencyProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A provideModuleDependencies() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\ExtendService\Module;
6
7
use ArrayObject;
8
use Gacela\Framework\AbstractDependencyProvider;
9
use Gacela\Framework\Container\Container;
10
11
final class DependencyProvider extends AbstractDependencyProvider
12
{
13
    public const ARRAY_AS_OBJECT = 'SERVICE_FUNCTION_ARRAY';
14
15
    public const ARRAY_FROM_FUNCTION = 'ARRAY_FROM_FUNCTION';
16
17
    public function provideModuleDependencies(Container $container): void
18
    {
19
        $container->set(self::ARRAY_FROM_FUNCTION, new ArrayObject([1, 2]));
20
21
        $container->set(self::ARRAY_AS_OBJECT, static fn () => new ArrayObject([1, 2]));
22
    }
23
}
24