Skip to content

Commit e095afb

Browse files
grelujaviereguiluz
authored andcommitted
Propose identical comparison
Hi, I suggest this : the identical comparison is better compared to the eqal comparison. Grégory
1 parent 4dc06e9 commit e095afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

best_practices/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ to the ``Post`` entity that checks if a given user is its author::
177177
*/
178178
public function isAuthor(User $user = null)
179179
{
180-
return $user && $user->getEmail() == $this->getAuthorEmail();
180+
return $user && $user->getEmail() === $this->getAuthorEmail();
181181
}
182182
}
183183

0 commit comments

Comments
 (0)