Skip to content

Commit 5440435

Browse files
Update custom_constraint.rst
Usage of self::class instead of get_class($this)
1 parent 86b108f commit 5440435

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ has this default logic::
4545
// in the base Symfony\Component\Validator\Constraint class
4646
public function validatedBy()
4747
{
48-
return \get_class($this).'Validator';
48+
return static::class.'Validator';
4949
}
5050

5151
In other words, if you create a custom ``Constraint`` (e.g. ``MyConstraint``),

0 commit comments

Comments
 (0)