AnnotationException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A undefinedArgument() 0 8 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Leaditin\Annotations\Exception;
6
7
use Leaditin\Annotations\Annotation;
8
9
/**
10
 * Class AnnotationException
11
 *
12
 * @package Leaditin\Annotations\Exception
13
 * @author Igor Vuckovic <[email protected]>
14
 */
15
class AnnotationException extends \LogicException
16
{
17
    /**
18
     * @param Annotation $annotation
19
     * @param string $argument
20
     * @return AnnotationException
21
     */
22 1
    public static function undefinedArgument(Annotation $annotation, string $argument) : AnnotationException
23
    {
24 1
        return new self(sprintf(
25 1
            'Annotation for "%s" does not have argument "%s"',
26 1
            $annotation->getName(),
27 1
            $argument
28
        ));
29
    }
30
}
31