Passed
Pull Request — main (#65)
by Thierry
10:34
created

ChargeService   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCharge() 0 3 1
1
<?php
2
3
namespace Siak\Tontine\Service\Meeting\Charge;
4
5
use Siak\Tontine\Model\Charge;
6
use Siak\Tontine\Model\Round;
7
8
class ChargeService
9
{
10
    /**
11
     * Get a single charge.
12
     *
13
     * @param Round $round
14
     * @param int $chargeId
15
     *
16
     * @return Charge|null
17
     */
18
    public function getCharge(Round $round, int $chargeId): ?Charge
19
    {
20
        return $round->charges()->find($chargeId);
21
    }
22
}
23