Skip to content

Commit b954b1c

Browse files
committed
Fix scrutinizer issues
1 parent 709f0b5 commit b954b1c

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/XML/xenc/EncryptedData.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use SimpleSAML\XML\{SchemaValidatableElementInterface, SchemaValidatableElementTrait};
1111
use SimpleSAML\XML\Type\{AnyURIValue, IDValue, StringValue};
1212
use SimpleSAML\XMLSecurity\XML\ds\KeyInfo;
13-
use SimpleSAML\XMLSecurity\XML\xenc\{CipherData, EncryptionMethod};
1413

1514
use function array_pop;
1615

src/XML/xenc11/AbstractKeyDerivationMethodType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function fromXML(DOMElement $xml): static
6666
Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class);
6767

6868
return new static(
69-
self::getOptionalAttribute($xml, 'Algorithm', AnyURIValue::class, null),
69+
self::getAttribute($xml, 'Algorithm', AnyURIValue::class),
7070
self::getChildElementsFromXML($xml),
7171
);
7272
}

src/XML/xenc11/MGF.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function fromXML(DOMElement $xml): static
2828
Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class);
2929

3030
return new static(
31-
self::getOptionalAttribute($xml, 'Algorithm', AnyURIValue::class, null),
31+
self::getAttribute($xml, 'Algorithm', AnyURIValue::class),
3232
);
3333
}
3434
}

src/XML/xenc11/OtherSource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static function fromXML(DOMElement $xml): static
3333
Assert::maxCount($parameter, 1, TooManyElementsException::class);
3434

3535
return new static(
36-
self::getOptionalAttribute($xml, 'Algorithm', AnyURIValue::class, null),
36+
self::getAttribute($xml, 'Algorithm', AnyURIValue::class),
3737
array_pop($parameter),
3838
);
3939
}

src/XML/xenc11/PRF.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function fromXML(DOMElement $xml): static
2828
Assert::same($xml->namespaceURI, static::getNamespaceURI(), InvalidDOMElementException::class);
2929

3030
return new static(
31-
self::getOptionalAttribute($xml, 'Algorithm', AnyURIValue::class, null),
31+
self::getAttribute($xml, 'Algorithm', AnyURIValue::class),
3232
);
3333
}
3434
}

0 commit comments

Comments
 (0)