simplesamlphp /
xml-security
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\XMLSecurity\XML\dsig11; |
||
| 6 | |||
| 7 | use DOMElement; |
||
| 8 | use SimpleSAML\Assert\Assert; |
||
| 9 | use SimpleSAML\XML\SchemaValidatableElementInterface; |
||
| 10 | use SimpleSAML\XML\SchemaValidatableElementTrait; |
||
| 11 | use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; |
||
| 12 | use SimpleSAML\XMLSchema\Exception\MissingElementException; |
||
| 13 | use SimpleSAML\XMLSchema\Exception\TooManyElementsException; |
||
| 14 | |||
| 15 | use function array_pop; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Class representing a dsig11:TnB element. |
||
| 19 | * |
||
| 20 | * @package simplesaml/xml-security |
||
| 21 | */ |
||
| 22 | final class TnB extends AbstractTnBFieldParamsType implements SchemaValidatableElementInterface |
||
| 23 | { |
||
| 24 | use SchemaValidatableElementTrait; |
||
| 25 | |||
| 26 | |||
| 27 | /** |
||
| 28 | * Convert XML into a TnB element |
||
| 29 | * |
||
| 30 | * @param \DOMElement $xml The XML element we should load |
||
| 31 | * |
||
| 32 | * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException |
||
| 33 | * If the qualified name of the supplied element is wrong |
||
| 34 | */ |
||
| 35 | public static function fromXML(DOMElement $xml): static |
||
| 36 | { |
||
| 37 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
| 38 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
| 39 | |||
| 40 | $k = K::getChildrenOfClass($xml); |
||
| 41 | Assert::minCount($k, 1, MissingElementException::class); |
||
| 42 | Assert::maxCount($k, 1, TooManyElementsException::class); |
||
| 43 | |||
| 44 | $m = M::getChildrenOfClass($xml); |
||
|
0 ignored issues
–
show
|
|||
| 45 | Assert::minCount($m, 1, MissingElementException::class); |
||
| 46 | Assert::maxCount($m, 1, TooManyElementsException::class); |
||
| 47 | |||
| 48 | return new static( |
||
| 49 | array_pop($m), |
||
| 50 | array_pop($k), |
||
| 51 | ); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths