Failed Conditions
Push — master ( 978224...1c63e7 )
by Adrien
18:15
created

HasAutomaticUnsignedBalance   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

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
     * @ORM\Column(type="Money", options={"default" = 0, "unsigned" = true})
13
     */
14
    private Money $balance;
15
16
    /**
17
     * Get total balance.
18
     *
19
     * Read only, computed by SQL triggers
20
     */
21 2
    public function getBalance(): Money
22
    {
23 2
        return $this->balance;
24
    }
25
}
26