From cbe0b11b78140bc62a921fec33a730fdaa6540d6 Mon Sep 17 00:00:00 2001 From: Paragon Initiative Enterprises Date: Wed, 6 Jun 2018 01:04:48 -0400 Subject: [PATCH] I'm tired of wrestling with this. We conditionally define random_bytes() and fallback to an implementation that ALWAYS throws an Exception. However, in libraries that consume random_compat, we want the type hint to always be a string. So, I'm done. Suppress the damn error (but still print it) and let's move on with our lives. --- lib/random.php | 1 + psalm.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/random.php b/lib/random.php index 080b87c..475caab 100644 --- a/lib/random.php +++ b/lib/random.php @@ -204,6 +204,7 @@ class_exists('COM') * * @param mixed $length * @psalm-suppress MissingReturnType + * @psalm-suppress InvalidReturnType * @throws Exception * @return string */ diff --git a/psalm.xml b/psalm.xml index ee072a9..596d99d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,5 +14,6 @@ +