From f72e1ed3a505f3f565d4aa147e80ba79de40b4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Delannoy?= Date: Thu, 22 Mar 2018 16:12:28 +0100 Subject: [PATCH] Propose identical comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, I suggest this : the identical comparison is better compared to the eqal comparison. Grégory --- best_practices/security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/best_practices/security.rst b/best_practices/security.rst index cf53ee2d405..a78f8327196 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -181,7 +181,7 @@ to the ``Post`` entity that checks if a given user is its author:: */ public function isAuthor(User $user = null) { - return $user && $user->getEmail() == $this->getAuthorEmail(); + return $user && $user->getEmail() === $this->getAuthorEmail(); } }