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

ChargeService::getCharge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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