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

HasAutomaticUnsignedBalance::getBalance()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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