From 742bed03bd22ea6543e8c40389415d0af34e4145 Mon Sep 17 00:00:00 2001 From: Zvonimir Mance <zvonimir.mance@gmail.com> Date: Mon, 19 Oct 2020 13:12:04 +0200 Subject: [PATCH] Fix accidentally removed line --- lib/SimpleSAML/Metadata/MetaDataStorageHandler.php | 4 ++-- lib/SimpleSAML/Metadata/Sources/MDQ.php | 4 +++- modules/core/lib/Auth/Process/PHP.php | 1 + modules/saml/lib/Auth/Source/SP.php | 2 +- tests/lib/SimpleSAML/Store/RedisTest.php | 1 + 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php index e668914dd..86d944626 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php @@ -295,8 +295,8 @@ class MetaDataStorageHandler implements ClearableState * This function looks up the metadata for the given entity id in the given set. It will throw an * exception if it is unable to locate the metadata. * - * @param string|null $entityId The entity id we are looking up. This parameter may be NULL, in which case we look up - * the current entity id based on the current hostname/path. + * @param string|null $entityId The entity id we are looking up. This parameter may be NULL, + * in which case we look up the current entity id based on the current hostname/path. * @param string $set The set of metadata we are looking up the entity id in. * * @return array The metadata array describing the specified entity. diff --git a/lib/SimpleSAML/Metadata/Sources/MDQ.php b/lib/SimpleSAML/Metadata/Sources/MDQ.php index a972c3ef7..a8ef2956f 100644 --- a/lib/SimpleSAML/Metadata/Sources/MDQ.php +++ b/lib/SimpleSAML/Metadata/Sources/MDQ.php @@ -287,7 +287,9 @@ class MDQ extends \SimpleSAML\Metadata\MetaDataStorageSource $data = self::getParsedSet($entity, $set); if ($data === null) { - throw new \Exception(__CLASS__ . ': no metadata for set "' . $set . '" available from "' . $entityId . '".'); + throw new \Exception( + __CLASS__ . ': no metadata for set "' . $set . '" available from "' . $entityId . '".' + ); } try { diff --git a/modules/core/lib/Auth/Process/PHP.php b/modules/core/lib/Auth/Process/PHP.php index a1dfab414..45b5b4650 100644 --- a/modules/core/lib/Auth/Process/PHP.php +++ b/modules/core/lib/Auth/Process/PHP.php @@ -58,6 +58,7 @@ class PHP extends Auth\ProcessingFilter * @param array &$attributes * @param array &$state */ + $function = function ( /** @scrutinizer ignore-unused */ array &$attributes, /** @scrutinizer ignore-unused */ array &$state ) { diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php index 4a7842d8f..4f633ccc4 100644 --- a/modules/saml/lib/Auth/Source/SP.php +++ b/modules/saml/lib/Auth/Source/SP.php @@ -589,7 +589,7 @@ class SP extends \SimpleSAML\Auth\Source // Otherwise use extensions that might be defined in the local SP (only makes sense in a proxy scenario) if (isset($state['saml:Extensions']) && count($state['saml:Extensions']) > 0) { $ar->setExtensions($state['saml:Extensions']); - } else if ($this->metadata->getArray('saml:Extensions', null) !== null) { + } elseif ($this->metadata->getArray('saml:Extensions', null) !== null) { $ar->setExtensions($this->metadata->getArray('saml:Extensions')); } diff --git a/tests/lib/SimpleSAML/Store/RedisTest.php b/tests/lib/SimpleSAML/Store/RedisTest.php index ede953e3a..069c2435a 100644 --- a/tests/lib/SimpleSAML/Store/RedisTest.php +++ b/tests/lib/SimpleSAML/Store/RedisTest.php @@ -54,6 +54,7 @@ class RedisTest extends TestCase $this->mocked_redis->method('del') ->will($this->returnCallback([$this, 'delMocked'])); + $nop = /** @return void */ function () { return; }; -- GitLab