From 73336e6c0055ff187d7fa5030f6e44f48f25e8b1 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sun, 14 Jul 2019 18:15:34 +0200
Subject: [PATCH] Fix MissingReturnType

---
 tests/BuiltInServer.php                       |  1 -
 tests/SigningTestCase.php                     | 18 +++-
 tests/Utils/ClearStateTestCase.php            | 12 +++
 tests/Utils/ReduceSpillOverTest.php           |  5 +-
 tests/Utils/StateClearer.php                  |  9 +-
 tests/_autoload_modules.php                   |  1 +
 tests/lib/AutoloadModulesTest.php             |  3 +
 tests/lib/SimpleSAML/Auth/SimpleTest.php      |  1 +
 tests/lib/SimpleSAML/Auth/SourceTest.php      | 10 ++-
 tests/lib/SimpleSAML/Auth/StateTest.php       |  1 +
 .../SimpleSAML/Auth/TimeLimitedTokenTest.php  |  5 ++
 tests/lib/SimpleSAML/ConfigurationTest.php    | 85 +++++++++++++++++++
 tests/lib/SimpleSAML/DatabaseTest.php         | 11 +++
 tests/lib/SimpleSAML/Locale/LanguageTest.php  |  8 ++
 .../SimpleSAML/Locale/LocalizationTest.php    |  6 ++
 tests/lib/SimpleSAML/Locale/TranslateTest.php |  4 +-
 .../Metadata/MetaDataStorageHandlerTest.php   |  2 +-
 .../Metadata/MetaDataStorageSourceTest.php    | 12 +++
 .../SimpleSAML/Metadata/SAMLBuilderTest.php   |  7 ++
 .../SimpleSAML/Metadata/SAMLParserTest.php    | 29 +++++++
 tests/lib/SimpleSAML/ModuleTest.php           |  8 ++
 tests/lib/SimpleSAML/Store/RedisTest.php      | 37 ++++++++
 tests/lib/SimpleSAML/Store/SQLTest.php        | 29 +++++++
 tests/lib/SimpleSAML/StoreTest.php            | 12 +++
 tests/lib/SimpleSAML/Utils/ArraysTest.php     |  2 +
 tests/lib/SimpleSAML/Utils/AttributesTest.php | 15 ++++
 .../SimpleSAML/Utils/Config/MetadataTest.php  |  4 +-
 tests/lib/SimpleSAML/Utils/ConfigTest.php     |  7 +-
 tests/lib/SimpleSAML/Utils/CryptoTest.php     | 59 +++++++++++++
 tests/lib/SimpleSAML/Utils/EMailTestCase.php  | 25 +++++-
 tests/lib/SimpleSAML/Utils/HTTPTest.php       | 25 ++++++
 tests/lib/SimpleSAML/Utils/NetTest.php        |  2 +
 tests/lib/SimpleSAML/Utils/RandomTest.php     |  1 +
 tests/lib/SimpleSAML/Utils/SystemTest.php     | 46 +++++++++-
 tests/lib/SimpleSAML/Utils/TimeTest.php       |  3 +
 tests/lib/SimpleSAML/Utils/XMLTest.php        | 41 +++++++++
 tests/lib/SimpleSAML/XML/ErrorsTest.php       |  3 +
 tests/lib/SimpleSAML/XML/ParserTest.php       | 17 +++-
 .../XML/Shib13/AuthnResponseTest.php          | 16 +++-
 tests/lib/SimpleSAML/XML/SignerTest.php       | 34 ++++++++
 tests/lib/SimpleSAML/XML/ValidatorTest.php    | 35 ++++++++
 .../lib/Auth/Process/AttributeAddTest.php     | 17 +++-
 .../lib/Auth/Process/AttributeAlterTest.php   | 28 +++++-
 .../lib/Auth/Process/AttributeCopyTest.php    | 14 +++
 .../lib/Auth/Process/AttributeLimitTest.php   | 42 ++++++++-
 .../lib/Auth/Process/AttributeMapTest.php     | 43 ++++++++++
 .../lib/Auth/Process/AttributeRealmTest.php   | 12 ++-
 .../Auth/Process/AttributeValueMapTest.php    |  8 +-
 .../Auth/Process/CardinalitySingleTest.php    | 21 +++++
 .../core/lib/Auth/Process/CardinalityTest.php | 34 +++++++-
 .../modules/core/lib/Auth/Process/PHPTest.php |  8 ++
 .../lib/Auth/Process/ScopeAttributeTest.php   | 37 +++++---
 .../Auth/Process/ScopeFromAttributeTest.php   | 23 +++--
 .../core/lib/Auth/Process/TargetedIDTest.php  | 18 ++++
 .../core/lib/Auth/UserPassBaseTest.php        | 12 +++
 .../core/lib/Auth/UserPassOrgBaseTest.php     |  3 +
 tests/modules/core/lib/ControllerTest.php     |  9 +-
 .../lib/Storage/SQLPermanentStorageTest.php   | 28 ++++++
 .../lib/Auth/Source/MultiAuthTest.php         | 20 +++++
 .../lib/Auth/Process/FilterScopesTest.php     |  5 +-
 .../lib/Auth/Process/NameIDAttributeTest.php  |  9 +-
 .../lib/Auth/Source/Auth_Source_SP_Test.php   | 45 ++++++++--
 tests/modules/saml/lib/IdP/SAML2Test.php      | 12 ++-
 tests/www/IndexTest.php                       |  6 ++
 tests/www/RouterTest.php                      |  9 +-
 tests/www/TemplateTest.php                    |  3 +
 66 files changed, 1057 insertions(+), 60 deletions(-)

