Completed
Pull Request — master (#22)
by Sergey
15:20 queued 20s
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\IRepository;
6
7
class Container
8
{
9
    private $repository;
10
    private $cacheRepository;
11
12
    public function __construct(IRepository $repository, IRepository $cacheRepository)
13
    {
14
        $this->repository = $repository;
15
        $this->cacheRepository = $cacheRepository;
16
    }
17
18
    public function getRepository(): IRepository
19
    {
20
        return $this->repository;
21
    }
22
23
    public function getCacheRepository(): IRepository
24
    {
25
        return $this->cacheRepository;
26
    }
27
}