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

WriteRepository   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 add() 0 4 1
A update() 0 4 1
1
<?php
2
3
namespace Black\Website\Infrastructure\Persistence\CQRS;
4
5
use Black\Page\Domain\Model\WebPage;
6
use Black\Page\Domain\Model\WebPageRepository;
7
8
class WriteRepository
9
{
10
    protected $repository;
11
12
    public function __construct(WebPageRepository $repository)
13
    {
14
        $this->repository = $repository;
15
    }
16
17
    public function add(WebPage $webpage)
18
    {
19
        $this->repository->add($webpage);
20
    }
21
22
    public function update(WebPage $webpage)
23
    {
24
        $this->repository->update($webpage);
25
    }
26
}
27