Skip to content

Commit 9ae38a5

Browse files
fre5hnicolas-grekas
authored andcommitted
Use ::class constants instead of __NAMESPACE__ when possible
1 parent 44645bd commit 9ae38a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Validator/Constraints/UniqueEntityValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct($registry)
4444
public function validate($entity, Constraint $constraint)
4545
{
4646
if (!$constraint instanceof UniqueEntity) {
47-
throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\UniqueEntity');
47+
throw new UnexpectedTypeException($constraint, UniqueEntity::class);
4848
}
4949

5050
if (!\is_array($constraint->fields) && !\is_string($constraint->fields)) {

0 commit comments

Comments
 (0)