Passed
Pull Request — master (#61)
by Tim
02:17
created

LongValue   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A validateValue() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\XMLSchema\Type\Builtin;
6
7
use SimpleSAML\XML\Assert\Assert;
8
use SimpleSAML\XMLSchema\Exception\SchemaViolationException;
9
10
/**
11
 * @package simplesaml/xml-common
12
 */
13
class LongValue extends IntegerValue
14
{
15
    /** @var string */
16
    public const SCHEMA_TYPE = 'long';
17
18
19
    /**
20
     * Validate the value.
21
     *
22
     * @param string $value
23
     * @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure
24
     * @return void
25
     */
26
    protected function validateValue(string $value): void
27
    {
28
        Assert::validLong($this->sanitizeValue($value), SchemaViolationException::class);
29
    }
30
}
31