File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ trait SignableElementTrait
2727 /**
2828 * Get the signature element of this object.
2929 *
30- * @return \SimpleSAML\XMLSecurity\XML\ds\Signature|null
30+ * @return \SimpleSAML\XMLSecurity\XML\ds\Signature
3131 */
3232 public function getSignature (): ?Signature
3333 {
@@ -38,13 +38,11 @@ public function getSignature(): ?Signature
3838 /**
3939 * Initialize a signed element from XML.
4040 *
41- * @param \SimpleSAML\XMLSecurity\XML\ds\Signature|null $signature The ds:Signature object
41+ * @param \SimpleSAML\XMLSecurity\XML\ds\Signature $signature The ds:Signature object
4242 */
43- protected function setSignature (? Signature $ signature ): void
43+ protected function setSignature (Signature $ signature ): void
4444 {
45- if ($ signature ) {
46- $ this ->signature = $ signature ;
47- }
45+ $ this ->signature = $ signature ;
4846 }
4947
5048
@@ -89,9 +87,6 @@ public function validate(XMLSecurityKey $key): bool
8987 */
9088 public function getValidatingCertificates (): array
9189 {
92- if ($ this ->signature === null ) {
93- return [];
94- }
9590 $ ret = [];
9691 foreach ($ this ->signature ->getCertificates () as $ cert ) {
9792 // extract the public key from the certificate for validation.
You can’t perform that action at this time.
0 commit comments