Completed
Push — 1.x ( ad94ee...15aa48 )
by Akihito
14s
created

ResourceObjectModule   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 21
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 7 2
1
<?php
2
/**
3
 * This file is part of the BEAR.Package package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\Package\Provide\Resource;
8
9
use BEAR\AppMeta\AbstractAppMeta;
10
use Ray\Di\AbstractModule;
11
12
class ResourceObjectModule extends AbstractModule
13
{
14
    /**
15
     * @var AbstractAppMeta
16
     */
17
    private $appMeta;
18
19 6
    public function __construct(AbstractAppMeta $appMeta, AbstractModule $module = null)
20
    {
21 6
        $this->appMeta = $appMeta;
22 6
        parent::__construct($module);
23 6
    }
24
25 6
    protected function configure()
26
    {
27 6
        $gen = $this->appMeta->getResourceListGenerator();
28 6
        foreach ($gen as list($class)) {
29 6
            $this->bind($class);
30
        }
31 6
    }
32
}
33