Completed
Push — refactor ( 1ac315 )
by Akihito
05:56
created

ScriptinjectorModule   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

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