Comments::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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