simplesamlphp /
xml-soap
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\SOAP12\XML; |
||
| 6 | |||
| 7 | use DOMElement; |
||
| 8 | use SimpleSAML\SOAP12\Assert\Assert; |
||
| 9 | use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; |
||
| 10 | use SimpleSAML\XMLSchema\Exception\MissingElementException; |
||
| 11 | use SimpleSAML\XMLSchema\Exception\TooManyElementsException; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Class representing a env:Subcode element. |
||
| 15 | * |
||
| 16 | * @package simplesaml/xml-soap |
||
| 17 | */ |
||
| 18 | final class Subcode extends AbstractSoapElement |
||
|
0 ignored issues
–
show
|
|||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Initialize a soap:Subcode |
||
| 22 | * |
||
| 23 | * @param \SimpleSAML\SOAP12\XML\Value $value |
||
| 24 | * @param \SimpleSAML\SOAP12\XML\Subcode|null $subcode |
||
| 25 | */ |
||
| 26 | public function __construct( |
||
| 27 | protected Value $value, |
||
|
0 ignored issues
–
show
The type
SimpleSAML\SOAP12\XML\Value 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...
|
|||
| 28 | protected ?Subcode $subcode = null, |
||
| 29 | ) { |
||
| 30 | } |
||
| 31 | |||
| 32 | |||
| 33 | /** |
||
| 34 | * @return \SimpleSAML\SOAP12\XML\Value |
||
| 35 | */ |
||
| 36 | public function getValue(): Value |
||
| 37 | { |
||
| 38 | return $this->value; |
||
| 39 | } |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * @return \SimpleSAML\SOAP12\XML\Subcode|null |
||
| 44 | */ |
||
| 45 | public function getSubcode(): ?Subcode |
||
| 46 | { |
||
| 47 | return $this->subcode; |
||
| 48 | } |
||
| 49 | |||
| 50 | |||
| 51 | /** |
||
| 52 | * Convert XML into an Subcode element |
||
| 53 | * |
||
| 54 | * @param \DOMElement $xml The XML element we should load |
||
| 55 | * |
||
| 56 | * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException |
||
| 57 | * If the qualified name of the supplied element is wrong |
||
| 58 | */ |
||
| 59 | public static function fromXML(DOMElement $xml): static |
||
| 60 | { |
||
| 61 | Assert::same($xml->localName, 'Subcode', InvalidDOMElementException::class); |
||
| 62 | Assert::same($xml->namespaceURI, Subcode::NS, InvalidDOMElementException::class); |
||
| 63 | |||
| 64 | $value = Value::getChildrenOfClass($xml); |
||
| 65 | Assert::count($value, 1, 'Must contain exactly one Value', MissingElementException::class); |
||
| 66 | |||
| 67 | $subcode = Subcode::getChildrenOfClass($xml); |
||
| 68 | Assert::maxCount($subcode, 1, 'Cannot process more than one Subcode element.', TooManyElementsException::class); |
||
| 69 | |||
| 70 | return new static( |
||
| 71 | array_pop($value), |
||
| 72 | empty($subcode) ? null : array_pop($subcode), |
||
| 73 | ); |
||
| 74 | } |
||
| 75 | |||
| 76 | |||
| 77 | /** |
||
| 78 | * Convert this Subcode to XML. |
||
| 79 | * |
||
| 80 | * @param \DOMElement|null $parent The element we should add this subcode to. |
||
| 81 | */ |
||
| 82 | public function toXML(?DOMElement $parent = null): DOMElement |
||
| 83 | { |
||
| 84 | $e = $this->instantiateParentElement($parent); |
||
| 85 | |||
| 86 | $this->getValue()->toXML($e); |
||
| 87 | $this->getSubcode()?->toXML($e); |
||
| 88 | |||
| 89 | return $e; |
||
| 90 | } |
||
| 91 | } |
||
| 92 |
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