[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.
This commit is contained in:
Nate 2016-03-11 18:42:00 -06:00
parent fcac5dd87e
commit a784743609
1 changed files with 4 additions and 4 deletions

View File

@ -69,9 +69,9 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface
* This method returns the equivalent PHP tokens for most scalar types
* (i.e. "false" for false, "1" for 1 etc.). Strings are always wrapped
* in double quotes ("). Objects, arrays and resources are formatted as
* "object", "array" and "resource". If the parameter $prettyDateTime
* is set to true, {@link \DateTime} objects will be formatted as
* RFC-3339 dates ("Y-m-d H:i:s").
* "object", "array" and "resource". If the $format bitmask contains
* the PRETTY_DATE bit, then {@link \DateTime} objects will be formatted
* as RFC-3339 dates ("Y-m-d H:i:s").
*
* Be careful when passing message parameters to a constraint violation
* that (may) contain objects, arrays or resources. These parameters
@ -99,7 +99,7 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface
}
if (is_object($value)) {
if ($format & self::OBJECT_TO_STRING && method_exists($value, '__toString')) {
if (($format & self::OBJECT_TO_STRING) && method_exists($value, '__toString')) {
return $value->__toString();
}