Passed
Pull Request — master (#374)
by Tim
02:41
created

CIDRValue::validateValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\Type;
6
7
use SimpleSAML\SAML2\Assert\Assert;
8
9
/**
10
 * @package simplesaml/saml2
11
 */
12
class CIDRValue extends SAMLStringValue
13
{
14
    /**
15
     * Validate the content of the element.
16
     *
17
     * @param string $value  The value to go in the XML textContent
18
     * @throws \Exception on failure
19
     * @return void
20
     */
21
    protected function validateValue(string $value): void
22
    {
23
        Assert::validCIDR($this->sanitizeValue($value));
24
    }
25
}
26