From 9d74d26814d8733b1bf14775a39208c9f534c023 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 15 Apr 2025 10:53:41 +0200 Subject: [PATCH] [RFC] chore: use assert instead of phpdoc --- security/voters.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/voters.rst b/security/voters.rst index e7452fadf99..1198f83e7ad 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -172,9 +172,9 @@ would look like this:: return false; } - // you know $subject is a Post object, thanks to `supports()` - /** @var Post $post */ + // $subject is a Post object, thanks to `supports()` above $post = $subject; + assert($post instanceof Post); return match($attribute) { self::VIEW => $this->canView($post, $user),