Completed
Push — master ( c68689...d67f41 )
by Adam
06:12
created

Review::getLikes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\ReviewBundle\Entity;
14
15
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
16
use WellCommerce\Bundle\CatalogBundle\Entity\Product;
17
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Enableable;
18
use WellCommerce\Bundle\CoreBundle\Doctrine\Behaviours\Identifiable;
19
use WellCommerce\Bundle\CoreBundle\Entity\EntityInterface;
20
21
/**
22
 * Class Review
23
 *
24
 * @author  Adam Piotrowski <[email protected]>
25
 */
26
class Review implements EntityInterface
27
{
28
    use Identifiable;
29
    use Enableable;
30
    use Timestampable;
31
    
32
    protected $nick   = '';
33
    protected $review = '';
34
    protected $rating = 5;
35
    
36
    /**
37
     * @var Product
38
     */
39
    protected $product;
40
    
41
    public function getNick(): string
42
    {
43
        return $this->nick;
44
    }
45
    
46
    public function setNick(string $nick)
47
    {
48
        $this->nick = $nick;
49
    }
50
    
51
    public function getReview(): string
52
    {
53
        return $this->review;
54
    }
55
    
56
    public function setReview(string $review)
57
    {
58
        $this->review = $review;
59
    }
60
    
61
    public function getRating(): int
62
    {
63
        return $this->rating;
64
    }
65
    
66
    public function getProduct(): Product
67
    {
68
        return $this->product;
69
    }
70
    
71
    public function setProduct(Product $product)
72
    {
73
        $this->product = $product;
74
    }
75
}
76