InvalidPropertyTypeViolation::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Larapie\DataTransferObject\Violations;
4
5
use Symfony\Component\Validator\ConstraintViolation;
6
7
class InvalidPropertyTypeViolation extends ConstraintViolation
8
{
9
    /**
10
     * RequiredPropertyViolation constructor.
11
     */
12 8
    public function __construct(array $types)
13
    {
14 8
        parent::__construct(
15 8
            'invalid type should be '.implode('|', $types),
16 8
            'invalid type should be '.implode('|', $types),
17 8
            [],
18 8
            null,
19 8
            '',
20 8
            null
21
        );
22 8
    }
23
}
24