Framework   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 24
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getContainer() 0 4 1
A path() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace N1215\Tsukuyomi;
5
6
use Psr\Container\ContainerInterface;
7
8
class Framework implements FrameworkInterface
9
{
10
    /** @var ContainerInterface  */
11
    private $container;
12
13
    /** @var string  */
14
    private $rootPath;
15
16 2
    public function __construct(ContainerInterface $container, string $rootPath)
17
    {
18 2
        $this->container = $container;
19 2
        $this->rootPath = $rootPath;
20 2
    }
21
22 1
    public function getContainer(): ContainerInterface
23
    {
24 1
        return $this->container;
25
    }
26
27 1
    public function path(string $relativePath): string
28
    {
29 1
        return $this->rootPath . DIRECTORY_SEPARATOR . $relativePath;
30
    }
31
}
32