DeregisterException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 20
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A missing() 0 5 1
A blank() 0 3 1
1
<?php
2
3
namespace Maiorano\Shortcodes\Exceptions;
4
5
/**
6
 * Class DeregisterException.
7
 */
8
final class DeregisterException extends ShortcodeException
9
{
10
    /**
11
     * @return static
12
     */
13 1
    public static function blank(): self
14
    {
15 1
        return new static(parent::BLANK);
16
    }
17
18
    /**
19
     * @param string $name
20
     *
21
     * @return static
22
     */
23 1
    public static function missing(string $name): self
24
    {
25 1
        $e = sprintf(parent::MISSING, $name);
26
27 1
        return new static($e);
28
    }
29
}
30