Comments   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCommentsRepository() 0 4 1
A setCommentsRepository() 0 4 1
1
<?php namespace jlourenco\comments;
2
3
use jlourenco\comments\Repositories\CommentRepositoryInterface;
4
5
class Comments
6
{
7
8
    /**
9
     * The Comments repository.
10
     *
11
     * @var \jlourenco\comments\Repositories\CommentRepositoryInterface
12
     */
13
    protected $comments;
14
15
    /**
16
     * Create a new Blog instance.
17
     *
18
     * @param  \jlourenco\comments\Repositories\CommentRepositoryInterface  $comments
19
     */
20
    public function __construct(CommentRepositoryInterface $comments)
21
    {
22
        $this->comments = $comments;
23
    }
24
25
    /**
26
     * Returns the comments repository.
27
     *c
28
     * @return \jlourenco\comments\Repositories\CommentRepositoryInterface
29
     */
30
    public function getCommentsRepository()
31
    {
32
        return $this->comments;
33
    }
34
35
    /**
36
     * Sets the comments repository.
37
     *
38
     * @param  \jlourenco\comments\Repositories\CommentRepositoryInterface $comments
39
     * @return void
40
     */
41
    public function setCommentsRepository(CommentRepositoryInterface $comments)
42
    {
43
        $this->comments = $comments;
44
    }
45
46
}
47