Completed
Push — master ( 1a67e9...ec29fe )
by Torben
42:38 queued 40:09
created

PriceOption::setEvent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace DERHANSEN\SfEventMgt\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
/**
18
 * Price option
19
 *
20
 * @author Torben Hansen <[email protected]>
21
 */
22
class PriceOption extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
23
{
24
    /**
25
     * Price
26
     *
27
     * @var float
28
     */
29
    protected $price = 0.0;
30
31
    /**
32
     * Valid until
33
     *
34
     * @var \DateTime
35
     */
36
    protected $validUntil = null;
37
38
    /**
39
     * Event
40
     *
41
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Event
42
     */
43
    protected $event = null;
44
45
    /**
46
     * Returns the price
47
     *
48
     * @return float
49
     */
50 2
    public function getPrice()
51
    {
52 2
        return $this->price;
53
    }
54
55
    /**
56
     * Sets the price
57
     *
58
     * @param float $price
59
     * @return void
60
     */
61 3
    public function setPrice($price)
62
    {
63 3
        $this->price = $price;
64 3
    }
65
66
    /**
67
     * Returns the date until the price is valid
68
     *
69
     * @return \DateTime
70
     */
71 4
    public function getValidUntil()
72
    {
73 4
        return $this->validUntil;
74
    }
75
76
    /**
77
     * Sets the date until the price is valil
78
     *
79
     * @param \DateTime $validUntil
80
     * @return void
81
     */
82 3
    public function setValidUntil($validUntil)
83
    {
84 3
        $this->validUntil = $validUntil;
85 3
    }
86
87
    /**
88
     * Returns the event
89
     *
90
     * @return \DERHANSEN\SfEventMgt\Domain\Model\Event
91
     */
92 2
    public function getEvent()
93
    {
94 2
        return $this->event;
95
    }
96
97
    /**
98
     * Sets the event
99
     *
100
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event
101
     */
102 1
    public function setEvent($event)
103
    {
104 1
        $this->event = $event;
105 1
    }
106
}
107