QueryLocatorModule   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 2
b 0
f 1
dl 0
loc 20
rs 10

2 Methods

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