diff --git a/tests/BuiltInServer.php b/tests/BuiltInServer.php
index a121b20d0..1937ca928 100644
--- a/tests/BuiltInServer.php
+++ b/tests/BuiltInServer.php
@@ -13,7 +13,6 @@ use SimpleSAML\Utils\System;
 
 class BuiltInServer
 {
-
     /**
      * The PID of the running server.
      *
diff --git a/tests/SigningTestCase.php b/tests/SigningTestCase.php
index 1c48310d1..5bf95a456 100644
--- a/tests/SigningTestCase.php
+++ b/tests/SigningTestCase.php
@@ -9,6 +9,7 @@
 namespace SimpleSAML\Test;
 
 use PHPUnit\Framework\TestCase;
+use SimpleSAML\Configuration;
 use \org\bovigo\vfs\vfsStream;
 
 class SigningTestCase extends TestCase
@@ -142,6 +143,9 @@ NOWDOC;
     const GOOD_CERTIFICATE = 'good.cert.pem';
 
 
+    /**
+     * @return array
+     */
     public function getCertDirContent()
     {
         return [
@@ -153,6 +157,9 @@ NOWDOC;
     }
 
 
+    /**
+     * @return void
+     */
     public function setUp()
     {
         $this->root = vfsStream::setup(
@@ -176,13 +183,22 @@ NOWDOC;
     }
 
 
+    /**
+     * @return void
+     */
     public function tearDown()
     {
         $this->clearInstance($this->config, '\SimpleSAML\Configuration', []);
     }
 
 
-    protected function clearInstance($service, $className, $value = null)
+    /**
+     * @param \SimpleSAML\Configuration $service
+     * @param string $className
+     * @param mixed|null $value
+     * @return void
+     */
+    protected function clearInstance(Configuration $service, $className, $value = null)
     {
         $reflectedClass = new \ReflectionClass($className);
         $reflectedInstance = $reflectedClass->getProperty('instance');
diff --git a/tests/Utils/ClearStateTestCase.php b/tests/Utils/ClearStateTestCase.php
index d7d11c891..fc713731c 100644
--- a/tests/Utils/ClearStateTestCase.php
+++ b/tests/Utils/ClearStateTestCase.php
@@ -17,6 +17,10 @@ class ClearStateTestCase extends TestCase
      */
     protected static $stateClearer;
 
+
+    /**
+     * @return void
+     */
     public static function setUpBeforeClass()
     {
         if (!self::$stateClearer) {
@@ -26,11 +30,18 @@ class ClearStateTestCase extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         self::clearState();
     }
 
+
+    /**
+     * @return void
+     */
     public static function tearDownAfterClass()
     {
         self::clearState();
@@ -39,6 +50,7 @@ class ClearStateTestCase extends TestCase
 
     /**
      * Clear any SSP global state to reduce spill over between tests.
+     * @return void
      */
     public static function clearState()
     {
diff --git a/tests/Utils/ReduceSpillOverTest.php b/tests/Utils/ReduceSpillOverTest.php
index c744e2a5f..c29360b7b 100644
--- a/tests/Utils/ReduceSpillOverTest.php
+++ b/tests/Utils/ReduceSpillOverTest.php
@@ -8,9 +8,9 @@ namespace SimpleSAML\Test\Utils;
  */
 class ReduceSpillOverTest extends ClearStateTestCase
 {
-
     /**
      * Set some global state
+     * @return void
      */
     public function testSetState()
     {
@@ -20,8 +20,11 @@ class ReduceSpillOverTest extends ClearStateTestCase
         putenv('SIMPLESAMLPHP_CONFIG_DIR='.__DIR__);
     }
 
+
     /**
      * Confirm global state removed prior to next test
+     * @return void
+     * @throws \SimpleSAML\Error\ConfigurationError
      */
     public function testStateRemoved()
     {
diff --git a/tests/Utils/StateClearer.php b/tests/Utils/StateClearer.php
index 9472ef199..56412bcf5 100644
--- a/tests/Utils/StateClearer.php
+++ b/tests/Utils/StateClearer.php
@@ -7,7 +7,6 @@ namespace SimpleSAML\Test\Utils;
  */
 class StateClearer
 {
-
     /**
      * Global state to restore between test runs
      * @var array
@@ -26,6 +25,10 @@ class StateClearer
      */
     private $vars_to_unset = ['SIMPLESAMLPHP_CONFIG_DIR'];
 
+
+    /**
+     * @return void
+     */
     public function backupGlobals()
     {
         // Backup any state that is needed as part of processing, so we can restore it later.
@@ -43,6 +46,7 @@ class StateClearer
 
     /**
      * Clear any global state.
+     * @return void
      */
     public function clearGlobals()
     {
@@ -60,12 +64,13 @@ class StateClearer
         }
     }
 
+
     /**
      * Clear any SSP specific state, such as SSP enviormental variables or cached internals.
+     * @return void
      */
     public function clearSSPState()
     {
-
         foreach ($this->clearableState as $var) {
             $var::clearInternalState();
         }
diff --git a/tests/_autoload_modules.php b/tests/_autoload_modules.php
index 4819d743a..8b1da33e7 100644
--- a/tests/_autoload_modules.php
+++ b/tests/_autoload_modules.php
@@ -8,6 +8,7 @@
  * Module test classes have namespaces like SimpleSAML\Test\Module\<moduleName>\Auth\Process
  *
  * @param string $className Name of the class.
+ * @return void
  */
 function sspmodTestClassAutoloadPSR4($className)
 {
diff --git a/tests/lib/AutoloadModulesTest.php b/tests/lib/AutoloadModulesTest.php
index 4520b9e61..c136ea5ea 100644
--- a/tests/lib/AutoloadModulesTest.php
+++ b/tests/lib/AutoloadModulesTest.php
@@ -9,6 +9,7 @@ class AutoloadModulesTest extends TestCase
 {
     /**
      * Set up for each test.
+     * @return void
      */
     protected function setUp()
     {
@@ -19,6 +20,7 @@ class AutoloadModulesTest extends TestCase
     /**
      * @test
      * @runInSeparateProcess
+     * @return void
      */
     public function autoloaderDoesNotRecurseInfinitely()
     {
@@ -27,6 +29,7 @@ class AutoloadModulesTest extends TestCase
 
     /**
      * @test
+     * @return void
      */
     public function autoloaderSubstitutesNamespacedXmlSecClassesWhereNonNamespacedClassWasUsed()
     {
diff --git a/tests/lib/SimpleSAML/Auth/SimpleTest.php b/tests/lib/SimpleSAML/Auth/SimpleTest.php
index 7d667ab46..7e5799634 100644
--- a/tests/lib/SimpleSAML/Auth/SimpleTest.php
+++ b/tests/lib/SimpleSAML/Auth/SimpleTest.php
@@ -10,6 +10,7 @@ class SimpleTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 {
     /**
      * @test
+     * @return void
      */
     public function testGetProcessedURL()
     {
diff --git a/tests/lib/SimpleSAML/Auth/SourceTest.php b/tests/lib/SimpleSAML/Auth/SourceTest.php
index e51781d72..57585ec83 100644
--- a/tests/lib/SimpleSAML/Auth/SourceTest.php
+++ b/tests/lib/SimpleSAML/Auth/SourceTest.php
@@ -8,9 +8,11 @@ use SimpleSAML\Test\Utils\ClearStateTestCase;
 /**
  * Tests for \SimpleSAML\Auth\Source
  */
-
 class SourceTest extends ClearStateTestCase
 {
+    /**
+     * @return void
+     */
     public function testParseAuthSource()
     {
         $class = new \ReflectionClass('\SimpleSAML\Auth\Source');
@@ -29,6 +31,9 @@ class SourceTest extends ClearStateTestCase
 
 class TestAuthSource extends \SimpleSAML\Auth\Source
 {
+    /**
+     * @return void
+     */
     public function authenticate(&$state)
     {
     }
@@ -36,6 +41,9 @@ class TestAuthSource extends \SimpleSAML\Auth\Source
 
 class TestAuthSourceFactory implements SourceFactory
 {
+    /**
+     * @return \SimpleSAML\Test\Auth\TestAuthSource
+     */
     public function create(array $info, array $config)
     {
         return new TestAuthSource($info, $config);
diff --git a/tests/lib/SimpleSAML/Auth/StateTest.php b/tests/lib/SimpleSAML/Auth/StateTest.php
index cb78b8119..38d805862 100644
--- a/tests/lib/SimpleSAML/Auth/StateTest.php
+++ b/tests/lib/SimpleSAML/Auth/StateTest.php
@@ -11,6 +11,7 @@ class StateTest extends TestCase
 {
     /**
      * Test the getPersistentAuthData() function.
+     * @return void
      */
     public function testGetPersistentAuthData()
     {
diff --git a/tests/lib/SimpleSAML/Auth/TimeLimitedTokenTest.php b/tests/lib/SimpleSAML/Auth/TimeLimitedTokenTest.php
index 710d3c2d3..ec7891f44 100644
--- a/tests/lib/SimpleSAML/Auth/TimeLimitedTokenTest.php
+++ b/tests/lib/SimpleSAML/Auth/TimeLimitedTokenTest.php
@@ -8,6 +8,7 @@ class TimeLimitedTokenTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 {
     /**
      * Test for malformed tokens.
+     * @return void
      */
     public function testMalformedToken()
     {
@@ -22,6 +23,7 @@ class TimeLimitedTokenTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Basic test to see if validation works for valid tokens.
+     * @return void
      */
     public function testValidToken()
     {
@@ -35,6 +37,7 @@ class TimeLimitedTokenTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test that token validation takes the verification data into account.
+     * @return void
      */
     public function testValidTokenWithData()
     {
@@ -52,6 +55,7 @@ class TimeLimitedTokenTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test that expired tokens are rejected.
+     * @return void
      */
     public function testExpiredToken()
     {
@@ -64,6 +68,7 @@ class TimeLimitedTokenTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test that a token that has been manipulated to extend its validity is rejected.
+     * @return void
      */
     public function testManipulatedToken()
     {
diff --git a/tests/lib/SimpleSAML/ConfigurationTest.php b/tests/lib/SimpleSAML/ConfigurationTest.php
index 6b5d507bf..0fde35e9f 100644
--- a/tests/lib/SimpleSAML/ConfigurationTest.php
+++ b/tests/lib/SimpleSAML/ConfigurationTest.php
@@ -12,6 +12,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 {
     /**
      * Test \SimpleSAML\Configuration::getVersion()
+     * @return void
      */
     public function testGetVersion()
     {
@@ -19,8 +20,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertTrue(is_string($c->getVersion()));
     }
 
+
     /**
      * Test that the default instance fails to load even if we previously loaded another instance.
+     * @return void
      */
     public function testLoadDefaultInstance()
     {
@@ -33,6 +36,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
     /**
      * Test that after a \SimpleSAML\Error\CriticalConfigurationError exception, a basic, self-survival configuration
      * is loaded.
+     * @return void
      */
     public function testCriticalConfigurationError()
     {
@@ -50,8 +54,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertNotEmpty($c->toArray());
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getValue()
+     * @return void
      */
     public function testGetValue()
     {
@@ -69,8 +75,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getValue('exists_null', false), null);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getValue(), REQUIRED_OPTION flag.
+     * @return void
      */
     public function testGetValueRequired()
     {
@@ -79,8 +87,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getValue('missing', Configuration::REQUIRED_OPTION);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::hasValue()
+     * @return void
      */
     public function testHasValue()
     {
@@ -93,8 +103,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->hasValue('exists_null'), true);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::hasValue()
+     * @return void
      */
     public function testHasValueOneOf()
     {
@@ -112,8 +124,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->hasValueOneOf(['missing', 'exists_true']), true);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getBasePath()
+     * @return void
      */
     public function testGetBasePath()
     {
@@ -169,8 +183,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getBasePath(), '/');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::resolvePath()
+     * @return void
      */
     public function testResolvePath()
     {
@@ -189,8 +205,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->resolvePath('C:/otherdir'), 'C:/otherdir');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getPathValue()
+     * @return void
      */
     public function testGetPathValue()
     {
@@ -205,8 +223,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getPathValue('slashes_opt'), '/basedir/slashes/');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getBaseDir()
+     * @return void
      */
     public function testGetBaseDir()
     {
@@ -224,8 +244,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getBaseDir(), DIRECTORY_SEPARATOR.'basedir'.DIRECTORY_SEPARATOR);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getBoolean()
+     * @return void
      */
     public function testGetBoolean()
     {
@@ -238,8 +260,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getBoolean('false_opt', '--missing--'), false);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getBoolean() missing option
+     * @return void
      */
     public function testGetBooleanMissing()
     {
@@ -248,8 +272,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getBoolean('missing_opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getBoolean() wrong option
+     * @return void
      */
     public function testGetBooleanWrong()
     {
@@ -260,8 +286,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getBoolean('wrong');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getString()
+     * @return void
      */
     public function testGetString()
     {
@@ -272,8 +300,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getString('str_opt', '--missing--'), 'Hello World!');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getString() missing option
+     * @return void
      */
     public function testGetStringMissing()
     {
@@ -282,8 +312,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getString('missing_opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getString() wrong option
+     * @return void
      */
     public function testGetStringWrong()
     {
@@ -294,8 +326,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getString('wrong');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getInteger()
+     * @return void
      */
     public function testGetInteger()
     {
@@ -306,8 +340,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getInteger('int_opt', '--missing--'), 42);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getInteger() missing option
+     * @return void
      */
     public function testGetIntegerMissing()
     {
@@ -316,8 +352,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getInteger('missing_opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getInteger() wrong option
+     * @return void
      */
     public function testGetIntegerWrong()
     {
@@ -328,8 +366,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getInteger('wrong');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getIntegerRange()
+     * @return void
      */
     public function testGetIntegerRange()
     {
@@ -340,8 +380,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getIntegerRange('int_opt', 0, 100), 42);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getIntegerRange() below limit
+     * @return void
      */
     public function testGetIntegerRangeBelow()
     {
@@ -352,8 +394,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getIntegerRange('int_opt', 10, 100), 42);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getIntegerRange() above limit
+     * @return void
      */
     public function testGetIntegerRangeAbove()
     {
@@ -364,8 +408,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getIntegerRange('int_opt', 10, 100), 42);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getValueValidate()
+     * @return void
      */
     public function testGetValueValidate()
     {
@@ -376,8 +422,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getValueValidate('opt', ['a', 'b', 'c']), 'b');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getValueValidate() wrong option
+     * @return void
      */
     public function testGetValueValidateWrong()
     {
@@ -388,8 +436,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getValueValidate('opt', ['a', 'b', 'c']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getArray()
+     * @return void
      */
     public function testGetArray()
     {
@@ -400,8 +450,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getArray('opt'), ['a', 'b', 'c']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getArray() wrong option
+     * @return void
      */
     public function testGetArrayWrong()
     {
@@ -412,8 +464,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getArray('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getArrayize()
+     * @return void
      */
     public function testGetArrayize()
     {
@@ -428,8 +482,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getArrayize('opt_str'), ['string']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getArrayizeString()
+     * @return void
      */
     public function testGetArrayizeString()
     {
@@ -442,9 +498,11 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getArrayizeString('opt_str'), ['string']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getArrayizeString() option
      * with an array that contains something that isn't a string.
+     * @return void
      */
     public function testGetArrayizeStringWrongValue()
     {
@@ -455,8 +513,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getArrayizeString('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfigItem()
+     * @return void
      */
     public function testGetConfigItem()
     {
@@ -469,8 +529,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($opt->getValue('a'), 42);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfigItem() wrong option
+     * @return void
      */
     public function testGetConfigItemWrong()
     {
@@ -481,8 +543,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getConfigItem('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfigList()
+     * @return void
      */
     public function testGetConfigList()
     {
@@ -502,8 +566,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($opts['b']->getValue('opt2'), 'value2');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfigList() wrong option
+     * @return void
      */
     public function testGetConfigListWrong()
     {
@@ -517,6 +583,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test \SimpleSAML\Configuration::getConfigList() with an array of wrong options.
+     * @return void
      */
     public function testGetConfigListWrongArrayValues()
     {
@@ -533,6 +600,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test \SimpleSAML\Configuration::getOptions()
+     * @return void
      */
     public function testGetOptions()
     {
@@ -543,8 +611,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getOptions(), ['a', 'b']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::toArray()
+     * @return void
      */
     public function testToArray()
     {
@@ -560,6 +630,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
      * Test \SimpleSAML\Configuration::getDefaultEndpoint().
      *
      * Iterate over all different valid definitions of endpoints and check if the expected output is produced.
+     * @return void
      */
     public function testGetDefaultEndpoint()
     {
@@ -775,6 +846,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test \SimpleSAML\Configuration::getEndpoints().
+     * @return void
      */
     public function testGetEndpoints()
     {
@@ -879,6 +951,7 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
 
     /**
      * Test \SimpleSAML\Configuration::getLocalizedString()
+     * @return void
      */
     public function testGetLocalizedString()
     {
@@ -894,8 +967,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals($c->getLocalizedString('str_array'), ['en' => 'Hello World!', 'no' => 'Hei Verden!']);
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getLocalizedString() not array nor simple string
+     * @return void
      */
     public function testGetLocalizedStringNotArray()
     {
@@ -906,8 +981,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getLocalizedString('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getLocalizedString() not string key
+     * @return void
      */
     public function testGetLocalizedStringNotStringKey()
     {
@@ -918,8 +995,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getLocalizedString('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getLocalizedString() not string value
+     * @return void
      */
     public function testGetLocalizedStringNotStringValue()
     {
@@ -930,8 +1009,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $c->getLocalizedString('opt');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfig() nonexistent file
+     * @return void
      */
     public function testGetConfigNonexistentFile()
     {
@@ -939,8 +1020,10 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         Configuration::getConfig('nonexistent-nopreload.php');
     }
 
+
     /**
      * Test \SimpleSAML\Configuration::getConfig() preloaded nonexistent file
+     * @return void
      */
     public function testGetConfigNonexistentFilePreload()
     {
@@ -953,10 +1036,12 @@ class ConfigurationTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals('value', $nc->getValue('key', null));
     }
 
+
     /**
      * Test that Configuration objects can be initialized from an array.
      *
      * ATTENTION: this test must be kept the last.
+     * @return void
      */
     public function testLoadInstanceFromArray()
     {
diff --git a/tests/lib/SimpleSAML/DatabaseTest.php b/tests/lib/SimpleSAML/DatabaseTest.php
index 444e9be26..6ba5c9bf6 100644
--- a/tests/lib/SimpleSAML/DatabaseTest.php
+++ b/tests/lib/SimpleSAML/DatabaseTest.php
@@ -49,6 +49,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::generateInstanceId
      * @covers SimpleSAML\Database::__construct
      * @covers SimpleSAML\Database::connect
+     * @return void
      */
     public function setUp()
     {
@@ -80,6 +81,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::__construct
      * @covers SimpleSAML\Database::connect
      * @test
+     * @return void
      */
     public function connectionFailure()
     {
@@ -104,6 +106,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::__construct
      * @covers SimpleSAML\Database::connect
      * @test
+     * @return void
      */
     public function instances()
     {
@@ -173,6 +176,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::connect
      * @covers SimpleSAML\Database::getSlave
      * @test
+     * @return void
      */
     public function slaves()
     {
@@ -215,6 +219,7 @@ class DatabaseTest extends TestCase
     /**
      * @covers SimpleSAML\Database::applyPrefix
      * @test
+     * @return void
      */
     public function prefix()
     {
@@ -232,6 +237,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::exec
      * @covers SimpleSAML\Database::query
      * @test
+     * @return void
      */
     public function querying()
     {
@@ -264,6 +270,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::read
      * @covers SimpleSAML\Database::query
      * @test
+     * @return void
      */
     public function readFailure()
     {
@@ -279,6 +286,7 @@ class DatabaseTest extends TestCase
      * @covers SimpleSAML\Database::write
      * @covers SimpleSAML\Database::exec
      * @test
+     * @return void
      */
     public function noSuchTable()
     {
@@ -287,6 +295,9 @@ class DatabaseTest extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     public function tearDown()
     {
         $table = $this->db->applyPrefix("sspdbt");
diff --git a/tests/lib/SimpleSAML/Locale/LanguageTest.php b/tests/lib/SimpleSAML/Locale/LanguageTest.php
index 708d6b60c..66b137b95 100644
--- a/tests/lib/SimpleSAML/Locale/LanguageTest.php
+++ b/tests/lib/SimpleSAML/Locale/LanguageTest.php
@@ -10,6 +10,7 @@ class LanguageTest extends TestCase
 {
     /**
      * Test SimpleSAML\Locale\Language::getDefaultLanguage().
+     * @return void
      */
     public function testGetDefaultLanguage()
     {
@@ -30,6 +31,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::getLanguageCookie().
+     * @return void
      */
     public function testGetLanguageCookie()
     {
@@ -54,6 +56,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::getLanguageList().
+     * @return void
      */
     public function testGetLanguageListNoConfig()
     {
@@ -67,6 +70,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::getLanguageList().
+     * @return void
      */
     public function testGetLanguageListCorrectConfig()
     {
@@ -86,6 +90,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::getLanguageList().
+     * @return void
      */
     public function testGetLanguageListIncorrectConfig()
     {
@@ -101,6 +106,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::getLanguageParameterName().
+     * @return void
      */
     public function testGetLanguageParameterName()
     {
@@ -120,6 +126,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::isLanguageRTL().
+     * @return void
      */
     public function testIsLanguageRTL()
     {
@@ -150,6 +157,7 @@ class LanguageTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Language::setLanguage().
+     * @return void
      */
     public function testSetLanguage()
     {
diff --git a/tests/lib/SimpleSAML/Locale/LocalizationTest.php b/tests/lib/SimpleSAML/Locale/LocalizationTest.php
index ceeb823fb..bfc55457f 100644
--- a/tests/lib/SimpleSAML/Locale/LocalizationTest.php
+++ b/tests/lib/SimpleSAML/Locale/LocalizationTest.php
@@ -8,6 +8,9 @@ use \SimpleSAML\Configuration;
 
 class LocalizationTest extends TestCase
 {
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         // Localization/Language code attempts to load a cookie, and looks in the config for a name of the cookie
@@ -17,6 +20,7 @@ class LocalizationTest extends TestCase
 
     /**
      * Test SimpleSAML\Locale\Localization().
+     * @return void
      */
     public function testLocalization()
     {
@@ -29,8 +33,10 @@ class LocalizationTest extends TestCase
         $this->assertEquals(Localization::DEFAULT_DOMAIN, 'messages');
     }
 
+
     /**
      * Test SimpleSAML\Locale\Localization::activateDomain().
+     * @return void
      */
     public function testAddDomain()
     {
diff --git a/tests/lib/SimpleSAML/Locale/TranslateTest.php b/tests/lib/SimpleSAML/Locale/TranslateTest.php
index b1266df42..c8d47718e 100644
--- a/tests/lib/SimpleSAML/Locale/TranslateTest.php
+++ b/tests/lib/SimpleSAML/Locale/TranslateTest.php
@@ -7,9 +7,9 @@ use SimpleSAML\Locale\Translate;
 
 class TranslateTest extends TestCase
 {
-
     /**
      * Test SimpleSAML\Locale\Translate::noop().
+     * @return void
      */
     public function testNoop()
     {
@@ -20,8 +20,10 @@ class TranslateTest extends TestCase
         $this->assertEquals($testString, $t->noop($testString));
     }
 
+
     /**
      * Test SimpleSAML\Locale\Translate::t().
+     * @return void
      */
     public function testTFallback()
     {
diff --git a/tests/lib/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php b/tests/lib/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php
index d54c5c8e5..0221b972e 100644
--- a/tests/lib/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php
+++ b/tests/lib/SimpleSAML/Metadata/MetaDataStorageHandlerTest.php
@@ -8,9 +8,9 @@ use SimpleSAML\Test\Utils\ClearStateTestCase;
 
 class MetaDataStorageHandlerTest extends ClearStateTestCase
 {
-
     /**
      * Test that loading specific entities works, and that metadata source precedence is followed
+     * @return void
      */
     public function testLoadEntities()
     {
diff --git a/tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php b/tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php
index 372e6f944..45e57c5ff 100644
--- a/tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php
+++ b/tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php
@@ -12,6 +12,7 @@ class MetaDataStorageSourceTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Test \SimpleSAML\Metadata\MetaDataStorageSourceTest::getConfig XML bad source
+     * @return void
      */
     public function testBadXMLSource()
     {
@@ -19,8 +20,10 @@ class MetaDataStorageSourceTest extends \PHPUnit\Framework\TestCase
         \SimpleSAML\Metadata\MetaDataStorageSource::getSource(["type"=>"xml", "foo"=>"baa"]);
     }
 
+
     /**
      * Test \SimpleSAML\Metadata\MetaDataStorageSourceTest::getConfig invalid static XML source
+     * @return void
      */
     public function testInvalidStaticXMLSource()
     {
@@ -32,8 +35,10 @@ class MetaDataStorageSourceTest extends \PHPUnit\Framework\TestCase
         \SimpleSAML\Metadata\MetaDataStorageSource::getSource(["type"=>"xml", "xml"=>$strTestXML]);
     }
 
+
     /**
      * Test \SimpleSAML\Metadata\MetaDataStorageSourceTest::getConfig XML static XML source
+     * @return void
      */
     public function testStaticXMLSource()
     {
@@ -48,8 +53,10 @@ class MetaDataStorageSourceTest extends \PHPUnit\Framework\TestCase
         $this->assertCount(1, $idpSet, "Unexpectedly got metadata for an alternate entity than that defined");
     }
 
+
     /**
      * Test loading multiple entities
+     * @return void
      */
     public function testLoadEntitiesStaticXMLSource()
     {
@@ -82,6 +89,11 @@ class MetaDataStorageSourceTest extends \PHPUnit\Framework\TestCase
         $this->assertCount(0, $entities, 'no matches expected');
     }
 
+
+    /**
+     * @param string $entityId
+     * @return string
+     */
     public static function generateIdpMetadataXml($entityId)
     {
         return "
diff --git a/tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php b/tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php
index 008a26063..04d471791 100644
--- a/tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php
+++ b/tests/lib/SimpleSAML/Metadata/SAMLBuilderTest.php
@@ -13,6 +13,7 @@ class SAMLBuilderTest extends TestCase
 {
     /**
      * Test the requested attributes are valued correctly.
+     * @return void
      */
     public function testAttributes()
     {
@@ -139,8 +140,10 @@ class SAMLBuilderTest extends TestCase
         }
     }
 
+
     /**
      * Test the working of the isDefault config option
+     * @return void
      */
     public function testAttributeConsumingServiceDefault()
     {
@@ -186,8 +189,10 @@ class SAMLBuilderTest extends TestCase
         $this->assertEquals("false", $acs1->getAttribute("isDefault"));
     }
 
+
     /**
      * Test the index option is used correctly.
+     * @return void
      */
     public function testAttributeConsumingServiceIndex()
     {
@@ -225,8 +230,10 @@ class SAMLBuilderTest extends TestCase
         $this->assertEquals("15", $acs1->getAttribute("index"));
     }
 
+
     /**
      * Test the required protocolSupportEnumeration in AttributeAuthorityDescriptor
+     * @return void
      */
     public function testProtocolSupportEnumeration()
     {
diff --git a/tests/lib/SimpleSAML/Metadata/SAMLParserTest.php b/tests/lib/SimpleSAML/Metadata/SAMLParserTest.php
index 9490336ec..d7e6ef153 100644
--- a/tests/lib/SimpleSAML/Metadata/SAMLParserTest.php
+++ b/tests/lib/SimpleSAML/Metadata/SAMLParserTest.php
@@ -16,6 +16,7 @@ class SAMLParserTest extends \SimpleSAML\Test\SigningTestCase
 {
     /**
      * Test Registration Info is parsed
+     * @return void
      */
     public function testRegistrationInfo()
     {
@@ -44,9 +45,11 @@ XML
         $this->assertEquals($expected, $metadata['RegistrationInfo']);
     }
 
+
     /**
      * Test RegistrationInfo is inherited correctly from parent EntitiesDescriptor.
      * According to the spec overriding RegistrationInfo is not valid. We ignore attempts to override
+     * @return void
      */
     public function testRegistrationInfoInheritance()
     {
@@ -92,8 +95,10 @@ XML
         $this->assertEquals($expected, $metadata['RegistrationInfo']);
     }
 
+
     /**
      * Test AttributeConsumingService is parsed
+     * @return void
      */
     public function testAttributeConsumingServiceParsing()
     {
@@ -140,6 +145,9 @@ XML
     }
 
 
+    /**
+     * @return \DOMDocument
+     */
     public function makeTestDocument()
     {
         $doc = new \DOMDocument();
@@ -163,6 +171,10 @@ XML
         return $doc;
     }
 
+
+    /**
+     * @return void
+     */
     public function _testValidateFingerprint($algo, $expected_fingerprint)
     {
         $doc = $this->makeTestDocument();
@@ -175,6 +187,9 @@ XML
     }
 
 
+    /**
+     * @return void
+     */
     public function testValidateFingerprintSHA1()
     {
         $this->_testValidateFingerprint(
@@ -184,6 +199,9 @@ XML
     }
 
 
+    /**
+     * @return void
+     */
     public function testValidateFingerprintSHA256()
     {
         $this->_testValidateFingerprint(
@@ -194,6 +212,9 @@ XML
     }
 
 
+    /**
+     * @return void
+     */
     public function testValidateFingerprintSHA384()
     {
         $this->_testValidateFingerprint(
@@ -205,6 +226,9 @@ XML
     }
 
 
+    /**
+     * @return void
+     */
     public function testValidateFingerprintSHA512()
     {
         $this->_testValidateFingerprint(
@@ -216,6 +240,9 @@ XML
     }
 
 
+    /**
+     * @return void
+     */
     public function testValidateFingerprintUnknownAlgorithmThrows()
     {
         $doc = $this->makeTestDocument();
@@ -236,8 +263,10 @@ XML
         }
     }
 
+
     /**
      * Test RoleDescriptor/Extensions is parsed
+     * @return void
      */
     public function testRoleDescriptorExtensions()
     {
diff --git a/tests/lib/SimpleSAML/ModuleTest.php b/tests/lib/SimpleSAML/ModuleTest.php
index 228ab0aed..fa5782849 100644
--- a/tests/lib/SimpleSAML/ModuleTest.php
+++ b/tests/lib/SimpleSAML/ModuleTest.php
@@ -9,6 +9,7 @@ class ModuleTest extends TestCase
 {
     /**
      * Test for SimpleSAML\Module::isModuleEnabled().
+     * @return void
      */
     public function testIsModuleEnabled()
     {
@@ -19,6 +20,7 @@ class ModuleTest extends TestCase
 
     /**
      * Test for SimpleSAML\Module::getModuleDir().
+     * @return void
      */
     public function testGetModuleDir()
     {
@@ -32,6 +34,7 @@ class ModuleTest extends TestCase
 
     /**
      * Test for SimpleSAML\Module::getModuleURL().
+     * @return void
      */
     public function testGetModuleURL()
     {
@@ -54,6 +57,7 @@ class ModuleTest extends TestCase
 
     /**
      * Test for SimpleSAML\Module::getModules().
+     * @return void
      */
     public function testGetModules()
     {
@@ -65,6 +69,7 @@ class ModuleTest extends TestCase
      * Test for SimpleSAML\Module::resolveClass(). It will make sure that an exception is thrown if we are not asking
      * for a class inside a module (that is, there is no colon separating the name of the module and the name of the
      * class).
+     * @return void
      */
     public function testResolveClassNoModule()
     {
@@ -76,6 +81,7 @@ class ModuleTest extends TestCase
     /**
      * Test for SimpleSAML\Module::resolveClass(). It will make sure that an exception is thrown if the class we are
      * asking for cannot be found.
+     * @return void
      */
     public function testResolveClassNotFound()
     {
@@ -87,6 +93,7 @@ class ModuleTest extends TestCase
     /**
      * Test for SimpleSAML\Module::resolveClass(). It will make sure that an exception is thrown if the class we are
      * asking for can be resolved, but does not extend a given class.
+     * @return void
      */
     public function testResolveClassNotSubclass()
     {
@@ -97,6 +104,7 @@ class ModuleTest extends TestCase
 
     /**
      * Test for SimpleSAML\Module::resolveClass(). It covers all the valid use cases.
+     * @return void
      */
     public function tesstResolveClass()
     {
diff --git a/tests/lib/SimpleSAML/Store/RedisTest.php b/tests/lib/SimpleSAML/Store/RedisTest.php
index b1e8cc0e0..cc59a69b7 100644
--- a/tests/lib/SimpleSAML/Store/RedisTest.php
+++ b/tests/lib/SimpleSAML/Store/RedisTest.php
@@ -16,6 +16,9 @@ use \SimpleSAML\Store;
  */
 class RedisTest extends TestCase
 {
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         $this->config = [];
@@ -47,31 +50,49 @@ class RedisTest extends TestCase
         $this->redis = new Store\Redis($this->mocked_redis);
     }
 
+
+    /**
+     * @return \Predis\Client 
+     */
     public function getMocked($key)
     {
         return array_key_exists($key, $this->config) ? $this->config[$key] : null;
     }
 
+
+    /**
+     * @return void
+     */
     public function setMocked($key, $value)
     {
         $this->config[$key] = $value;
     }
 
+
+    /**
+     * @return void
+     */
     public function setexMocked($key, $expire, $value)
     {
         // Testing expiring data is more trouble than it's worth for now
         $this->setMocked($key, $value);
     }
 
+
+    /**
+     * @return void
+     */
     public function delMocked($key)
     {
         unset($this->config[$key]);
     }
 
+
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @covers \SimpleSAML\Store\Redis::__construct
      * @test
+     * @return void
      */
     public function testRedisInstance()
     {
@@ -88,10 +109,12 @@ class RedisTest extends TestCase
         $this->clearInstance($store, '\SimpleSAML\Store');
     }
 
+
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @covers \SimpleSAML\Store\Redis::__construct
      * @test
+     * @return void
      */
     public function testRedisInstanceWithPassword()
     {
@@ -109,10 +132,12 @@ class RedisTest extends TestCase
         $this->clearInstance($store, '\SimpleSAML\Store');
     }
 
+
     /**
      * @covers \SimpleSAML\Store\Redis::get
      * @covers \SimpleSAML\Store\Redis::set
      * @test
+     * @return void
      */
     public function testInsertData()
     {
@@ -125,10 +150,12 @@ class RedisTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\Redis::get
      * @covers \SimpleSAML\Store\Redis::set
      * @test
+     * @return void
      */
     public function testInsertExpiringData()
     {
@@ -141,9 +168,11 @@ class RedisTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\Redis::get
      * @test
+     * @return void
      */
     public function testGetEmptyData()
     {
@@ -152,10 +181,12 @@ class RedisTest extends TestCase
         $this->assertNull($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\Redis::get
      * @covers \SimpleSAML\Store\Redis::set
      * @test
+     * @return void
      */
     public function testOverwriteData()
     {
@@ -170,11 +201,13 @@ class RedisTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\Redis::get
      * @covers \SimpleSAML\Store\Redis::set
      * @covers \SimpleSAML\Store\Redis::delete
      * @test
+     * @return void
      */
     public function testDeleteData()
     {
@@ -185,6 +218,10 @@ class RedisTest extends TestCase
         $this->assertNull($res);
     }
 
+
+    /**
+     * @return void
+     */
     protected function clearInstance($service, $className)
     {
         $reflectedClass = new \ReflectionClass($className);
diff --git a/tests/lib/SimpleSAML/Store/SQLTest.php b/tests/lib/SimpleSAML/Store/SQLTest.php
index cda9dc290..f9545575c 100644
--- a/tests/lib/SimpleSAML/Store/SQLTest.php
+++ b/tests/lib/SimpleSAML/Store/SQLTest.php
@@ -17,6 +17,9 @@ use \SimpleSAML\Store;
  */
 class SQLTest extends TestCase
 {
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         Configuration::loadFromArray([
@@ -26,10 +29,12 @@ class SQLTest extends TestCase
         ], '[ARRAY]', 'simplesaml');
     }
 
+
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @covers \SimpleSAML\Store\SQL::__construct
      * @test
+     * @return void
      */
     public function SQLInstance()
     {
@@ -38,10 +43,12 @@ class SQLTest extends TestCase
         $this->assertInstanceOf('SimpleSAML\Store\SQL', $store);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::initTableVersionTable
      * @covers \SimpleSAML\Store\SQL::initKVTable
      * @test
+     * @return void
      */
     public function kvstoreTableVersion()
     {
@@ -53,9 +60,11 @@ class SQLTest extends TestCase
         $this->assertEquals(2, $version);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::getTableVersion
      * @test
+     * @return void
      */
     public function newTableVersion()
     {
@@ -67,10 +76,12 @@ class SQLTest extends TestCase
         $this->assertEquals(0, $version);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::setTableVersion
      * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
+     * @return void
      */
     public function testSetTableVersion()
     {
@@ -83,9 +94,11 @@ class SQLTest extends TestCase
         $this->assertEquals(2, $version);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::get
      * @test
+     * @return void
      */
     public function testGetEmptyData()
     {
@@ -97,11 +110,13 @@ class SQLTest extends TestCase
         $this->assertNull($value);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::get
      * @covers \SimpleSAML\Store\SQL::set
      * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
+     * @return void
      */
     public function testInsertData()
     {
@@ -114,11 +129,13 @@ class SQLTest extends TestCase
         $this->assertEquals('bar', $value);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::get
      * @covers \SimpleSAML\Store\SQL::set
      * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @test
+     * @return void
      */
     public function testOverwriteData()
     {
@@ -132,12 +149,14 @@ class SQLTest extends TestCase
         $this->assertEquals('baz', $value);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::get
      * @covers \SimpleSAML\Store\SQL::set
      * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @covers \SimpleSAML\Store\SQL::delete
      * @test
+     * @return void
      */
     public function testDeleteData()
     {
@@ -151,12 +170,14 @@ class SQLTest extends TestCase
         $this->assertNull($value);
     }
 
+
     /**
      * @covers \SimpleSAML\Store\SQL::get
      * @covers \SimpleSAML\Store\SQL::set
      * @covers \SimpleSAML\Store\SQL::insertOrUpdate
      * @covers \SimpleSAML\Store\SQL::delete
      * @test
+     * @return void
      */
     public function testVeryLongKey()
     {
@@ -171,6 +192,10 @@ class SQLTest extends TestCase
         $this->assertNull($value);
     }
 
+
+    /**
+     * @return void
+     */
     protected function tearDown()
     {
         $config = Configuration::getInstance();
@@ -180,6 +205,10 @@ class SQLTest extends TestCase
         $this->clearInstance($store, '\SimpleSAML\Store');
     }
 
+
+    /**
+     * @return void
+     */
     protected function clearInstance($service, $className)
     {
         $reflectedClass = new \ReflectionClass($className);
diff --git a/tests/lib/SimpleSAML/StoreTest.php b/tests/lib/SimpleSAML/StoreTest.php
index 4c54e574f..0b12b9657 100644
--- a/tests/lib/SimpleSAML/StoreTest.php
+++ b/tests/lib/SimpleSAML/StoreTest.php
@@ -22,6 +22,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function defaultStore()
     {
@@ -37,6 +38,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function phpSessionStore()
     {
@@ -52,6 +54,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function memcacheStore()
     {
@@ -68,6 +71,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function sqlStore()
     {
@@ -86,6 +90,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function pathStore()
     {
@@ -104,6 +109,7 @@ class StoreTest extends TestCase
     /**
      * @covers \SimpleSAML\Store::getInstance
      * @test
+     * @return void
      */
     public function notFoundStoreException()
     {
@@ -118,6 +124,9 @@ class StoreTest extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     protected function tearDown()
     {
         $config = Configuration::getInstance();
@@ -128,6 +137,9 @@ class StoreTest extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     protected function clearInstance($service, $className)
     {
         $reflectedClass = new \ReflectionClass($className);
diff --git a/tests/lib/SimpleSAML/Utils/ArraysTest.php b/tests/lib/SimpleSAML/Utils/ArraysTest.php
index eb3d1b668..9d103d320 100644
--- a/tests/lib/SimpleSAML/Utils/ArraysTest.php
+++ b/tests/lib/SimpleSAML/Utils/ArraysTest.php
@@ -12,6 +12,7 @@ class ArraysTest extends TestCase
 {
     /**
      * Test the arrayize() function.
+     * @return void
      */
     public function testArrayize()
     {
@@ -39,6 +40,7 @@ class ArraysTest extends TestCase
 
     /**
      * Test the transpose() function.
+     * @return void
      */
     public function testTranspose()
     {
diff --git a/tests/lib/SimpleSAML/Utils/AttributesTest.php b/tests/lib/SimpleSAML/Utils/AttributesTest.php
index fd66017a9..0209654bc 100644
--- a/tests/lib/SimpleSAML/Utils/AttributesTest.php
+++ b/tests/lib/SimpleSAML/Utils/AttributesTest.php
@@ -14,6 +14,7 @@ class AttributesTest extends TestCase
 {
     /**
      * Test the getExpectedAttribute() method with invalid attributes array.
+     * @return void
      */
     public function testGetExpectedAttributeInvalidAttributesArray()
     {
@@ -30,6 +31,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getExpectedAttributeMethod() method with invalid expected attribute parameter.
+     * @return void
      */
     public function testGetExpectedAttributeInvalidAttributeName()
     {
@@ -46,6 +48,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getExpectedAttributeMethod() method with a non-normalized attributes array.
+     * @return void
      */
     public function testGetExpectedAttributeNonNormalizedArray()
     {
@@ -64,6 +67,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getExpectedAttribute() method with valid input but missing expected attribute.
+     * @return void
      */
     public function testGetExpectedAttributeMissingAttribute()
     {
@@ -82,6 +86,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getExpectedAttribute() method with an empty attribute.
+     * @return void
      */
     public function testGetExpectedAttributeEmptyAttribute()
     {
@@ -100,6 +105,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getExpectedAttributeMethod() method with multiple values (not being allowed).
+     * @return void
      */
     public function testGetExpectedAttributeMultipleValues()
     {
@@ -121,6 +127,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test that the getExpectedAttribute() method successfully obtains values from the attributes array.
+     * @return void
      */
     public function testGetExpectedAttribute()
     {
@@ -144,6 +151,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the normalizeAttributesArray() function with input not being an array
+     * @return void
      */
     public function testNormalizeAttributesArrayBadInput()
     {
@@ -151,8 +159,10 @@ class AttributesTest extends TestCase
         Attributes::normalizeAttributesArray('string');
     }
 
+
     /**
      * Test the normalizeAttributesArray() function with an array with non-string attribute names.
+     * @return void
      */
     public function testNormalizeAttributesArrayBadKeys()
     {
@@ -160,8 +170,10 @@ class AttributesTest extends TestCase
         Attributes::normalizeAttributesArray(['attr1' => 'value1', 1 => 'value2']);
     }
 
+
     /**
      * Test the normalizeAttributesArray() function with an array with non-string attribute values.
+     * @return void
      */
     public function testNormalizeAttributesArrayBadValues()
     {
@@ -169,8 +181,10 @@ class AttributesTest extends TestCase
         Attributes::normalizeAttributesArray(['attr1' => 'value1', 'attr2' => 0]);
     }
 
+
     /**
      * Test the normalizeAttributesArray() function.
+     * @return void
      */
     public function testNormalizeAttributesArray()
     {
@@ -194,6 +208,7 @@ class AttributesTest extends TestCase
 
     /**
      * Test the getAttributeNamespace() function.
+     * @return void
      */
     public function testNamespacedAttributes()
     {
diff --git a/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php b/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
index 21f56b65e..74e9c217c 100644
--- a/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
+++ b/tests/lib/SimpleSAML/Utils/Config/MetadataTest.php
@@ -10,9 +10,9 @@ use SimpleSAML\Utils\Config\Metadata;
  */
 class MetadataTest extends TestCase
 {
-
     /**
      * Test contact configuration parsing and sanitizing.
+     * @return void
      */
     public function testGetContact()
     {
@@ -227,6 +227,7 @@ class MetadataTest extends TestCase
 
     /**
      * Test \SimpleSAML\Utils\Config\Metadata::isHiddenFromDiscovery().
+     * @return void
      */
     public function testIsHiddenFromDiscovery()
     {
@@ -263,6 +264,7 @@ class MetadataTest extends TestCase
     
     /**
      * Test \SimpleSAML\Utils\Config\Metadata::parseNameIdPolicy().
+     * @return void
      */
     public function testParseNameIdPolicy()
     {
diff --git a/tests/lib/SimpleSAML/Utils/ConfigTest.php b/tests/lib/SimpleSAML/Utils/ConfigTest.php
index 10a3d4e60..41052cf02 100644
--- a/tests/lib/SimpleSAML/Utils/ConfigTest.php
+++ b/tests/lib/SimpleSAML/Utils/ConfigTest.php
@@ -10,9 +10,9 @@ use SimpleSAML\Utils\Config;
  */
 class ConfigTest extends TestCase
 {
-
     /**
      * Test default config dir with not environment variable
+     * @return void
      */
     public function testDefaultConfigDir()
     {
@@ -26,6 +26,7 @@ class ConfigTest extends TestCase
 
     /**
      * Test valid dir specified by env var overrides default config dir
+     * @return void
      */
     public function testEnvVariableConfigDir()
     {
@@ -37,6 +38,7 @@ class ConfigTest extends TestCase
 
     /**
      * Test valid dir specified by env redirect var overrides default config dir
+     * @return void
      */
     public function testEnvRedirectVariableConfigDir()
     {
@@ -46,8 +48,10 @@ class ConfigTest extends TestCase
         $this->assertEquals($configDir, __DIR__);
     }
 
+
     /**
      * Test which directory takes precedence
+     * @return void
      */
     public function testEnvRedirectPriorityVariableConfigDir()
     {
@@ -61,6 +65,7 @@ class ConfigTest extends TestCase
 
     /**
      * Test invalid dir specified by env var results in a thrown exception
+     * @return void
      */
     public function testInvalidEnvVariableConfigDirThrowsException()
     {
diff --git a/tests/lib/SimpleSAML/Utils/CryptoTest.php b/tests/lib/SimpleSAML/Utils/CryptoTest.php
index ed4d2b470..45e7a3502 100644
--- a/tests/lib/SimpleSAML/Utils/CryptoTest.php
+++ b/tests/lib/SimpleSAML/Utils/CryptoTest.php
@@ -14,8 +14,13 @@ use \org\bovigo\vfs\vfsStream;
 class CryptoTest extends TestCase
 {
     const ROOTDIRNAME = 'testdir';
+
     const DEFAULTCERTDIR = 'certdir';
 
+
+    /**
+     * @return void
+     */
     public function setUp()
     {
         $this->root = vfsStream::setup(
@@ -29,10 +34,12 @@ class CryptoTest extends TestCase
         $this->certdir = $this->root_directory.DIRECTORY_SEPARATOR.self::DEFAULTCERTDIR;
     }
 
+
     /**
      * Test invalid input provided to the aesDecrypt() method.
      *
      * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
+     * @return void
      */
     public function testAesDecryptBadInput()
     {
@@ -48,6 +55,7 @@ class CryptoTest extends TestCase
      * Test invalid input provided to the aesEncrypt() method.
      *
      * @covers \SimpleSAML\Utils\Crypto::aesEncrypt
+     * @return void
      */
     public function testAesEncryptBadInput()
     {
@@ -64,6 +72,7 @@ class CryptoTest extends TestCase
      * ciphertext.
      *
      * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
+     * @return void
      */
     public function testAesDecrypt()
     {
@@ -86,6 +95,7 @@ class CryptoTest extends TestCase
      *
      * @covers \SimpleSAML\Utils\Crypto::aesDecrypt
      * @covers \SimpleSAML\Utils\Crypto::aesEncrypt
+     * @return void
      */
     public function testAesEncrypt()
     {
@@ -111,6 +121,7 @@ class CryptoTest extends TestCase
      *
      * @covers \SimpleSAML\Utils\Crypto::der2pem
      * @covers \SimpleSAML\Utils\Crypto::pem2der
+     * @return void
      */
     public function testFormatConversion()
     {
@@ -153,9 +164,11 @@ PHP;
         $this->assertEquals(trim($pem), trim(Crypto::der2pem(Crypto::pem2der($pem))));
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwHash
      * @deprecated To be removed for 2.0
+     * @return void
      */
     public function testGoodPwHash()
     {
@@ -177,6 +190,7 @@ PHP;
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwHash
      * @deprecated To be removed for 2.0
+     * @return void
      */
     public function testGoodSaltedPwHash()
     {
@@ -195,10 +209,12 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @deprecated To be removed for 2.0
      *
      * @covers \SimpleSAML\Utils\Crypto::pwHash
+     * @return void
      */
     public function testBadHashAlgorithm()
     {
@@ -209,8 +225,10 @@ PHP;
         Crypto::pwHash($pw, $algorithm);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwValid
+     * @return void
      */
     public function testGoodPwValid()
     {
@@ -222,8 +240,10 @@ PHP;
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwValid
+     * @return void
      */
     public function testBadPwInvalid()
     {
@@ -240,6 +260,7 @@ PHP;
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwValid
      * @deprecated To be removed for 2.0
+     * @return void
      */
     public function testGoodPwValidOld()
     {
@@ -252,9 +273,11 @@ PHP;
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::pwValid
      * @deprecated To be removed for 2.0
+     * @return void
      */
     public function testGoodSaltedPwValid()
     {
@@ -268,10 +291,12 @@ PHP;
         $this->assertTrue($res);
     }
 
+
     /**
      * @deprecated To be removed for 2.0
      *
      * @covers \SimpleSAML\Utils\Crypto::pwValid
+     * @return void
      */
     public function testBadHashAlgorithmValid()
     {
@@ -282,8 +307,10 @@ PHP;
         Crypto::pwValid($hash, $algorithm);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::secureCompare
+     * @return void
      */
     public function testSecureCompareEqual()
     {
@@ -292,8 +319,10 @@ PHP;
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::secureCompare
+     * @return void
      */
     public function testSecureCompareNotEqual()
     {
@@ -302,8 +331,10 @@ PHP;
         $this->assertFalse($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyRequiredMetadataMissing()
     {
@@ -314,8 +345,10 @@ PHP;
         Crypto::loadPrivateKey($config, $required);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyNotRequiredMetadataMissing()
     {
@@ -327,8 +360,10 @@ PHP;
         $this->assertNull($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyMissingFile()
     {
@@ -338,8 +373,10 @@ PHP;
         Crypto::loadPrivateKey($config, false, '', true);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyBasic()
     {
@@ -356,8 +393,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyPassword()
     {
@@ -381,8 +420,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPrivateKey
+     * @return void
      */
     public function testLoadPrivateKeyPrefix()
     {
@@ -407,8 +448,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyRequiredMetadataMissing()
     {
@@ -419,8 +462,10 @@ PHP;
         Crypto::loadPublicKey($config, $required);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyNotRequiredMetadataMissing()
     {
@@ -432,8 +477,10 @@ PHP;
         $this->assertNull($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyFingerprintBasicString()
     {
@@ -446,8 +493,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyFingerprintBasicArray()
     {
@@ -469,8 +518,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyFingerprintLowercase()
     {
@@ -483,8 +534,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyFingerprintRemoveColons()
     {
@@ -497,8 +550,10 @@ PHP;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyNotX509Certificate()
     {
@@ -520,8 +575,10 @@ PHP;
         $this->assertNull($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyNotSigning()
     {
@@ -543,8 +600,10 @@ PHP;
         $this->assertNull($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\Crypto::loadPublicKey
+     * @return void
      */
     public function testLoadPublicKeyBasic()
     {
diff --git a/tests/lib/SimpleSAML/Utils/EMailTestCase.php b/tests/lib/SimpleSAML/Utils/EMailTestCase.php
index 6c01432ca..be6fe955d 100644
--- a/tests/lib/SimpleSAML/Utils/EMailTestCase.php
+++ b/tests/lib/SimpleSAML/Utils/EMailTestCase.php
@@ -12,6 +12,9 @@ use SimpleSAML\Utils\EMail;
  */
 class EMailTestCase extends ClearStateTestCase
 {
+    /**
+     * @return void
+     */
     public function setUp()
     {
         parent::setUp();
@@ -22,9 +25,11 @@ class EMailTestCase extends ClearStateTestCase
         ], '[ARRAY]', 'simplesaml');
     }
 
+
     /**
      * Test that an exception is thrown if using default configuration,
      * and no custom from address is specified.
+     * @return void
      */
     public function testMailFromDefaultConfigurationException()
     {
@@ -32,8 +37,10 @@ class EMailTestCase extends ClearStateTestCase
         new EMail('test', null, 'phpunit@simplesamlphp.org');
     }
 
+
     /**
      * Test that an exception is thrown if using an invalid "From"-address
+     * @return void
      */
     public function testInvalidFromAddressException()
     {
@@ -41,8 +48,10 @@ class EMailTestCase extends ClearStateTestCase
         new EMail('test', "phpunit@simplesamlphp.org\nLorem Ipsum", 'phpunit@simplesamlphp.org');
     }
 
+
     /**
      * Test that an exception is thrown if using an invalid "To"-address
+     * @return void
      */
     public function testInvalidToAddressException()
     {
@@ -50,9 +59,11 @@ class EMailTestCase extends ClearStateTestCase
         new EMail('test', 'phpunit@simplesamlphp.org', "phpunit@simplesamlphp.org\nLorem Ipsum");
     }
 
+
     /**
      * Test that the data given is visible in the resulting mail
      * @dataProvider mailTemplates
+     * @return void
      */
     public function testMailContents($template)
     {
@@ -66,12 +77,20 @@ class EMailTestCase extends ClearStateTestCase
         $this->assertRegexp('/(value-){6}/', $result);
     }
 
-    /** All templates that should be tested in #testMailContents($template) */
+
+    /**
+     * All templates that should be tested in #testMailContents($template)
+     * @return array
+     */
     public static function mailTemplates()
     {
         return [['mailtxt.twig'], ['mailhtml.twig']];
     }
 
+
+    /**
+     * @return void
+     */
     public function testInvalidTransportConfiguration()
     {
         // preserve the original configuration
@@ -90,6 +109,10 @@ class EMailTestCase extends ClearStateTestCase
         Configuration::loadFromArray($originalTestConfiguration, '[ARRAY]', 'simplesaml');
     }
 
+
+    /**
+     * @return void
+     */
     public function testInvalidSMTPConfiguration()
     {
         // setup a new email
diff --git a/tests/lib/SimpleSAML/Utils/HTTPTest.php b/tests/lib/SimpleSAML/Utils/HTTPTest.php
index ad8516be6..0940abc17 100644
--- a/tests/lib/SimpleSAML/Utils/HTTPTest.php
+++ b/tests/lib/SimpleSAML/Utils/HTTPTest.php
@@ -12,6 +12,7 @@ class HTTPTest extends TestCase
      * Set up the environment ($_SERVER) populating the typical variables from a given URL.
      *
      * @param string $url The URL to use as the current one.
+     * @return void
      */
     private function setupEnvFromURL($url)
     {
@@ -32,8 +33,10 @@ class HTTPTest extends TestCase
         $_SERVER['REQUEST_URI'] = $addr['path'].'?'.$addr['query'];
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::addURLParameters().
+     * @return void
      */
     public function testAddURLParametersInvalidURL()
     {
@@ -41,8 +44,10 @@ class HTTPTest extends TestCase
         HTTP::addURLParameters([], []);
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::addURLParameters().
+     * @return void
      */
     public function testAddURLParametersInvalidParameters()
     {
@@ -50,8 +55,10 @@ class HTTPTest extends TestCase
         HTTP::addURLParameters('string', 'string');
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::addURLParameters().
+     * @return void
      */
     public function testAddURLParameters()
     {
@@ -76,8 +83,10 @@ class HTTPTest extends TestCase
         $this->assertEquals($url.'&bar=foo', HTTP::addURLParameters($url, $params));
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::guessBasePath().
+     * @return void
      */
     public function testGuessBasePath()
     {
@@ -118,8 +127,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::getSelfHost() with and without custom port.
+     * @return void
      */
     public function testGetSelfHost()
     {
@@ -136,8 +147,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::getSelfHostWithPort(), with and without custom port.
+     * @return void
      */
     public function testGetSelfHostWithPort()
     {
@@ -163,8 +176,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::getSelfURL().
+     * @return void
      */
     public function testGetSelfURLMethods()
     {
@@ -288,8 +303,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::checkURLAllowed(), without regex.
+     * @return void
      */
     public function testCheckURLAllowedWithoutRegex()
     {
@@ -318,8 +335,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::checkURLAllowed(), with regex.
+     * @return void
      */
     public function testCheckURLAllowedWithRegex()
     {
@@ -350,8 +369,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::getServerPort().
+     * @return void
      */
     public function testGetServerPort()
     {
@@ -394,9 +415,11 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * Test SimpleSAML\Utils\HTTP::checkURLAllowed(), with the regex as a
      * subdomain of an evil domain.
+     * @return void
      */
     public function testCheckURLAllowedWithRegexWithoutDelimiters()
     {
@@ -415,8 +438,10 @@ class HTTPTest extends TestCase
         $_SERVER = $original;
     }
 
+
     /**
      * @covers SimpleSAML\Utils\HTTP::getFirstPathElement()
+     * @return void
      */
     public function testGetFirstPathElement()
     {
diff --git a/tests/lib/SimpleSAML/Utils/NetTest.php b/tests/lib/SimpleSAML/Utils/NetTest.php
index 8b23bb44a..df25c83ff 100644
--- a/tests/lib/SimpleSAML/Utils/NetTest.php
+++ b/tests/lib/SimpleSAML/Utils/NetTest.php
@@ -14,6 +14,7 @@ class NetTest extends TestCase
      * Test the function that checks for IPs belonging to a CIDR.
      *
      * @covers SimpleSAML\Utils\Net::ipCIDRcheck
+     * @return void
      */
     public function testIpCIDRcheck()
     {
@@ -49,6 +50,7 @@ class NetTest extends TestCase
      * Test IPv6 support in SimpleSAML\Utils\Net::ipCIDRcheck.
      *
      * @covers SimpleSAML\Utils\Net::ipCIDRcheck
+     * @return void
      */
     public function testIpv6CIDRcheck()
     {
diff --git a/tests/lib/SimpleSAML/Utils/RandomTest.php b/tests/lib/SimpleSAML/Utils/RandomTest.php
index 6067faf07..d55fc95a0 100644
--- a/tests/lib/SimpleSAML/Utils/RandomTest.php
+++ b/tests/lib/SimpleSAML/Utils/RandomTest.php
@@ -14,6 +14,7 @@ class RandomTest extends TestCase
      * Test for SimpleSAML\Utils\Random::generateID().
      *
      * @covers SimpleSAML\Utils\Random::generateID
+     * @return void
      */
     public function testGenerateID()
     {
diff --git a/tests/lib/SimpleSAML/Utils/SystemTest.php b/tests/lib/SimpleSAML/Utils/SystemTest.php
index 37270a1bd..e64ef4d8a 100644
--- a/tests/lib/SimpleSAML/Utils/SystemTest.php
+++ b/tests/lib/SimpleSAML/Utils/SystemTest.php
@@ -3,8 +3,8 @@
 namespace SimpleSAML\Test\Utils;
 
 use PHPUnit\Framework\TestCase;
-use \SimpleSAML\Configuration;
-use \SimpleSAML\Utils\System;
+use SimpleSAML\Configuration;
+use SimpleSAML\Utils\System;
 
 use \org\bovigo\vfs\vfsStream;
 
@@ -14,8 +14,13 @@ use \org\bovigo\vfs\vfsStream;
 class SystemTest extends TestCase
 {
     const ROOTDIRNAME = 'testdir';
+
     const DEFAULTTEMPDIR = 'tempdir';
 
+
+    /**
+     * @return void
+     */
     public function setUp()
     {
         $this->root = vfsStream::setup(
@@ -28,9 +33,11 @@ class SystemTest extends TestCase
         $this->root_directory = vfsStream::url(self::ROOTDIRNAME);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::getOS
      * @test
+     * @return void
      */
     public function testGetOSBasic()
     {
@@ -39,9 +46,11 @@ class SystemTest extends TestCase
         $this->assertInternalType("int", $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathRemoveTrailingSlashes()
     {
@@ -54,9 +63,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathPreferAbsolutePathToBase()
     {
@@ -69,9 +80,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathCurDirPath()
     {
@@ -84,9 +97,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathParentPath()
     {
@@ -99,9 +114,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathAllowsStreamWrappers()
     {
@@ -114,9 +131,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::resolvePath
      * @test
+     * @return void
      */
     public function testResolvePathAllowsAwsS3StreamWrappers()
     {
@@ -129,9 +148,11 @@ class SystemTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::writeFile
      * @test
+     * @return void
      */
     public function testWriteFileInvalidArguments()
     {
@@ -139,9 +160,11 @@ class SystemTest extends TestCase
         System::writeFile(null, null, null);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::writeFile
      * @test
+     * @return void
      */
     public function testWriteFileBasic()
     {
@@ -157,9 +180,11 @@ class SystemTest extends TestCase
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::writeFile
      * @test
+     * @return void
      */
     public function testWriteFileContents()
     {
@@ -179,9 +204,11 @@ class SystemTest extends TestCase
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::writeFile
      * @test
+     * @return void
      */
     public function testWriteFileMode()
     {
@@ -201,9 +228,11 @@ class SystemTest extends TestCase
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::getTempDir
      * @test
+     * @return void
      */
     public function testGetTempDirBasic()
     {
@@ -219,9 +248,11 @@ class SystemTest extends TestCase
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\System::getTempDir
      * @test
+     * @return void
      */
     public function testGetTempDirNonExistant()
     {
@@ -237,10 +268,12 @@ class SystemTest extends TestCase
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
 
+
     /**
      * @requires OS Linux
      * @covers \SimpleSAML\Utils\System::getTempDir
      * @test
+     * @return void
      */
     public function testGetTempDirBadOwner()
     {
@@ -260,6 +293,11 @@ class SystemTest extends TestCase
 
         $this->clearInstance($config, '\SimpleSAML\Configuration');
     }
+
+
+    /**
+     * @return \SimpleSAML\Configuration
+     */
     private function setConfigurationTempDir($directory)
     {
         $config = Configuration::loadFromArray([
@@ -269,6 +307,10 @@ class SystemTest extends TestCase
         return $config;
     }
 
+
+    /**
+     * @return void
+     */
     protected function clearInstance($service, $className)
     {
         $reflectedClass = new \ReflectionClass($className);
diff --git a/tests/lib/SimpleSAML/Utils/TimeTest.php b/tests/lib/SimpleSAML/Utils/TimeTest.php
index 6973a2180..157ff080b 100644
--- a/tests/lib/SimpleSAML/Utils/TimeTest.php
+++ b/tests/lib/SimpleSAML/Utils/TimeTest.php
@@ -11,6 +11,7 @@ class TimeTest extends TestCase
      * Test the SimpleSAML\Utils\Time::generateTimestamp() method.
      *
      * @covers SimpleSAML\Utils\Time::generateTimestamp
+     * @return void
      */
     public function testGenerateTimestamp()
     {
@@ -26,6 +27,7 @@ class TimeTest extends TestCase
      * Test the SimpleSAML\Utils\Time::initTimezone() method.
      *
      * @covers SimpleSAML\Utils\Time::initTimezone
+     * @return void
      */
     public function testInitTimezone()
     {
@@ -70,6 +72,7 @@ class TimeTest extends TestCase
      * Test the SimpleSAML\Utils\Time::parseDuration() method.
      *
      * @covers SimpleSAML\Utils\Time::parseDuration
+     * @return void
      */
     public function testParseDuration()
     {
diff --git a/tests/lib/SimpleSAML/Utils/XMLTest.php b/tests/lib/SimpleSAML/Utils/XMLTest.php
index a65d527e9..938f4ef38 100644
--- a/tests/lib/SimpleSAML/Utils/XMLTest.php
+++ b/tests/lib/SimpleSAML/Utils/XMLTest.php
@@ -15,6 +15,7 @@ class XMLTest extends TestCase
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeBasic()
     {
@@ -27,9 +28,11 @@ class XMLTest extends TestCase
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeMissingNamespace()
     {
@@ -41,9 +44,11 @@ class XMLTest extends TestCase
         XML::isDOMNodeOfType($element, $name, $namespace_uri);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeEmpty()
     {
@@ -56,9 +61,11 @@ class XMLTest extends TestCase
         $this->assertFalse($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeShortcut()
     {
@@ -72,9 +79,11 @@ class XMLTest extends TestCase
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeIncorrectName()
     {
@@ -88,9 +97,11 @@ class XMLTest extends TestCase
         $this->assertFalse($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isDOMNodeOfType
      * @test
+     * @return void
      */
     public function testIsDomNodeOfTypeIncorrectNamespace()
     {
@@ -104,9 +115,11 @@ class XMLTest extends TestCase
         $this->assertFalse($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMText
      * @test
+     * @return void
      */
     public function testGetDomTextBasic()
     {
@@ -121,9 +134,11 @@ class XMLTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMText
      * @test
+     * @return void
      */
     public function testGetDomTextMulti()
     {
@@ -140,9 +155,11 @@ class XMLTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMText
      * @test
+     * @return void
      */
     public function testGetDomTextIncorrectType()
     {
@@ -154,9 +171,11 @@ class XMLTest extends TestCase
         XML::getDOMText($element);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMChildren
      * @test
+     * @return void
      */
     public function testGetDomChildrenBasic()
     {
@@ -172,9 +191,11 @@ class XMLTest extends TestCase
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMChildren
      * @test
+     * @return void
      */
     public function testGetDomChildrenIncorrectType()
     {
@@ -189,9 +210,11 @@ class XMLTest extends TestCase
         $this->assertEmpty($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::getDOMChildren
      * @test
+     * @return void
      */
     public function testGetDomChildrenIncorrectName()
     {
@@ -207,9 +230,11 @@ class XMLTest extends TestCase
         $this->assertEmpty($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatDOMElement
      * @test
+     * @return void
      */
     public function testFormatDomElementBasic()
     {
@@ -229,9 +254,11 @@ NOWDOC;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatDOMElement
      * @test
+     * @return void
      */
     public function testFormatDomElementNested()
     {
@@ -255,9 +282,11 @@ NOWDOC;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatDOMElement
      * @test
+     * @return void
      */
     public function testFormatDomElementIndentBase()
     {
@@ -282,9 +311,11 @@ HEREDOC;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatDOMElement
      * @test
+     * @return void
      */
     public function testFormatDomElementTextAndChild()
     {
@@ -305,9 +336,11 @@ HEREDOC;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatXMLString
      * @test
+     * @return void
      */
     public function testFormatXmlStringBasic()
     {
@@ -323,9 +356,11 @@ NOWDOC;
         $this->assertEquals($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::formatXMLString
      * @test
+     * @return void
      */
     public function testFormatXmlStringMalformedXml()
     {
@@ -335,9 +370,11 @@ NOWDOC;
         XML::formatXMLString($xml);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isValid
      * @test
+     * @return void
      */
     public function testIsValidMalformedXml()
     {
@@ -349,9 +386,11 @@ NOWDOC;
         $this->assertContains($expected, $res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::isValid
      * @test
+     * @return void
      */
     public function testIsValidMetadata()
     {
@@ -378,8 +417,10 @@ NOWDOC;
         $this->assertTrue($res);
     }
 
+
     /**
      * @covers \SimpleSAML\Utils\XML::checkSAMLMessage()
+     * @return void
      */
     public function testCheckSAMLMessageInvalidType()
     {
diff --git a/tests/lib/SimpleSAML/XML/ErrorsTest.php b/tests/lib/SimpleSAML/XML/ErrorsTest.php
index 4c0f92913..c671a23e1 100644
--- a/tests/lib/SimpleSAML/XML/ErrorsTest.php
+++ b/tests/lib/SimpleSAML/XML/ErrorsTest.php
@@ -21,6 +21,7 @@ class ErrorsTest extends TestCase
      * @covers \SimpleSAML\XML\Errors::addErrors
      * @covers \SimpleSAML\XML\Errors::end
      * @test
+     * @return void
      */
     public function loggingErrors()
     {
@@ -36,10 +37,12 @@ class ErrorsTest extends TestCase
         );
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Errors::formatError
      * @covers \SimpleSAML\XML\Errors::formatErrors
      * @test
+     * @return void
      */
     public function formatErrors()
     {
diff --git a/tests/lib/SimpleSAML/XML/ParserTest.php b/tests/lib/SimpleSAML/XML/ParserTest.php
index b0b84bd1c..35bc70c41 100644
--- a/tests/lib/SimpleSAML/XML/ParserTest.php
+++ b/tests/lib/SimpleSAML/XML/ParserTest.php
@@ -25,15 +25,21 @@ XML;
     /** @var Parser */
     private $xml;
 
+
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         $this->xml = new Parser(static::XMLDOC);
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Parser::getValue
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getValue()
     {
@@ -44,10 +50,12 @@ XML;
         );
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Parser::getValue
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getEmptyValue()
     {
@@ -59,11 +67,11 @@ XML;
     }
 
 
-
     /**
      * @covers \SimpleSAML\XML\Parser::getValue
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getValueException()
     {
@@ -71,10 +79,12 @@ XML;
         $this->xml->getValue('/Root/Foo', true);
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Parser::getValueDefault
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getDefaultValue()
     {
@@ -90,6 +100,7 @@ XML;
      * @covers \SimpleSAML\XML\Parser::getValueAlternatives
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getValueAlternatives()
     {
@@ -107,10 +118,12 @@ XML;
         );
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Parser::getValueAlternatives
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getEmptyValueAlternatives()
     {
@@ -128,10 +141,12 @@ XML;
         );
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Parser::getValueAlternatives
      * @covers \SimpleSAML\XML\Parser::__construct
      * @test
+     * @return void
      */
     public function getValueAlternativesException()
     {
diff --git a/tests/lib/SimpleSAML/XML/Shib13/AuthnResponseTest.php b/tests/lib/SimpleSAML/XML/Shib13/AuthnResponseTest.php
index c8a654917..1bc2c4af9 100644
--- a/tests/lib/SimpleSAML/XML/Shib13/AuthnResponseTest.php
+++ b/tests/lib/SimpleSAML/XML/Shib13/AuthnResponseTest.php
@@ -51,20 +51,24 @@ XML;
 </Response>
 XML;
 
-    /**
-     * @var AuthnResponse
-     */
+    /** @var AuthnResponse */
     private $xml;
 
+
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         $this->xml = new AuthnResponse();
         $this->xml->setXML(static::XMLDOC);
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::setXML
      * @test
+     * @return void
      */
     public function setXML()
     {
@@ -72,11 +76,13 @@ XML;
         $this->xml->setXML(static::XMLDOC);
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::doXPathQuery
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::getIssuer
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::setXML
      * @test
+     * @return void
      */
     public function getIssuer()
     {
@@ -88,10 +94,12 @@ XML;
         );
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::getIssuer
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::setXML
      * @test
+     * @return void
      */
     public function getIssuerException()
     {
@@ -102,10 +110,12 @@ XML;
         $xml->getIssuer();
     }
 
+
     /**
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::getNameID
      * @covers \SimpleSAML\XML\Shib13\AuthnResponse::setXML
      * @test
+     * @return void
      */
     public function getNameID()
     {
diff --git a/tests/lib/SimpleSAML/XML/SignerTest.php b/tests/lib/SimpleSAML/XML/SignerTest.php
index 57a7aa4e2..70c4f1faa 100644
--- a/tests/lib/SimpleSAML/XML/SignerTest.php
+++ b/tests/lib/SimpleSAML/XML/SignerTest.php
@@ -42,9 +42,15 @@ d2udRIYG0WcjQTk86+EraXNGtuwUaknQ7WPKlJwLzypuZM8lk3F1FXxXWomHN3SH
 NOWDOC;
 
     const ROOTDIRNAME = 'testdir';
+
     const DEFAULTCERTDIR = 'certdir';
+
     const OTHER_CERTIFICATE = 'other_certificate.pem';
 
+
+    /**
+     * @return array
+     */
     public function getCertDirContent()
     {
         return [
@@ -54,6 +60,10 @@ NOWDOC;
         ];
     }
 
+
+    /**
+     * @return void
+     */
     public function testSignerBasic()
     {
         $res = new Signer([]);
@@ -61,6 +71,10 @@ NOWDOC;
         $this->assertNotNull($res);
     }
 
+
+    /**
+     * @return void
+     */
     public function testSignBasic()
     {
         $node = new \DOMDocument();
@@ -80,6 +94,10 @@ NOWDOC;
         $this->assertContains('SignatureValue', $res);
     }
 
+
+    /**
+     * @return string
+     */
     private static function getCertificateValue($certificate)
     {
         $replacements = [
@@ -91,6 +109,10 @@ NOWDOC;
         return str_replace($replacements, "", $certificate);
     }
 
+
+    /**
+     * @return void
+     */
     public function testSignWithCertificate()
     {
         $node = new \DOMDocument();
@@ -113,6 +135,10 @@ NOWDOC;
         $this->assertContains($expected, $res);
     }
 
+
+    /**
+     * @return void
+     */
     public function testSignWithMultiCertificate()
     {
         $this->other_certificate_file = $this->certdir.DIRECTORY_SEPARATOR.self::OTHER_CERTIFICATE;
@@ -140,6 +166,10 @@ NOWDOC;
         $this->assertContains($expected2, $res);
     }
 
+
+    /**
+     * @return void
+     */
     public function testSignMissingPrivateKey()
     {
         $node = new \DOMDocument();
@@ -155,6 +185,10 @@ NOWDOC;
         $signer->sign($element, $insertInto);
     }
 
+
+    /**
+     * @return void
+     */
     protected function clearInstance($service, $className, $value = null)
     {
         $reflectedClass = new \ReflectionClass($className);
diff --git a/tests/lib/SimpleSAML/XML/ValidatorTest.php b/tests/lib/SimpleSAML/XML/ValidatorTest.php
index 772f2619e..848c768ec 100644
--- a/tests/lib/SimpleSAML/XML/ValidatorTest.php
+++ b/tests/lib/SimpleSAML/XML/ValidatorTest.php
@@ -16,6 +16,9 @@ use \org\bovigo\vfs\vfsStream;
  */
 class ValidatorTest extends SigningTestCase
 {
+    /**
+     * @return void
+     */
     public function testValidatorMissingSignature()
     {
         $doc = new \DOMDocument();
@@ -25,6 +28,10 @@ class ValidatorTest extends SigningTestCase
         new Validator($doc);
     }
 
+
+    /**
+     * @return void
+     */
     public function testGetX509Certificate()
     {
         $doc = new \DOMDocument();
@@ -49,6 +56,10 @@ class ValidatorTest extends SigningTestCase
         $this->assertEquals($result, $expected);
     }
 
+
+    /**
+     * @return void
+     */
     public function testCertFingerprintSuccess()
     {
         $doc = new \DOMDocument();
@@ -76,6 +87,10 @@ class ValidatorTest extends SigningTestCase
         $this->assertInstanceOf(Validator::class, $validator);
     }
 
+
+    /**
+     * @return void
+     */
     public function testCertFingerprintFailure()
     {
         $doc = new \DOMDocument();
@@ -94,6 +109,10 @@ class ValidatorTest extends SigningTestCase
         new Validator($doc, 'node', ['certFingerprint' => []]);
     }
 
+
+    /**
+     * @return void
+     */
     public function testValidateFingerprintSuccess()
     {
         $doc = new \DOMDocument();
@@ -118,6 +137,10 @@ class ValidatorTest extends SigningTestCase
         $this->assertInstanceOf(Validator::class, $validator);
     }
 
+
+    /**
+     * @return void
+     */
     public function testValidateFingerprintFailure()
     {
         $doc = new \DOMDocument();
@@ -140,6 +163,10 @@ class ValidatorTest extends SigningTestCase
         $validator->validateFingerprint($fingerprint);
     }
 
+
+    /**
+     * @return void
+     */
     public function testIsNodeValidatedSuccess()
     {
         $doc = new \DOMDocument();
@@ -164,6 +191,10 @@ class ValidatorTest extends SigningTestCase
         $this->assertTrue($result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testIsNodeValidatedFailure()
     {
         $doc = new \DOMDocument();
@@ -189,6 +220,10 @@ class ValidatorTest extends SigningTestCase
         $this->assertFalse($result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testValidateCertificateMissingCAFile()
     {
         $ca_file = $this->ca_certificate_file.'NOT';
diff --git a/tests/modules/core/lib/Auth/Process/AttributeAddTest.php b/tests/modules/core/lib/Auth/Process/AttributeAddTest.php
index b8701a877..dac7e8713 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeAddTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeAddTest.php
@@ -9,7 +9,6 @@ use PHPUnit\Framework\TestCase;
  */
 class AttributeAddTest extends TestCase
 {
-
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -24,8 +23,10 @@ class AttributeAddTest extends TestCase
         return $request;
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -41,8 +42,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['test'], ['value1', 'value2']);
     }
 
+
     /**
      * Test that existing attributes are left unmodified.
+     * @return void
      */
     public function testExistingNotModified()
     {
@@ -65,8 +68,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['original2'], ['original_value2']);
     }
 
+
     /**
      * Test single string as attribute value.
+     * @return void
      */
     public function testStringValue()
     {
@@ -82,8 +87,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['test'], ['value']);
     }
 
+
     /**
      * Test adding multiple attributes in one config.
+     * @return void
      */
     public function testAddMultiple()
     {
@@ -102,8 +109,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['test2'], ['value2']);
     }
 
+
     /**
      * Test behavior when appending attribute values.
+     * @return void
      */
     public function testAppend()
     {
@@ -120,8 +129,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['test'], ['value1', 'value2']);
     }
 
+
     /**
      * Test replacing attribute values.
+     * @return void
      */
     public function testReplace()
     {
@@ -139,8 +150,10 @@ class AttributeAddTest extends TestCase
         $this->assertEquals($attributes['test'], ['value2']);
     }
 
+
     /**
      * Test wrong usage generates exceptions
+     * @return void
      */
     public function testWrongFlag()
     {
@@ -157,8 +170,10 @@ class AttributeAddTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test wrong attribute value
+     * @return void
      */
     public function testWrongAttributeValue()
     {
diff --git a/tests/modules/core/lib/Auth/Process/AttributeAlterTest.php b/tests/modules/core/lib/Auth/Process/AttributeAlterTest.php
index 5c113ccb3..69f6a5aa1 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeAlterTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeAlterTest.php
@@ -9,7 +9,6 @@ use PHPUnit\Framework\TestCase;
  */
 class AttributeAlterTest extends TestCase
 {
-
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -24,8 +23,10 @@ class AttributeAlterTest extends TestCase
         return $request;
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -47,8 +48,10 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['test'], ['somethingisright']);
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testWithTarget()
     {
@@ -73,8 +76,10 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['test2'], ['right']);
     }
 
+
     /**
      * Module is a no op if subject attribute is not present.
+     * @return void
      */
     public function testNomatch()
     {
@@ -100,8 +105,10 @@ class AttributeAlterTest extends TestCase
         );
     }
 
+
     /**
      * Test replacing attribute value.
+     * @return void
      */
     public function testReplaceMatch()
     {
@@ -121,8 +128,10 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['source'], ['right']);
     }
 
+
     /**
      * Test replacing attribute value.
+     * @return void
      */
     public function testReplaceMatchWithTarget()
     {
@@ -144,8 +153,10 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['test'], ['right']);
     }
 
+
     /**
      * Test replacing attribute values.
+     * @return void
      */
     public function testReplaceNoMatch()
     {
@@ -167,10 +178,12 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['test'], ['right']);
     }
 
+
     /**
      * Test removing attribute values.
      * Note that removing a value does not renumber the attributes array.
      * Also ensure unrelated attributes are not touched.
+     * @return void
      */
     public function testRemoveMatch()
     {
@@ -191,8 +204,10 @@ class AttributeAlterTest extends TestCase
         $this->assertEquals($attributes['eduPersonAffiliation'], [0 => 'member', 2 => 'staff']);
     }
 
+
     /**
      * Test removing attribute values, resulting in an empty attribute.
+     * @return void
      */
     public function testRemoveMatchAll()
     {
@@ -212,8 +227,10 @@ class AttributeAlterTest extends TestCase
         $this->assertArrayNotHasKey('eduPersonAffiliation', $attributes);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testWrongConfig()
     {
@@ -231,8 +248,10 @@ class AttributeAlterTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testIncompleteConfig()
     {
@@ -248,8 +267,10 @@ class AttributeAlterTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testIncompleteConfig2()
     {
@@ -267,8 +288,10 @@ class AttributeAlterTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testIncompleteConfig3()
     {
@@ -288,8 +311,10 @@ class AttributeAlterTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testIncompleteConfig4()
     {
@@ -312,6 +337,7 @@ class AttributeAlterTest extends TestCase
 
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testIncompleteConfig5()
     {
diff --git a/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php b/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php
index 1193fa2de..a1a70d088 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeCopyTest.php
@@ -24,8 +24,10 @@ class AttributeCopyTest extends TestCase
         return $request;
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -42,8 +44,10 @@ class AttributeCopyTest extends TestCase
         $this->assertEquals($attributes['testnew'], ['AAP']);
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testArray()
     {
@@ -62,8 +66,10 @@ class AttributeCopyTest extends TestCase
         $this->assertEquals($attributes['new2'], ['AAP']);
     }
 
+
     /**
      * Test that existing attributes are left unmodified.
+     * @return void
      */
     public function testExistingNotModified()
     {
@@ -87,8 +93,10 @@ class AttributeCopyTest extends TestCase
         $this->assertEquals($attributes['original2'], ['original_value2']);
     }
 
+
     /**
      * Test copying multiple attributes
+     * @return void
      */
     public function testCopyMultiple()
     {
@@ -107,8 +115,10 @@ class AttributeCopyTest extends TestCase
         $this->assertEquals($attributes['new2'], ['val2.1', 'val2.2']);
     }
 
+
     /**
      * Test behaviour when target attribute exists (should be replaced).
+     * @return void
      */
     public function testCopyClash()
     {
@@ -126,8 +136,10 @@ class AttributeCopyTest extends TestCase
         $this->assertEquals($attributes['new1'], ['testvalue1']);
     }
 
+
     /**
      * Test wrong attribute name
+     * @return void
      */
     public function testWrongAttributeName()
     {
@@ -143,8 +155,10 @@ class AttributeCopyTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test wrong attribute value
+     * @return void
      */
     public function testWrongAttributeValue()
     {
diff --git a/tests/modules/core/lib/Auth/Process/AttributeLimitTest.php b/tests/modules/core/lib/Auth/Process/AttributeLimitTest.php
index 16eac7506..4d2fed998 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeLimitTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeLimitTest.php
@@ -9,6 +9,13 @@ use PHPUnit\Framework\TestCase;
  */
 class AttributeLimitTest extends TestCase
 {
+    /**
+     * setUpBeforeClass a request that will be used for the following tests.
+     * note the above tests don't use self::$request for processFilter input.
+     */
+    protected static $request;
+
+
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -23,8 +30,10 @@ class AttributeLimitTest extends TestCase
         return $request;
     }
 
+
     /**
      * Test reading IdP Attributes.
+     * @return void
      */
     public function testIdPAttrs()
     {
@@ -68,8 +77,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(2, $attributes);
     }
 
+
     /**
      * Tests when no attributes are in metadata.
+     * @return void
      */
     public function testNULLMetadataAttrs()
     {
@@ -123,12 +134,10 @@ class AttributeLimitTest extends TestCase
         $this->assertArrayHasKey('mail', $attributes);
     }
 
+
     /**
-     * setUpBeforeClass a request that will be used for the following tests.
-     * note the above tests don't use self::$request for processFilter input.
+     * @return void
      */
-    protected static $request;
-
     public static function setUpBeforeClass()
     {
         self::$request = [
@@ -146,8 +155,10 @@ class AttributeLimitTest extends TestCase
         ];
     }
 
+
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -162,8 +173,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(2, $attributes);
     }
 
+
     /**
      * Test defaults with metadata available.
+     * @return void
      */
     public function testDefaultWithMetadata()
     {
@@ -178,8 +191,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(2, $attributes);
     }
 
+
     /**
      * Test defaults with attributes and metadata
+     * @return void
      */
     public function testDefaultWithAttrs()
     {
@@ -197,8 +212,10 @@ class AttributeLimitTest extends TestCase
         $this->assertArrayNotHasKey('eduPersonAffiliation', $attributes);
     }
 
+
     /**
      * Test for exception with illegal config.
+     * @return void
      */
     public function testInvalidConfig()
     {
@@ -210,8 +227,10 @@ class AttributeLimitTest extends TestCase
         self::processFilter($config, self::$request);
     }
 
+
     /**
      * Test for invalid attribute name
+     * @return void
      */
     public function testInvalidAttributeName()
     {
@@ -226,6 +245,7 @@ class AttributeLimitTest extends TestCase
 
     /**
      * Test for attribute value matching
+     * @return void
      */
     public function testMatchAttributeValues()
     {
@@ -264,6 +284,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(0, $attributes);
     }
 
+
+    /**
+     * @return void
+     */
     public function testBadOptionsNotTreatedAsValidValues()
     {
         // Ensure really misconfigured ignoreCase and regex options are not interpretted as valid valus
@@ -276,9 +300,11 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(0, $attributes);
     }
 
+
     /**
      * Verify that the true value for ignoreCase doesn't get converted into a string ('1') by
      * php and matched against an attribute value of '1'
+     * @return void
      */
     public function testThatIgnoreCaseOptionNotMatchBooleanAsStringValue()
     {
@@ -297,8 +323,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(0, $attributes);
     }
 
+
     /**
      * Test for attribute value matching ignore case
+     * @return void
      */
     public function testMatchAttributeValuesIgnoreCase()
     {
@@ -337,8 +365,10 @@ class AttributeLimitTest extends TestCase
         $this->assertCount(0, $attributes);
     }
 
+
     /**
      * Test for attribute value matching
+     * @return void
      */
     public function testMatchAttributeValuesRegex()
     {
@@ -434,11 +464,13 @@ class AttributeLimitTest extends TestCase
         );
     }
 
+
     /**
      * Test for allowed attributes not an array.
      *
      * This test is very unlikely and would require malformed metadata processing.
      * Cannot be generated via config options.
+     * @return void
      */
     public function testMatchAttributeValuesNotArray()
     {
@@ -465,8 +497,10 @@ class AttributeLimitTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test attributes not intersecting
+     * @return void
      */
     public function testNoIntersection()
     {
diff --git a/tests/modules/core/lib/Auth/Process/AttributeMapTest.php b/tests/modules/core/lib/Auth/Process/AttributeMapTest.php
index c89dcbf89..878014a78 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeMapTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeMapTest.php
@@ -24,6 +24,9 @@ class AttributeMapTest extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     public function testBasic()
     {
         $config = [
@@ -44,6 +47,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testDuplicate()
     {
         $config = [
@@ -66,6 +73,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testMultiple()
     {
         $config = [
@@ -87,6 +98,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testMultipleDuplicate()
     {
         $config = [
@@ -110,6 +125,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testCircular()
     {
         $config = [
@@ -133,6 +152,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testMissingMap()
     {
         $config = [
@@ -155,6 +178,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testInvalidOriginalAttributeType()
     {
         $config = [
@@ -170,6 +197,10 @@ class AttributeMapTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
+    /**
+     * @return void
+     */
     public function testInvalidMappedAttributeType()
     {
         $config = [
@@ -185,6 +216,10 @@ class AttributeMapTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
+    /**
+     * @return void
+     */
     public function testMissingMapFile()
     {
         $config = [
@@ -200,6 +235,10 @@ class AttributeMapTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
+    /**
+     * @return void
+     */
     public function testOverwrite()
     {
         $config = [
@@ -221,6 +260,10 @@ class AttributeMapTest extends TestCase
         $this->assertEquals($expected, $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testOverwriteReversed()
     {
         $config = [
diff --git a/tests/modules/core/lib/Auth/Process/AttributeRealmTest.php b/tests/modules/core/lib/Auth/Process/AttributeRealmTest.php
index 609b0c643..4b49708d6 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeRealmTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeRealmTest.php
@@ -9,7 +9,6 @@ use PHPUnit\Framework\TestCase;
  */
 class AttributeRealmTest extends TestCase
 {
-
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -26,6 +25,7 @@ class AttributeRealmTest extends TestCase
 
     /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -41,8 +41,10 @@ class AttributeRealmTest extends TestCase
         $this->assertEquals($attributes['realm'], ['example.org']);
     }
 
+
     /**
      * Test no userid set
+     * @return void
      */
     public function testNoUserID()
     {
@@ -55,8 +57,10 @@ class AttributeRealmTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test with configuration.
+     * @return void
      */
     public function testAttributeNameConfig()
     {
@@ -77,8 +81,10 @@ class AttributeRealmTest extends TestCase
         $this->assertEquals($attributes['schacHomeOrganization'], ['example.org']);
     }
 
+
     /**
      * When target attribute exists it will be overwritten
+     * @return void
      */
     public function testTargetAttributeOverwritten()
     {
@@ -99,8 +105,10 @@ class AttributeRealmTest extends TestCase
         $this->assertEquals($attributes['schacHomeOrganization'], ['example.org']);
     }
 
+
     /**
      * When source attribute has no "@" no realm is added
+     * @return void
      */
     public function testNoAtisNoOp()
     {
@@ -116,8 +124,10 @@ class AttributeRealmTest extends TestCase
         $this->assertArrayNotHasKey('realm', $attributes);
     }
 
+
     /**
      * When source attribute has more than one "@" no realm is added
+     * @return void
      */
     public function testMultiAtisNoOp()
     {
diff --git a/tests/modules/core/lib/Auth/Process/AttributeValueMapTest.php b/tests/modules/core/lib/Auth/Process/AttributeValueMapTest.php
index 491638fe7..c3c153a4f 100644
--- a/tests/modules/core/lib/Auth/Process/AttributeValueMapTest.php
+++ b/tests/modules/core/lib/Auth/Process/AttributeValueMapTest.php
@@ -10,7 +10,6 @@ use SimpleSAML\Module\core\Auth\Process\AttributeValueMap;
  */
 class AttributeValueMapTest extends TestCase
 {
-
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -31,6 +30,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testBasic()
     {
@@ -62,6 +62,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testNoDuplicates()
     {
@@ -94,6 +95,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testReplace()
     {
@@ -127,6 +129,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testKeep()
     {
@@ -160,6 +163,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testUnknownFlag()
     {
@@ -190,6 +194,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testMissingSourceAttribute()
     {
@@ -216,6 +221,7 @@ class AttributeValueMapTest extends TestCase
      *
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::__construct
      * @covers SimpleSAML\Module\core\Auth\Process\AttributeValueMap::process
+     * @return void
      */
     public function testMissingTargetAttribute()
     {
diff --git a/tests/modules/core/lib/Auth/Process/CardinalitySingleTest.php b/tests/modules/core/lib/Auth/Process/CardinalitySingleTest.php
index 798388628..f41317ef2 100644
--- a/tests/modules/core/lib/Auth/Process/CardinalitySingleTest.php
+++ b/tests/modules/core/lib/Auth/Process/CardinalitySingleTest.php
@@ -9,6 +9,7 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
 {
     private $http;
 
+
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -25,6 +26,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         return $request;
     }
 
+
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         \SimpleSAML\Configuration::loadFromArray([], '[ARRAY]', 'simplesaml');
@@ -33,8 +38,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
                            ->getMock();
     }
 
+
     /**
      * Test singleValued
+     * @return void
      */
     public function testSingleValuedUnchanged()
     {
@@ -52,8 +59,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
+
     /**
      * Test first value extraction
+     * @return void
      */
     public function testFirstValue()
     {
@@ -71,6 +80,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Only first value should be returned");
     }
 
+
+    /**
+     * @return void
+     */
     public function testFirstValueUnchanged()
     {
         $config = [
@@ -87,8 +100,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
+
     /**
      * Test flattening
+     * @return void
      */
     public function testFlatten()
     {
@@ -107,6 +122,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Flattened string should be returned");
     }
 
+
+    /**
+     * @return void
+     */
     public function testFlattenUnchanged()
     {
         $config = [
@@ -124,8 +143,10 @@ class CardinalitySingleTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
+
     /**
      * Test abort
+     * @return void
      */
     public function testAbort()
     {
diff --git a/tests/modules/core/lib/Auth/Process/CardinalityTest.php b/tests/modules/core/lib/Auth/Process/CardinalityTest.php
index 508338367..433944f6b 100644
--- a/tests/modules/core/lib/Auth/Process/CardinalityTest.php
+++ b/tests/modules/core/lib/Auth/Process/CardinalityTest.php
@@ -9,6 +9,7 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
 {
     private $http;
 
+
     /**
      * Helper function to run the filter with a given configuration.
      *
@@ -25,6 +26,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         return $request;
     }
 
+
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         \SimpleSAML\Configuration::loadFromArray([], '[ARRAY]', 'simplesaml');
@@ -33,8 +38,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
                            ->getMock();
     }
 
-    /*
+
+    /**
      * Test where a minimum is set but no maximum
+     * @return void
      */
     public function testMinNoMax()
     {
@@ -52,8 +59,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
-    /*
+
+    /**
      * Test where a maximum is set but no minimum
+     * @return void
      */
     public function testMaxNoMin()
     {
@@ -71,8 +80,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
-    /*
+
+    /**
      * Test in bounds within a maximum an minimum
+     * @return void
      */
     public function testMaxMin()
     {
@@ -90,8 +101,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->assertEquals($expectedData, $attributes, "Assertion values should not have changed");
     }
 
+
     /**
      * Test maximum is out of bounds results in redirect
+     * @return void
      */
     public function testMaxOutOfBounds()
     {
@@ -110,8 +123,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test minimum is out of bounds results in redirect
+     * @return void
      */
     public function testMinOutOfBounds()
     {
@@ -130,8 +145,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test missing attribute results in redirect
+     * @return void
      */
     public function testMissingAttribute()
     {
@@ -148,12 +165,15 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /*
      * Configuration errors
      */
 
+
     /**
      * Test invalid minimum values
+     * @return void
      */
     public function testMinInvalid()
     {
@@ -170,8 +190,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test invalid minimum values
+     * @return void
      */
     public function testMinNegative()
     {
@@ -188,8 +210,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test invalid maximum values
+     * @return void
      */
     public function testMaxInvalid()
     {
@@ -206,8 +230,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test maximum < minimum
+     * @return void
      */
     public function testMinGreaterThanMax()
     {
@@ -224,8 +250,10 @@ class CardinalityTest extends \PHPUnit\Framework\TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Test invalid attribute name
+     * @return void
      */
     public function testInvalidAttributeName()
     {
diff --git a/tests/modules/core/lib/Auth/Process/PHPTest.php b/tests/modules/core/lib/Auth/Process/PHPTest.php
index 56745710a..a7148af7d 100644
--- a/tests/modules/core/lib/Auth/Process/PHPTest.php
+++ b/tests/modules/core/lib/Auth/Process/PHPTest.php
@@ -27,6 +27,7 @@ class PHPTest extends TestCase
 
     /**
      * Test the configuration of the filter.
+     * @return void
      */
     public function testInvalidConfiguration()
     {
@@ -41,6 +42,7 @@ class PHPTest extends TestCase
 
     /**
      * Check that defining the code works as expected.
+     * @return void
      */
     public function testCodeDefined()
     {
@@ -59,8 +61,10 @@ class PHPTest extends TestCase
         $this->assertEquals($expected, $this->processFilter($config, $request));
     }
 
+
     /**
      * Check that the incoming attributes are also available after processing
+     * @return void
      */
     public function testPreserveIncomingAttributes()
     {
@@ -87,9 +91,11 @@ class PHPTest extends TestCase
         $this->assertEquals($expected, $this->processFilter($config, $request));
     }
 
+
     /**
      * Check that throwing an Exception inside the PHP code of the
      * filter (a documented use case) works.
+     * @return void
      */
     public function testThrowExceptionFromFilter()
     {
@@ -114,8 +120,10 @@ class PHPTest extends TestCase
         $this->processFilter($config, $request);
     }
 
+
     /**
      * Check that the entire state can be adjusted.
+     * @return void
      */
     public function testStateCanBeModified()
     {
diff --git a/tests/modules/core/lib/Auth/Process/ScopeAttributeTest.php b/tests/modules/core/lib/Auth/Process/ScopeAttributeTest.php
index 52b29234c..940542def 100644
--- a/tests/modules/core/lib/Auth/Process/ScopeAttributeTest.php
+++ b/tests/modules/core/lib/Auth/Process/ScopeAttributeTest.php
@@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase;
  */
 class ScopeAttributeTest extends TestCase
 {
-    /*
+    /**
      * Helper function to run the filter with a given configuration.
      *
      * @param array $config  The filter configuration.
@@ -23,8 +23,10 @@ class ScopeAttributeTest extends TestCase
         return $request;
     }
 
-    /*
+
+    /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -45,8 +47,10 @@ class ScopeAttributeTest extends TestCase
         $this->assertEquals($attributes['eduPersonScopedAffiliation'], ['member@example.com']);
     }
 
-    /*
+
+    /**
      * If target attribute already set, module must add, not overwrite.
+     * @return void
      */
     public function testNoOverwrite()
     {
@@ -70,8 +74,10 @@ class ScopeAttributeTest extends TestCase
         );
     }
 
-    /*
+
+    /**
      * If same scope already set, module must do nothing, not duplicate value.
+     * @return void
      */
     public function testNoDuplication()
     {
@@ -93,8 +99,9 @@ class ScopeAttributeTest extends TestCase
     }
 
 
-    /*
+    /**
      * If source attribute not set, nothing happens
+     * @return void
      */
     public function testNoSourceAttribute()
     {
@@ -114,8 +121,10 @@ class ScopeAttributeTest extends TestCase
         $this->assertEquals($request['Attributes'], $result['Attributes']);
     }
 
-    /*
+
+    /**
      * If scope attribute not set, nothing happens
+     * @return void
      */
     public function testNoScopeAttribute()
     {
@@ -135,8 +144,10 @@ class ScopeAttributeTest extends TestCase
         $this->assertEquals($request['Attributes'], $result['Attributes']);
     }
 
-    /*
+
+    /**
      * When multiple @ signs in attribute, will use the first one.
+     * @return void
      */
     public function testMultiAt()
     {
@@ -156,8 +167,10 @@ class ScopeAttributeTest extends TestCase
         $this->assertEquals($attributes['eduPersonScopedAffiliation'], ['member@doe@example.com']);
     }
 
-    /*
+
+    /**
      * When multiple values in source attribute, should render multiple targets.
+     * @return void
      */
     public function testMultivaluedSource()
     {
@@ -180,8 +193,10 @@ class ScopeAttributeTest extends TestCase
         );
     }
 
-    /*
+
+    /**
      * When the source attribute doesn't have a scope, the entire value is used.
+     * @return void
      */
     public function testNoAt()
     {
@@ -201,8 +216,10 @@ class ScopeAttributeTest extends TestCase
         $this->assertEquals($attributes['eduPersonScopedAffiliation'], ['student@example.org']);
     }
 
-    /*
+
+    /**
      * When the target attribute exists and onlyIfEmpty is set
+     * @return void
      */
     public function testOnlyIfEmpty()
     {
diff --git a/tests/modules/core/lib/Auth/Process/ScopeFromAttributeTest.php b/tests/modules/core/lib/Auth/Process/ScopeFromAttributeTest.php
index a0abea39a..365eee86a 100644
--- a/tests/modules/core/lib/Auth/Process/ScopeFromAttributeTest.php
+++ b/tests/modules/core/lib/Auth/Process/ScopeFromAttributeTest.php
@@ -9,8 +9,7 @@ use PHPUnit\Framework\TestCase;
  */
 class ScopeFromAttributeTest extends TestCase
 {
-
-    /*
+    /**
      * Helper function to run the filter with a given configuration.
      *
      * @param array $config  The filter configuration.
@@ -24,8 +23,10 @@ class ScopeFromAttributeTest extends TestCase
         return $request;
     }
 
-    /*
+
+    /**
      * Test the most basic functionality.
+     * @return void
      */
     public function testBasic()
     {
@@ -44,8 +45,10 @@ class ScopeFromAttributeTest extends TestCase
         $this->assertEquals($attributes['scope'], ['example.com']);
     }
 
-    /*
+
+    /**
      * If scope already set, module must not overwrite.
+     * @return void
      */
     public function testNoOverwrite()
     {
@@ -64,8 +67,10 @@ class ScopeFromAttributeTest extends TestCase
         $this->assertEquals($attributes['scope'], ['example.edu']);
     }
 
-    /*
+
+    /**
      * If source attribute not set, nothing happens
+     * @return void
      */
     public function testNoSourceAttribute()
     {
@@ -83,8 +88,10 @@ class ScopeFromAttributeTest extends TestCase
         $this->assertEquals($request['Attributes'], $result['Attributes']);
     }
 
-    /*
+
+    /**
      * When multiple @ signs in attribute, should use last one.
+     * @return void
      */
     public function testMultiAt()
     {
@@ -102,8 +109,10 @@ class ScopeFromAttributeTest extends TestCase
         $this->assertEquals($attributes['scope'], ['example.com']);
     }
 
-    /*
+
+    /**
      * When the source attribute doesn't have a scope, a warning is emitted
+     * @return void
      */
     public function testNoAt()
     {
diff --git a/tests/modules/core/lib/Auth/Process/TargetedIDTest.php b/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
index 33089c033..c4387bcb9 100644
--- a/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
+++ b/tests/modules/core/lib/Auth/Process/TargetedIDTest.php
@@ -23,8 +23,10 @@ class TargetedIDTest extends TestCase
         return $request;
     }
 
+
 //    /**
 //     * Test the most basic functionality
+//     * @return void
 //     */
 //    public function testBasic()
 //    {
@@ -39,9 +41,11 @@ class TargetedIDTest extends TestCase
 //        $this->assertRegExp('/^[0-9a-f]{40}$/', $attributes['eduPersonTargetedID'][0]);
 //    }
 //
+//
 //    /**
 //     * Test with src and dst entityIds.
 //     * Make sure to overwrite any present eduPersonTargetedId
+//     * @return void
 //     */
 //    public function testWithSrcDst()
 //    {
@@ -66,8 +70,10 @@ class TargetedIDTest extends TestCase
 //        $this->assertRegExp('/^[0-9a-f]{40}$/', $attributes['eduPersonTargetedID'][0]);
 //    }
 //
+//
 //    /**
 //     * Test with nameId config option set.
+//     * @return void
 //     */
 //    public function testNameIdGeneration()
 //    {
@@ -95,8 +101,10 @@ class TargetedIDTest extends TestCase
 //        );
 //    }
 //
+//
 //    /**
 //     * Test that Id is the same for subsequent invocations with same input.
+//     * @return void
 //     */
 //    public function testIdIsPersistent()
 //    {
@@ -126,8 +134,10 @@ class TargetedIDTest extends TestCase
 //        }
 //    }
 //
+//
 //    /**
 //     * Test that Id is different for two different usernames and two different sp's
+//     * @return void
 //     */
 //    public function testIdIsUnique()
 //    {
@@ -160,8 +170,10 @@ class TargetedIDTest extends TestCase
 //        $this->assertNotEquals($tid2, $tid3);
 //    }
 
+
     /**
      * Test no userid set
+     * @return void
      */
     public function testNoUserID()
     {
@@ -173,8 +185,10 @@ class TargetedIDTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test with specified attribute not set
+     * @return void
      */
     public function testAttributeNotExists()
     {
@@ -190,8 +204,10 @@ class TargetedIDTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test with configuration error 1
+     * @return void
      */
     public function testConfigInvalidAttributeName()
     {
@@ -207,8 +223,10 @@ class TargetedIDTest extends TestCase
         self::processFilter($config, $request);
     }
 
+
     /**
      * Test with configuration error 2
+     * @return void
      */
     public function testConfigInvalidNameId()
     {
diff --git a/tests/modules/core/lib/Auth/UserPassBaseTest.php b/tests/modules/core/lib/Auth/UserPassBaseTest.php
index a6715df98..51007e89c 100644
--- a/tests/modules/core/lib/Auth/UserPassBaseTest.php
+++ b/tests/modules/core/lib/Auth/UserPassBaseTest.php
@@ -4,6 +4,9 @@ namespace SimpleSAML\Test\Module\core\Auth;
 
 class UserPassBaseTest extends \PHPUnit\Framework\TestCase
 {
+    /**
+     * @return void
+     */
     public function testAuthenticateECPCallsLoginAndSetsAttributes()
     {
         $state = [
@@ -30,6 +33,9 @@ class UserPassBaseTest extends \PHPUnit\Framework\TestCase
     }
 
 
+    /**
+     * @return void
+     */
     public function testAuthenticateECPMissingUsername()
     {
         $this->expectException(\SimpleSAML\Error\Error::class, 'WRONGUSERPASS');
@@ -49,6 +55,9 @@ class UserPassBaseTest extends \PHPUnit\Framework\TestCase
     }
 
 
+    /**
+     * @return void
+     */
     public function testAuthenticateECPMissingPassword()
     {
         $this->expectException(\SimpleSAML\Error\Error::class, 'WRONGUSERPASS');
@@ -68,6 +77,9 @@ class UserPassBaseTest extends \PHPUnit\Framework\TestCase
     }
 
 
+    /**
+     * @return void
+     */
     public function testAuthenticateECPCallsLoginWithForcedUsername()
     {
         $state = [
diff --git a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
index e3a091cef..05a1a7ffd 100644
--- a/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
+++ b/tests/modules/core/lib/Auth/UserPassOrgBaseTest.php
@@ -6,6 +6,9 @@ use SimpleSAML\Module\core\Auth\UserPassOrgBase;
 
 class UserPassOrgBaseTest extends \PHPUnit\Framework\TestCase
 {
+    /**
+     * @return void
+     */
     public function testRememberOrganizationEnabled()
     {
         $config = [
diff --git a/tests/modules/core/lib/ControllerTest.php b/tests/modules/core/lib/ControllerTest.php
index f85225a28..b1125481f 100644
--- a/tests/modules/core/lib/ControllerTest.php
+++ b/tests/modules/core/lib/ControllerTest.php
@@ -26,7 +26,6 @@ use Symfony\Component\HttpFoundation\Request;
  */
 class ControllerTest extends ClearStateTestCase
 {
-
     /** @var array */
     protected $authSources;
 
@@ -42,6 +41,7 @@ class ControllerTest extends ClearStateTestCase
 
     /**
      * Set up for each test.
+     * @return void
      */
     protected function setUp()
     {
@@ -73,6 +73,7 @@ class ControllerTest extends ClearStateTestCase
     /**
      * Test that authentication is started immediately if we hit the login endpoint and there's only one non-admin
      * source configured.
+     * @return void
      */
     public function testAutomaticLoginWhenOnlyOneSource()
     {
@@ -95,6 +96,7 @@ class ControllerTest extends ClearStateTestCase
 
     /**
      * Test that the user can choose what auth source to use when there are multiple defined (admin excluded).
+     * @return void
      */
     public function testMultipleAuthSources()
     {
@@ -126,6 +128,7 @@ class ControllerTest extends ClearStateTestCase
 
     /**
      * Test that specifying an invalid auth source while trying to login raises an exception.
+     * @return void
      */
     public function testLoginWithInvalidAuthSource()
     {
@@ -143,6 +146,7 @@ class ControllerTest extends ClearStateTestCase
     /**
      * Test that we get redirected to /account/authsource when accessing the login endpoint while being already
      * authenticated.
+     * @return void
      */
     public function testLoginWhenAlreadyAuthenticated()
     {
@@ -176,6 +180,7 @@ class ControllerTest extends ClearStateTestCase
 
     /**
      * Test that triggering the logout controller actually proceeds to log out from the specified source.
+     * @return void
      */
     public function testLogout()
     {
@@ -196,6 +201,7 @@ class ControllerTest extends ClearStateTestCase
     /**
      * Test that accessing the "account" endpoint without being authenticated gets you redirected to the "login"
      * endpoint.
+     * @return void
      */
     public function testNotAuthenticated()
     {
@@ -216,6 +222,7 @@ class ControllerTest extends ClearStateTestCase
 
     /**
      * Test that we are presented with a regular page if we are authenticated and try to access the "account" endpoint.
+     * @return void
      */
     public function testAuthenticated()
     {
diff --git a/tests/modules/core/lib/Storage/SQLPermanentStorageTest.php b/tests/modules/core/lib/Storage/SQLPermanentStorageTest.php
index 1d8f4d700..e073b6e5b 100644
--- a/tests/modules/core/lib/Storage/SQLPermanentStorageTest.php
+++ b/tests/modules/core/lib/Storage/SQLPermanentStorageTest.php
@@ -11,6 +11,10 @@ class SQLPermanentStorageTest extends TestCase
 {
     private static $sql;
 
+
+    /**
+     * @return void
+     */
     public static function setUpBeforeClass()
     {
         // Create instance
@@ -20,12 +24,20 @@ class SQLPermanentStorageTest extends TestCase
         self::$sql = new \SimpleSAML\Module\core\Storage\SQLPermanentStorage('test', $config);
     }
 
+
+    /**
+     * @return void
+     */
     public static function tearDownAfterClass()
     {
         self::$sql = null;
         unlink(sys_get_temp_dir().'/sqllite/test.sqlite');
     }
 
+
+    /**
+     * @return void
+     */
     public function testSet()
     {
         // Set a new value
@@ -36,6 +48,10 @@ class SQLPermanentStorageTest extends TestCase
         $this->assertEquals('testvalue', $result['value']);
     }
 
+
+    /**
+     * @return void
+     */
     public function testSetOverwrite()
     {
         // Overwrite existing value
@@ -49,6 +65,10 @@ class SQLPermanentStorageTest extends TestCase
         $this->assertEquals('testvaluemodified', $result[0]['value']);
     }
 
+
+    /**
+     * @return void
+     */
     public function testNonexistentKey()
     {
         // Test that getting some non-existing key will return null
@@ -60,6 +80,10 @@ class SQLPermanentStorageTest extends TestCase
         $this->assertNull($result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testExpiration()
     {
         // Make sure the earlier created entry has expired now
@@ -78,6 +102,10 @@ class SQLPermanentStorageTest extends TestCase
         $this->assertEquals('testvalue_nonexpiring', $result);
     }
 
+
+    /**
+     * @return void
+     */
     public function testRemove()
     {
         // Now remove the nonexpiring entry and make sure it's gone
diff --git a/tests/modules/multiauth/lib/Auth/Source/MultiAuthTest.php b/tests/modules/multiauth/lib/Auth/Source/MultiAuthTest.php
index 632fca862..e9eeabd42 100644
--- a/tests/modules/multiauth/lib/Auth/Source/MultiAuthTest.php
+++ b/tests/modules/multiauth/lib/Auth/Source/MultiAuthTest.php
@@ -11,6 +11,10 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
     /** @var Configuration */
     private $sourceConfig;
 
+
+    /**
+     * @return void
+     */
     public function setUp()
     {
         $this->config = Configuration::loadFromArray(['module.enable' => ['multiauth' => true]], '[ARRAY]', 'simplesaml');
@@ -55,7 +59,9 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         Configuration::setPreLoadedConfig($this->sourceConfig, 'authsources.php');
     }
 
+
     /**
+     * @return void
      */
     public function testSourcesMustBePresent()
     {
@@ -72,7 +78,9 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         new MultiAuth(['AuthId' => 'example-multi'], $sourceConfig->getArray('example-multi'));
     }
 
+
     /**
+     * @return void
      */
     public function testPreselectMustBeValid()
     {
@@ -119,6 +127,10 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         new MultiAuth(['AuthId' => 'example-multi'], $sourceConfig->getArray('example-multi'));
     }
 
+
+    /**
+     * @return void
+     */
     public function testPreselectIsOptional()
     {
         $sourceConfig = Configuration::loadFromArray(array(
@@ -171,6 +183,10 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertArrayNotHasKey('multiauth:preselect', $state);
     }
 
+
+    /**
+     * @return void
+     */
     public function testPreselectCanBeConfigured()
     {
         $state = [];
@@ -186,6 +202,10 @@ class MultiAuthTest extends \SimpleSAML\Test\Utils\ClearStateTestCase
         $this->assertEquals('example-saml', $state['multiauth:preselect']);
     }
 
+
+    /**
+     * @return void
+     */
     public function testStatePreselectHasPriority()
     {
         $state = ['multiauth:preselect' => 'example-admin'];
diff --git a/tests/modules/saml/lib/Auth/Process/FilterScopesTest.php b/tests/modules/saml/lib/Auth/Process/FilterScopesTest.php
index 20e9400b6..b81579982 100644
--- a/tests/modules/saml/lib/Auth/Process/FilterScopesTest.php
+++ b/tests/modules/saml/lib/Auth/Process/FilterScopesTest.php
@@ -12,8 +12,7 @@ use PHPUnit\Framework\TestCase;
 
 class FilterScopesTest extends TestCase
 {
-
-    /*
+    /**
      * Helper function to run the filter with a given configuration.
      *
      * @param array $config  The filter configuration.
@@ -30,6 +29,7 @@ class FilterScopesTest extends TestCase
 
     /**
      * Test valid scopes.
+     * @return void
      */
     public function testValidScopes()
     {
@@ -91,6 +91,7 @@ class FilterScopesTest extends TestCase
 
     /**
      * Test invalid scopes.
+     * @return void
      */
     public function testInvalidScopes()
     {
diff --git a/tests/modules/saml/lib/Auth/Process/NameIDAttributeTest.php b/tests/modules/saml/lib/Auth/Process/NameIDAttributeTest.php
index 333523302..12b2bbcd2 100644
--- a/tests/modules/saml/lib/Auth/Process/NameIDAttributeTest.php
+++ b/tests/modules/saml/lib/Auth/Process/NameIDAttributeTest.php
@@ -17,8 +17,7 @@ use SAML2\Constants;
 
 class NameIDAttributeTest extends TestCase
 {
-
-    /*
+    /**
      * Helper function to run the filter with a given configuration.
      *
      * @param array $config  The filter configuration.
@@ -35,6 +34,7 @@ class NameIDAttributeTest extends TestCase
 
     /**
      * Test minimal configuration.
+     * @return void
      */
     public function testMinimalConfig()
     {
@@ -62,8 +62,10 @@ class NameIDAttributeTest extends TestCase
         $this->assertEquals("{$spId}!{$idpId}!{$nameId->getValue()}", $result['Attributes']['nameid'][0]);
     }
 
+
     /**
      * Test custom attribute name.
+     * @return void
      */
     public function testCustomAttributeName()
     {
@@ -92,8 +94,10 @@ class NameIDAttributeTest extends TestCase
         $this->assertEquals("{$spId}!{$idpId}!{$nameId->getValue()}", $result['Attributes'][$attributeName][0]);
     }
 
+
     /**
      * Test custom format.
+     * @return void
      */
     public function testFormat()
     {
@@ -123,6 +127,7 @@ class NameIDAttributeTest extends TestCase
 
     /**
      * Test custom attribute name with format.
+     * @return void
      */
     public function testCustomAttributeNameAndFormat()
     {
diff --git a/tests/modules/saml/lib/Auth/Source/Auth_Source_SP_Test.php b/tests/modules/saml/lib/Auth/Source/Auth_Source_SP_Test.php
index b9b275501..aed55681f 100644
--- a/tests/modules/saml/lib/Auth/Source/Auth_Source_SP_Test.php
+++ b/tests/modules/saml/lib/Auth/Source/Auth_Source_SP_Test.php
@@ -19,6 +19,9 @@ class ExitTestException extends \Exception
     private $testResult;
 
 
+    /**
+     * @return void
+     */
     public function __construct($testResult)
     {
         parent::__construct("ExitTestException", 0, null);
@@ -26,6 +29,9 @@ class ExitTestException extends \Exception
     }
 
 
+    /**
+     * @return array
+     */
     public function getTestResult()
     {
         return $this->testResult;
@@ -40,13 +46,18 @@ class ExitTestException extends \Exception
  */
 class SPTester extends \SimpleSAML\Module\saml\Auth\Source\SP
 {
-
+    /**
+     * @return void
+     */
     public function __construct($info, $config)
     {
         parent::__construct($info, $config);
     }
 
 
+    /**
+     * @return void
+     */
     public function startSSO2Test(Configuration $idpMetadata, array $state)
     {
         $reflector = new \ReflectionObject($this);
@@ -56,7 +67,10 @@ class SPTester extends \SimpleSAML\Module\saml\Auth\Source\SP
     }
 
 
-    // override the method that sends the request to avoid sending anything
+    /**
+     * override the method that sends the request to avoid sending anything
+     * @return void
+     */
     public function sendSAML2AuthnRequest(array &$state, \SAML2\Binding $binding, \SAML2\AuthnRequest $ar)
     {
         // Exit test. Continuing would mean running into a assert(FALSE)
@@ -76,12 +90,14 @@ class SPTester extends \SimpleSAML\Module\saml\Auth\Source\SP
  */
 class SPTest extends ClearStateTestCase
 {
-
     private $idpMetadata = null;
 
     private $idpConfigArray;
 
 
+    /**
+     * @return \SimpleSAML\Configuration
+     */
     private function getIdpMetadata()
     {
         if (!$this->idpMetadata) {
@@ -95,6 +111,9 @@ class SPTest extends ClearStateTestCase
     }
 
 
+    /**
+     * @return void
+     */
     protected function setUp()
     {
         parent::setUp();
@@ -166,6 +185,7 @@ class SPTest extends ClearStateTestCase
     /**
      * Test generating an AuthnRequest
      * @test
+     * @return void
      */
     public function testAuthnRequest()
     {
@@ -190,7 +210,8 @@ class SPTest extends ClearStateTestCase
 
     /**
      * Test setting a Subject
-     * @test *
+     * @test
+     * @return void
      */
     public function testNameID()
     {
@@ -222,7 +243,8 @@ class SPTest extends ClearStateTestCase
 
     /**
      * Test setting an AuthnConextClassRef
-     * @test *
+     * @test
+     * @return void
      */
     public function testAuthnContextClassRef()
     {
@@ -251,7 +273,8 @@ class SPTest extends ClearStateTestCase
 
     /**
      * Test setting ForcedAuthn
-     * @test *
+     * @test
+     * @return void
      */
     public function testForcedAuthn()
     {
@@ -276,8 +299,10 @@ class SPTest extends ClearStateTestCase
         );
     }
 
+
     /**
      * Test specifying an IDPList where no metadata found for those idps is an error
+     * @return void
      */
     public function testIdpListWithNoMatchingMetadata()
     {
@@ -292,8 +317,10 @@ class SPTest extends ClearStateTestCase
         $as->authenticate($state);
     }
 
+
     /**
      * Test specifying an IDPList where the list does not overlap with the Idp specified in SP config is an error
+     * @return void
      */
     public function testIdpListWithExplicitIdpNotMatch()
     {
@@ -318,8 +345,10 @@ class SPTest extends ClearStateTestCase
         $as->authenticate($state);
     }
 
+
     /**
      * Test that IDPList overlaps with the IDP specified in SP config results in AuthnRequest
+     * @return void
      */
     public function testIdpListWithExplicitIdpMatch()
     {
@@ -356,8 +385,10 @@ class SPTest extends ClearStateTestCase
         }
     }
 
+
     /**
      * Test that IDPList with a single valid idp and no SP config idp results in AuthnRequest to that idp
+     * @return void
      */
     public function testIdpListWithSingleMatch()
     {
@@ -392,8 +423,10 @@ class SPTest extends ClearStateTestCase
         }
     }
 
+
     /**
      * Test that IDPList with multiple valid idp and no SP config idp results in discovery redirect
+     * @return void
      */
     public function testIdpListWithMultipleMatch()
     {
diff --git a/tests/modules/saml/lib/IdP/SAML2Test.php b/tests/modules/saml/lib/IdP/SAML2Test.php
index a79ae36b6..ebce96d27 100644
--- a/tests/modules/saml/lib/IdP/SAML2Test.php
+++ b/tests/modules/saml/lib/IdP/SAML2Test.php
@@ -28,10 +28,13 @@ class SAML2Test extends ClearStateTestCase
         'saml:NameIDFormat' => null,
         'saml:AllowCreate' => true,
         'saml:Extensions' => null,
-        'saml:RequestedAuthnContext' => null];
+        'saml:RequestedAuthnContext' => null
+    ];
+
 
     /**
      * Test that invoking the idp initiated endpoint with the minimum necessary parameters works.
+     * @return void
      */
     public function testIdPInitiatedLoginMinimumParams()
     {
@@ -53,8 +56,10 @@ class SAML2Test extends ClearStateTestCase
         $this->assertEquals($expectedState, $state);
     }
 
+
     /**
      * Test that invoking the idp initiated endpoint with the optional parameters works.
+     * @return void
      */
     public function testIdPInitiatedLoginOptionalParams()
     {
@@ -86,8 +91,10 @@ class SAML2Test extends ClearStateTestCase
         $this->assertEquals($expectedState, $state);
     }
 
+
     /**
      * Test that invoking the idp initiated endpoint using minimum shib params works
+     * @return void
      */
     public function testIdPInitShibCompatyMinimumParams()
     {
@@ -111,8 +118,10 @@ class SAML2Test extends ClearStateTestCase
         $this->assertEquals($expectedState, $state);
     }
 
+
     /**
      * Test that invoking the idp initiated endpoint using minimum shib params works
+     * @return void
      */
     public function testIdPInitShibCompatOptionalParams()
     {
@@ -141,6 +150,7 @@ class SAML2Test extends ClearStateTestCase
         $this->assertEquals($expectedState, $state);
     }
 
+
     /**
      * Invoke IDP initiated login with the given query parameters.
      * Callers should validate the return state array or confirm appropriate exceptions are returned.
diff --git a/tests/www/IndexTest.php b/tests/www/IndexTest.php
index 4e4326c6b..e0da79a34 100644
--- a/tests/www/IndexTest.php
+++ b/tests/www/IndexTest.php
@@ -41,6 +41,7 @@ class IndexTest extends TestCase
 
     /**
      * The setup method that is run before any tests in this class.
+     * @return void
      */
     protected function setup()
     {
@@ -53,6 +54,9 @@ class IndexTest extends TestCase
     }
 
 
+    /**
+     * @return void
+     */
     protected function updateConfig($config)
     {
         @unlink($this->shared_file);
@@ -63,6 +67,7 @@ class IndexTest extends TestCase
 
     /**
      * A simple test to make sure the index.php file redirects appropriately to the right URL.
+     * @return void
      */
     public function testRedirection()
     {
@@ -109,6 +114,7 @@ class IndexTest extends TestCase
 
     /**
      * The tear down method that is executed after all tests in this class.
+     * @return void
      */
     protected function tearDown()
     {
diff --git a/tests/www/RouterTest.php b/tests/www/RouterTest.php
index d653b1b1d..c872bfb07 100644
--- a/tests/www/RouterTest.php
+++ b/tests/www/RouterTest.php
@@ -2,14 +2,17 @@
 
 namespace SimpleSAML\Test\Web;
 
+use PHPUnit\Framework\TestCase;
+use SimpleSAML\Configuration;
+use SimpleSAML\Module;
 use Symfony\Component\Yaml\Parser;
 use Symfony\Component\Yaml\Exception\ParseException;
-use PHPUnit\Framework\TestCase;
-use \SimpleSAML\Configuration;
-use \SimpleSAML\Module;
 
 class RouterTest extends TestCase
 {
+    /**
+     * @return void
+     */
     public function testSyntax()
     {
         $config = Configuration::loadFromArray([
diff --git a/tests/www/TemplateTest.php b/tests/www/TemplateTest.php
index 8eed3e7b8..3a8f2cd6d 100644
--- a/tests/www/TemplateTest.php
+++ b/tests/www/TemplateTest.php
@@ -16,6 +16,9 @@ use Twig\Error\SyntaxError;
 
 class TemplateTest extends TestCase
 {
+    /**
+     * @return void
+     */
     public function testSyntax()
     {
         $config = Configuration::loadFromArray([
-- 
GitLab