From e692710ce783cf3d42e7e157e7bb18c12b2107ec Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Sun, 19 Apr 2020 11:32:40 +0300 Subject: [PATCH] Add @psalm-assert and @psalm-pure to Assert::classExists (#186) Closes #185 --- src/Assert.php | 3 +++ tests/static-analysis/assert-classExists.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Assert.php b/src/Assert.php index 05970a71..175d1f3b 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -1668,6 +1668,9 @@ public static function writable($value, $message = '') } /** + * @psalm-pure + * @psalm-assert class-string $value + * * @param mixed $value * @param string $message * diff --git a/tests/static-analysis/assert-classExists.php b/tests/static-analysis/assert-classExists.php index 1bc81433..88740d7c 100644 --- a/tests/static-analysis/assert-classExists.php +++ b/tests/static-analysis/assert-classExists.php @@ -4,9 +4,9 @@ use Webmozart\Assert\Assert; - /** - * @psalm-param class-string $value + * @psalm-pure + * @psalm-param mixed $value * * @psalm-return class-string */