Skip to content

Commit f4d24d6

Browse files
committed
psr-12
1 parent 38c8437 commit f4d24d6

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/Signature.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ public function addReferences(array $nodes, string $alg, array $transforms = [],
275275
/**
276276
* Attach one or more X509 certificates to the signature.
277277
*
278-
* @param X509Certificate|X509Certificate[] $certs An X509Certificate object or an array of them.
278+
* @param \SimpleSAML\XMLSecurity\Key\X509Certificate|\SimpleSAML\XMLSecurity\Key\X509Certificate[] $certs
279+
* An X509Certificate object or an array of them.
279280
* @param boolean $addSubject Whether to add the subject of the certificate or not.
280281
* @param string|false $digest A digest algorithm identifier if the digest of the certificate should be added. False
281282
* otherwise.

src/Utils/Certificate.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Certificate
1414
*/
1515
public const CERTIFICATE_PATTERN = '/^-----BEGIN CERTIFICATE-----([^-]*)^-----END CERTIFICATE-----/m';
1616

17+
1718
/**
1819
* @param string $certificate
1920
*

src/XML/EncryptedElementInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ interface EncryptedElementInterface
1919
* Constructor for encrypted elements.
2020
*
2121
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedData $encryptedData The EncryptedData object.
22-
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedKey[] $encryptedKeys An array of zero or more EncryptedKey objects.
22+
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedKey[] $encryptedKeys
23+
* An array of zero or more EncryptedKey objects.
2324
*/
2425
public function __construct(EncryptedData $encryptedData, array $encryptedKeys);
2526

src/XML/EncryptedElementTrait.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ trait EncryptedElementTrait
4040
* Constructor for encrypted elements.
4141
*
4242
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedData $encryptedData The EncryptedData object.
43-
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedKey[] $encryptedKeys An array of zero or more EncryptedKey objects.
43+
* @param \SimpleSAML\XMLSecurity\XML\xenc\EncryptedKey[] $encryptedKeys
44+
* An array of zero or more EncryptedKey objects.
4445
*/
4546
public function __construct(EncryptedData $encryptedData, array $encryptedKeys)
4647
{
@@ -154,11 +155,16 @@ public static function fromUnencryptedElement(
154155
* @inheritDoc
155156
* @return \SimpleSAML\XMLSecurity\XML\EncryptedElementInterface
156157
*
157-
* @throws \SimpleSAML\XML\Exception\InvalidDOMElementException if the qualified name of the supplied element is wrong
158+
* @throws \SimpleSAML\XML\Exception\InvalidDOMElementException
159+
* If the qualified name of the supplied element is wrong
158160
*/
159161
public static function fromXML(DOMElement $xml): object
160162
{
161-
Assert::same($xml->localName, AbstractXMLElement::getClassName(static::class), InvalidDOMElementException::class);
163+
Assert::same(
164+
$xml->localName,
165+
AbstractXMLElement::getClassName(static::class),
166+
InvalidDOMElementException::class
167+
);
162168
Assert::same($xml->namespaceURI, static::NS, InvalidDOMElementException::class);
163169

164170
$ed = EncryptedData::getChildrenOfClass($xml);

0 commit comments

Comments
 (0)