Completed
Push — 1.x ( 0f2e27...4bee37 )
by Akihito
18s queued 16s
created

ScriptInjectorModule   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
c 0
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Package\Module;
6
7
use Ray\Compiler\ScriptInjector;
8
use Ray\Di\AbstractModule;
9
use Ray\Di\InjectorInterface;
10
11
/**
12
 * Provides InjectorInterface
13
 */
14
class ScriptInjectorModule extends AbstractModule
15
{
16
    public function __construct(
17
        private string $scriptDir,
18
        AbstractModule|null $module = null,
19
    ) {
20
        parent::__construct($module);
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    protected function configure(): void
27
    {
28
        $this->bind(InjectorInterface::class)->toInstance(new ScriptInjector($this->scriptDir));
29
    }
30
}
31