Passed
Push — master ( c726f3...c686fd )
by Tim
10:07
created

FaultActor::__construct()   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\SOAP11\XML\env;
6
7
use SimpleSAML\Assert\Assert;
8
use SimpleSAML\XML\AbstractElement;
9
use SimpleSAML\XML\StringElementTrait;
10
11
/**
12
 * Class representing a faultactor element.
13
 *
14
 * @package simplesaml/xml-soap
15
 */
16
final class FaultActor extends AbstractElement
17
{
18
    use StringElementTrait;
19
20
    /** @var string */
21
    public const LOCALNAME = 'faultactor';
22
23
    /** @var null */
24
    public const NS = null;
25
26
    /** @var null */
27
    public const NS_PREFIX = null;
28
29
30
    /**
31
     * Initialize an faultactor
32
     *
33
     * @param string $faultActor
34
     */
35
    public function __construct(string $faultActor)
36
    {
37
        $this->setContent($faultActor);
38
    }
39
40
41
    /**
42
     * Validate the content of the element.
43
     *
44
     * @param string $content  The value to go in the XML textContent
45
     * @throws \Exception on failure
46
     * @return void
47
     */
48
    protected function validateContent(string $content): void
49
    {
50
        Assert::validURI($content, SchemaViolationException::class); // Covers the empty string
0 ignored issues
show
Bug introduced by
The type SimpleSAML\SOAP11\XML\env\SchemaViolationException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
51
    }
52
}
53