Completed
Push — develop ( 168e99...0122be )
by
unknown
18:37 queued 07:11
created

Product::getPrice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2016 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Orders\Entity;
12
13
use \Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
14
15
/**
16
 * A product
17
 *
18
 * @ODM\EmbeddedDocument
19
 * @author Mathias Gelhausen <[email protected]>
20
 * @todo write test 
21
 */
22
class Product implements ProductInterface
23
{
24
25
    /**
26
     * The name of the product.
27
     *
28
     * @ODM\String
29
     * @var string
30
     */
31
    protected $name;
32
33
    /**
34
     * The product number
35
     *
36
     * @ODM\String
37
     * @var string
38
     */
39
    protected $productNumber;
40
41
    /**
42
     * The price
43
     *
44
     * @ODM\Field(type="float")
45
     * @var float
46
     */
47
    protected $price = 0;
48
49
    /**
50
     * The quantity
51
     *
52
     * @ODM\Field(type="int")
53
     * @var int
54
     */
55
    protected $quantity = 1;
56
57
    public function setName($name)
58
    {
59
        $this->name = $name;
60
61
        return $this;
62
    }
63
64
    public function getName()
65
    {
66
        return $this->name;
67
    }
68
69
    public function setPrice($price)
70
    {
71
        $this->price = $price;
72
73
        return $this;
74
    }
75
76
    public function getPrice()
77
    {
78
        return $this->price;
79
    }
80
81
    public function setProductNumber($number)
82
    {
83
        $this->productNumber = $number;
84
85
        return $this;
86
    }
87
88
    public function getProductNumber()
89
    {
90
        return $this->productNumber;
91
    }
92
93
    public function setQuantity($quantity)
94
    {
95
        $this->quantity = $quantity;
96
97
        return $this;
98
    }
99
100
    public function getQuantity()
101
    {
102
        return $this->quantity;
103
    }
104
105
106
    
107
}