Passed
Push — master ( afa595...3d30f2 )
by Marcel
08:58
created

ViolationListResponse::getViolations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Response;
4
5
use JMS\Serializer\Annotation as Serializer;
6
7
class ViolationListResponse extends ErrorResponse {
8
9
    #[Serializer\Type("array<App\Response\Violation>")]
10
    public readonly array $violations;
11
12
    /**
13
     * @param Violation[] $violations
14
     */
15
    public function __construct(array $violations) {
16
        parent::__construct('Validierung fehlgeschlagen.');
17
        $this->violations = $violations;
0 ignored issues
show
Bug introduced by
The property violations is declared read-only in App\Response\ViolationListResponse.
Loading history...
18
    }
19
}