Passed
Push — master ( a92056...ea57c8 )
by Tim
06:07 queued 03:34
created

IPHint   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
dl 0
loc 15
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A validateContent() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\SAML2\XML\mdui;
6
7
use DOMElement;
8
use SimpleSAML\Assert\Assert;
9
use SimpleSAML\SAML2\Utils;
10
use SimpleSAML\XML\XMLStringElementTrait;
11
12
/**
13
 * Class implementing IPHint.
14
 *
15
 * @package simplesamlphp/saml2
16
 */
17
final class IPHint extends AbstractMduiElement
18
{
19
    use XMLStringElementTrait;
0 ignored issues
show
introduced by
The trait SimpleSAML\XML\XMLStringElementTrait requires some properties which are not provided by SimpleSAML\SAML2\XML\mdui\IPHint: $localName, $namespaceURI
Loading history...
20
21
22
    /**
23
     * Validate the content of the element.
24
     *
25
     * @param string $content  The value to go in the XML textContent
26
     * @throws \Exception on failure
27
     * @return void
28
     */
29
    protected function validateContent(string $content): void
30
    {
31
        Assert::notEmpty($content, 'IPHint cannot be empty');
32
    }
33
}
34