From 817b58fe1ee05d1629745f17ce0b4a2860a74ad9 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Tue, 22 Feb 2022 21:45:56 +0100
Subject: [PATCH] Help Psalm to decide on the return-value

---
 lib/SimpleSAML/Auth/State.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php
index 596ce65b9..032d00473 100644
--- a/lib/SimpleSAML/Auth/State.php
+++ b/lib/SimpleSAML/Auth/State.php
@@ -260,6 +260,7 @@ class State
      * @throws \Exception If the stage of the state is invalid and there's no URL defined to redirect to.
      *
      * @return array|null  State information, or NULL if the state is missing and $allowMissing is true.
+     * @psalm-return ($allowMissing is true ? array|null : array)
      */
     public static function loadState(string $id, string $stage, bool $allowMissing = false): ?array
     {
-- 
GitLab