diff --git a/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php b/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php
index 42ef300f39b3c68bdbb23e1a1ae7a89620e707ef..b6e7896715bcbe39cf21161d33ab01e6f1f28875 100644
--- a/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php
+++ b/modules/authYubiKey/lib/Auth/Process/OTP2YubiPrefix.php
@@ -52,6 +52,7 @@ class OTP2YubiPrefix extends \SimpleSAML\Auth\ProcessingFilter
      * a 'yubiPrefix' attribute that leaves out the dynamic part.
      *
      * @param array &$state  The state we should update.
+     * @return void
      */
     public function process(&$state)
     {
diff --git a/modules/authYubiKey/lib/Auth/Source/YubiKey.php b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
index 65ddf84906d3de16f15fc0f04efc73100fe2cb0e..864f595cbe658ce58ce19e81dd6d958b9c970566 100644
--- a/modules/authYubiKey/lib/Auth/Source/YubiKey.php
+++ b/modules/authYubiKey/lib/Auth/Source/YubiKey.php
@@ -62,10 +62,14 @@ class YubiKey extends \SimpleSAML\Auth\Source
 
     /**
      * The client id/key for use with the Auth_Yubico PHP module.
+     * @var string
      */
     private $yubi_id;
+
+    /** @var string */
     private $yubi_key;
 
+
     /**
      * Constructor for this authentication source.
      *
@@ -97,6 +101,7 @@ class YubiKey extends \SimpleSAML\Auth\Source
      * login page.
      *
      * @param array &$state  Information about the current authentication.
+     * @return void
      */
     public function authenticate(&$state)
     {
@@ -162,8 +167,12 @@ class YubiKey extends \SimpleSAML\Auth\Source
         return null;
     }
 
+
     /**
      * Return the user id part of a one time passord
+     *
+     * @param string $otp
+     * @return string
      */
     public static function getYubiKeyPrefix($otp)
     {
@@ -171,6 +180,7 @@ class YubiKey extends \SimpleSAML\Auth\Source
         return $uid;
     }
 
+
     /**
      * Attempt to log in using the given username and password.
      *
diff --git a/modules/authYubiKey/libextinc/Yubico.php b/modules/authYubiKey/libextinc/Yubico.php
index d6f4c709aafe84ea19f5ff1a6724a8b322d49c59..d222f6b67e07a18c6b045a26cef2c7623fead10d 100644
--- a/modules/authYubiKey/libextinc/Yubico.php
+++ b/modules/authYubiKey/libextinc/Yubico.php
@@ -125,9 +125,11 @@ class Auth_Yubico
         // Support https
         $url = "https://api.yubico.com/wsapi/verify?".$parameters;
 
+        /** @var string $responseMsg */
         $responseMsg = \SimpleSAML\Utils\HTTP::fetch($url);
 
-        if (!preg_match("/status=([a-zA-Z0-9_]+)/", $responseMsg, $out)) {
+        $out = [];
+        if (preg_match("/status=([a-zA-Z0-9_]+)/", $responseMsg, $out) !== 1) {
             throw new Exception('Could not parse response');
         }