ECommerceFeature::getProduct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\Models\ECommerce;
4
5
/**
6
 * Describes a product feature.
7
 *
8
 * @author Giorgio Sironi
9
 */
10
class ECommerceFeature
11
{
12
    /**
13
     */
14
    private $id;
15
16
    /**
17
     */
18
    private $description;
19
20
    /**
21
     */
22
    private $product;
23
24
    public function getId() {
25
        return $this->id;
26
    }
27
28
    public function getDescription() {
29
        return $this->description;
30
    }
31
32
    public function setDescription($description) {
33
        $this->description = $description;
34
    }
35
36
    public function setProduct(ECommerceProduct $product) {
37
        $this->product = $product;
38
    }
39
40
    public function removeProduct() {
41
        if ($this->product !== null) {
42
            $product = $this->product;
43
            $this->product = null;
44
            $product->removeFeature($this);
45
        }
46
    }
47
48
    public function getProduct() {
49
        return $this->product;
50
    }
51
}
52