Failed Conditions
Push — master ( ab912b...01f77f )
by Adrien
10:12
created

HasAutomaticUnsignedBalance   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 17
rs 10
ccs 0
cts 2
cp 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getBalance() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Traits;
6
7
use Money\Money;
8
9
trait HasAutomaticUnsignedBalance
10
{
11
    /**
12
     * @var Money
13
     *
14
     * @ORM\Column(type="Money", options={"default" = 0, "unsigned" = true})
15
     */
16
    private $balance;
17
18
    /**
19
     * Get total balance
20
     *
21
     * Read only, computed by SQL triggers
22
     */
23
    public function getBalance(): Money
24
    {
25
        return $this->balance;
26
    }
27
}
28