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\TooManyElementsException; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Class representing a dsig11:FieldID element. |
||
| 16 | * |
||
| 17 | * @package simplesaml/xml-security |
||
| 18 | */ |
||
| 19 | final class FieldID extends AbstractFieldIDType implements SchemaValidatableElementInterface |
||
|
0 ignored issues
–
show
|
|||
| 20 | { |
||
| 21 | use SchemaValidatableElementTrait; |
||
| 22 | |||
| 23 | |||
| 24 | /** |
||
| 25 | * Convert XML into a FieldID element |
||
| 26 | * |
||
| 27 | * @param \DOMElement $xml The XML element we should load |
||
| 28 | * |
||
| 29 | * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException |
||
| 30 | * If the qualified name of the supplied element is wrong |
||
| 31 | */ |
||
| 32 | public static function fromXML(DOMElement $xml): static |
||
| 33 | { |
||
| 34 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
| 35 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
| 36 | |||
| 37 | $fieldId = array_merge( |
||
| 38 | Prime::getChildrenOfClass($xml), |
||
| 39 | TnB::getChildrenOfClass($xml), |
||
| 40 | PnB::getChildrenOfClass($xml), |
||
| 41 | GnB::getChildrenOfClass($xml), |
||
| 42 | self::getChildElementsFromXML($xml), |
||
| 43 | ); |
||
| 44 | |||
| 45 | Assert::count( |
||
| 46 | $fieldId, |
||
| 47 | 1, |
||
| 48 | 'A <dsig11:FieldID> must contain exactly one child element', |
||
| 49 | TooManyElementsException::class, |
||
| 50 | ); |
||
| 51 | |||
| 52 | return new static( |
||
| 53 | array_pop($fieldId), |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |
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