Fee   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 22
c 2
b 0
f 0
dl 0
loc 88
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A setLabel() 0 5 1
A setFeeId() 0 5 1
A setBalance() 0 5 1
A getLabel() 0 3 1
A getBalance() 0 3 1
A __construct() 0 5 1
A getTransaction() 0 3 1
A getFeeId() 0 3 1
A setTransaction() 0 5 1
1
<?php
2
3
namespace App\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 */
10
class Fee
11
{
12
    /**
13
     * @ORM\Id()
14
     * @ORM\GeneratedValue()
15
     * @ORM\Column(type="integer")
16
     */
17
    private $id;
18
19
    /**
20
     * @ORM\Column(type="string", length=25)
21
     */
22
    private $fee_id;
23
24
    /**
25
     * @ORM\Column(type="string", length=255, nullable=true)
26
     */
27
    private $label;
28
29
    /**
30
     * @ORM\Column(type="decimal", precision=7, scale=2)
31
     */
32
    private $balance;
33
34
    /**
35
     * @ORM\ManyToOne(targetEntity="App\Entity\Transaction", inversedBy="fees")
36
     * @ORM\JoinColumn(nullable=false)
37
     */
38
    private $transaction;
39
40
    public function __construct($fee_id, $balance, $label)
41
    {
42
        $this->fee_id = $fee_id;
43
        $this->balance = $balance;
44
        $this->label = $label;
45
    }
46
47
    public function getId()
48
    {
49
        return $this->id;
50
    }
51
52
    public function getFeeId(): ?string
53
    {
54
        return $this->fee_id;
55
    }
56
57
    public function setFeeId(string $fee_id): self
58
    {
59
        $this->fee_id = $fee_id;
60
61
        return $this;
62
    }
63
64
    public function getLabel(): ?string
65
    {
66
        return $this->label;
67
    }
68
69
    public function setLabel(?string $label): self
70
    {
71
        $this->label = $label;
72
73
        return $this;
74
    }
75
76
    public function getBalance()
77
    {
78
        return $this->balance;
79
    }
80
81
    public function setBalance($balance): self
82
    {
83
        $this->balance = $balance;
84
85
        return $this;
86
    }
87
88
    public function getTransaction(): ?Transaction
89
    {
90
        return $this->transaction;
91
    }
92
93
    public function setTransaction(?Transaction $transaction): self
94
    {
95
        $this->transaction = $transaction;
96
97
        return $this;
98
    }
99
}
100