UnimplementedPhpDocBlockException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
eloc 10
c 1
b 1
f 1
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
4
namespace Apie\TypeJuggling\Exceptions;
5
6
use Apie\Core\Exceptions\ApieException;
7
use phpDocumentor\Reflection\Type;
8
9
/**
10
 * Exception thrown by the the trait when a phpdoc is found that can not be mapped.
11
 */
12
class UnimplementedPhpDocBlockException extends ApieException
13
{
14
    public function __construct(string $fieldName, Type $type, ?\Throwable $previous = null)
15
    {
16
        $message = 'Type '
17
            . get_class($type)
18
            . ' found on field "'
19
            . $fieldName
20
            . '" is not implemented in apie/composite-value-objects';
21
        parent::__construct(
22
            500,
23
            $message,
24
            $previous
25
        );
26
    }
27
}
28