SAMLStringValue::validateValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML11\Type;
6
7
use SimpleSAML\SAML11\Assert\Assert;
8
use SimpleSAML\XMLSchema\Type\StringValue;
9
10
/**
11
 * @package simplesaml/saml11
12
 */
13
class SAMLStringValue extends StringValue
14
{
15
    /**
16
     * Validate the value.
17
     *
18
     * @param string $value
19
     * @return void
20
     */
21
    protected function validateValue(string $value): void
22
    {
23
        // Note: value must already be sanitized before validating
24
        Assert::validSAMLString($this->sanitizeValue($value));
25
    }
26
}
27