Completed
Push — feature/rewrite ( 4d09af...dad4c8 )
by Alexandre
03:40 queued 01:51
created

ReadRepository   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 19
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A find() 0 4 1
A findAll() 0 4 1
1
<?php
2
3
namespace Black\Page\Infrastructure\Persistence\CQRS;
4
5
use Black\Page\Domain\Model\WebPageId;
6
use Black\Page\Domain\Model\WebPageRepository;
7
8
class ReadRepository
9
{
10
    protected $repository;
11
12
    public function __construct(WebPageRepository $repository)
13
    {
14
        $this->repository = $repository;
15
    }
16
17
    public function find(WebPageId $id)
18
    {
19
        return $this->repository->find($id);
20
    }
21
22
    public function findAll()
23
    {
24
        return $this->repository->findAll();
25
    }
26
}
27