PediException::invalidQuantifier()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Claudsonm\Pedi\Exceptions;
4
5
use Claudsonm\Pedi\Structure\Field;
6
use Exception;
7
8
class PediException extends Exception
9
{
10 4
    public static function invalidInput(Field $field, $value): self
11
    {
12 4
        return new static("The value `{$value}` is not compatible with the field {$field->getName()}");
13
    }
14
15 5
    public static function invalidQuantifier()
16
    {
17 5
        return new static('Only integers higher than zero or the wildcard `*` are allowed as valid occurrences quantifiers.');
18
    }
19
}
20