Completed
Pull Request — master (#22)
by Sergey
14:35
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 getCacheRepository() 0 4 1
1
<?php
2
3
namespace Isswp101\Persimmon\DI;
4
5
use Isswp101\Persimmon\Repository\ICacheRepository;
6
use Isswp101\Persimmon\Repository\IRepository;
7
8
class Container
9
{
10
    private $repository;
11
    private $cacheRepository;
12
13
    public function __construct(IRepository $repository, ICacheRepository $cacheRepository)
14
    {
15
        $this->repository = $repository;
16
        $this->cacheRepository = $cacheRepository;
17
    }
18
19
    public function getRepository(): IRepository
20
    {
21
        return $this->repository;
22
    }
23
24
    public function getCacheRepository(): ICacheRepository
25
    {
26
        return $this->cacheRepository;
27
    }
28
}