Completed
Push — master ( fc4ead...c5d222 )
by Andrii
05:51
created

LeasingWasFinished::getPrice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace hiqdev\php\billing\charge\modifiers\event;
4
5
use hiqdev\php\billing\price\PriceInterface;
6
use League\Event\AbstractEvent;
0 ignored issues
show
Bug introduced by
The type League\Event\AbstractEvent was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class LeasingWasFinished extends AbstractEvent
9
{
10
    /**
11
     * @var PriceInterface
12
     */
13
    private $price;
14
    /**
15
     * @var \DateTimeImmutable
16
     */
17
    private $date;
18
19
    private function __construct(PriceInterface $price, \DateTimeImmutable $date)
20
    {
21
        $this->price = $price;
22
        $this->date = $date;
23
    }
24
25
    public static function forPriceInMonth(PriceInterface $price, \DateTimeImmutable $date): self
26
    {
27
        return new self($price, $date);
28
    }
29
30
    /**
31
     * @return PriceInterface
32
     */
33
    public function getPrice(): PriceInterface
34
    {
35
        return $this->price;
36
    }
37
38
    /**
39
     * @return \DateTimeImmutable
40
     */
41
    public function getDate(): \DateTimeImmutable
42
    {
43
        return $this->date;
44
    }
45
}
46