Completed
Pull Request — master (#22)
by Sergey
15:55
created

Container   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getRepository() 0 4 1
A getCache() 0 4 1
1
<?php
2
3
namespace Isswp101\Persimmon\DI;
4
5
use Isswp101\Persimmon\Cache\ICache;
6
use Isswp101\Persimmon\Repository\IRepository;
7
8
class Container
9
{
10
    private $repository;
11
    private $cache;
12
13
    public function __construct(IRepository $repository, ICache $cache)
14
    {
15
        $this->repository = $repository;
16
        $this->cache = $cache;
17
    }
18
19
    public function getRepository(): IRepository
20
    {
21
        return $this->repository;
22
    }
23
24
    public function getCache(): ICache
25
    {
26
        return $this->cache;
27
    }
28
}