Conditions | 4 |
Paths | 3 |
Total Lines | 30 |
Code Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 2 | public function create(BillCreationDto $dto) |
|
29 | 2 | { |
|
30 | 2 | $bill = new Bill( |
|
31 | 2 | $dto->id, |
|
32 | 2 | $dto->type, |
|
33 | 2 | $dto->time, |
|
34 | 2 | $dto->sum, |
|
35 | 2 | $dto->quantity, |
|
36 | 2 | $dto->customer, |
|
37 | $dto->target, |
||
38 | $dto->plan, |
||
39 | $dto->charges ?: [], |
||
40 | $dto->state |
||
41 | ); |
||
42 | if (!empty($dto->usageInterval)) { |
||
43 | if ($dto->usageInterval instanceof UsageInterval) { |
||
44 | $interval = $dto->usageInterval; |
||
45 | } else { |
||
46 | $month = $dto->usageInterval['month']['date']; |
||
47 | $start = $dto->usageInterval['start']['date']; |
||
48 | $end = $dto->usageInterval['end']['date'];; |
||
49 | $interval = UsageInterval::withinMonth( |
||
50 | new DateTimeImmutable($month), |
||
51 | new DateTimeImmutable($start), |
||
52 | new DateTimeImmutable($end) |
||
53 | ); |
||
54 | } |
||
55 | $bill->setUsageInterval($interval); |
||
56 | } |
||
57 | return $bill; |
||
58 | } |
||
60 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths