Completed
Push — Recipes ( 2148c4...d07045 )
by Laurent
02:34
created

Tva::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/**
4
 * Entité Tva.
5
 *
6
 * PHP Version 5
7
 *
8
 * @author    Quétier Laurent <[email protected]>
9
 * @copyright 2014 Dev-Int GLSR
10
 * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
11
 *
12
 * @version GIT: <git_id>
13
 *
14
 * @link https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\Entity\Settings\Diverse;
17
18
use Doctrine\ORM\Mapping as ORM;
19
20
/**
21
 * Tva Entité Tva.
22
 *
23
 * @category Entity
24
 *
25
 * @ORM\Table(name="gs_tva")
26
 * @ORM\Entity(repositoryClass="AppBundle\Repository\Settings\Diverse\TvaRepository")
27
 */
28
class Tva
29
{
30
    /**
31
     * @var int Id du taux de TVA
32
     *
33
     * @ORM\Column(name="id", type="integer")
34
     * @ORM\Id
35
     * @ORM\GeneratedValue(strategy="AUTO")
36
     */
37
    private $id;
38
39
    /**
40
     * @var decimal Taux de TVA
41
     *
42
     * @ORM\Column(name="rate", type="decimal", precision=4, scale=3)
43
     */
44
    private $rate;
45
46
    /**
47
     * Get id.
48
     *
49
     * @return int
50
     */
51
    public function getId()
52
    {
53
        return $this->id;
54
    }
55
56
    /**
57
     * Set rate.
58
     *
59
     * @param decimal $rate Taux de TVA
60
     *
61
     * @return Settings\Diverse\Tva
62
     */
63
    public function setRate($rate)
64
    {
65
        $this->rate = $rate;
66
67
        return $this;
68
    }
69
70
    /**
71
     * Get rate.
72
     *
73
     * @return decimal
74
     */
75
    public function getRate()
76
    {
77
        return $this->rate;
78
    }
79
80
    /**
81
     * Get name
82
     *
83
     * @return string
84
     */
85
    public function getName()
86
    {
87
        return $this->getRate() * 100;
88
    }
89
}
90