FieldTypeNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Exception\Field;
6
7
class FieldTypeNotFoundException extends FieldException
8
{
9
    public function __construct(string $type, string $fieldName, array $context = [])
10
    {
11
        $message = sprintf(
12
            'The type "%s" is not configured for the Field "%s" with context "%s"',
13
            $type,
14
            $fieldName,
15
            print_r($context, true)
0 ignored issues
show
Bug introduced by
It seems like print_r($context, true) can also be of type true; however, parameter $values of sprintf() does only seem to accept double|integer|string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
            /** @scrutinizer ignore-type */ print_r($context, true)
Loading history...
16
        );
17
18
        parent::__construct($message, 500);
19
    }
20
}
21