Skip to content

Commit 3682e81

Browse files
committed
[Validator] Updating inaccurate docblock comment
The formatValue() docblock refers to a $prettyDateTime argument, which does not exist. Instead, it should refer to the $format argument.
1 parent cc862ed commit 3682e81

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ConstraintValidator.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ protected function formatTypeOf($value)
6969
* This method returns the equivalent PHP tokens for most scalar types
7070
* (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped
7171
* in double quotes ("). Objects, arrays and resources are formatted as
72-
* "object", "array" and "resource". If the parameter $prettyDateTime
73-
* is set to true, {@link \DateTime} objects will be formatted as
74-
* RFC-3339 dates ("Y-m-d H:i:s").
72+
* "object", "array" and "resource". If the $format bitmask contains
73+
* the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted
74+
* as RFC-3339 dates ("Y-m-d H:i:s").
7575
*
7676
* Be careful when passing message parameters to a constraint violation
7777
* that (may) contain objects, arrays or resources. These parameters
@@ -99,7 +99,7 @@ protected function formatValue($value, $format = 0)
9999
}
100100

101101
if (is_object($value)) {
102-
if ($format & self::OBJECT_TO_STRING && method_exists($value, '__toString')) {
102+
if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) {
103103
return $value->__toString();
104104
}
105105

0 commit comments

Comments
 (0)