simplesamlphp /
xml-security
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\XMLSecurity\XML\xenc11; |
||
| 6 | |||
| 7 | use DOMElement; |
||
| 8 | use SimpleSAML\Assert\Assert; |
||
| 9 | use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; |
||
| 10 | use SimpleSAML\XMLSchema\Exception\TooManyElementsException; |
||
| 11 | use SimpleSAML\XMLSchema\Type\AnyURIValue; |
||
|
0 ignored issues
–
show
|
|||
| 12 | |||
| 13 | use function array_pop; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * A class implementing the xenc11:OtherSource element. |
||
| 17 | * |
||
| 18 | * @package simplesamlphp/xml-security |
||
| 19 | */ |
||
| 20 | final class OtherSource extends AbstractAlgorithmIdentifierType |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @inheritDoc |
||
| 24 | * |
||
| 25 | * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException |
||
| 26 | * If the qualified name of the supplied element is wrong |
||
| 27 | */ |
||
| 28 | public static function fromXML(DOMElement $xml): static |
||
| 29 | { |
||
| 30 | Assert::same($xml->localName, static::getLocalName(), InvalidDOMElementException::class); |
||
| 31 | Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class); |
||
| 32 | |||
| 33 | $parameter = Parameters::getChildrenOfClass($xml); |
||
|
0 ignored issues
–
show
The type
SimpleSAML\XMLSecurity\XML\xenc11\Parameters 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 34 | Assert::maxCount($parameter, 1, TooManyElementsException::class); |
||
| 35 | |||
| 36 | return new static( |
||
| 37 | self::getAttribute($xml, 'Algorithm', AnyURIValue::class), |
||
| 38 | array_pop($parameter), |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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