[Form] fix phpdoc of Form::hasErrors
This commit is contained in:
parent
5cb82648ad
commit
d5eb4f730b
|
@ -770,18 +770,15 @@ class Form implements \IteratorAggregate, FormInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not there are errors.
|
||||
* Returns whether there are errors associated with this form.
|
||||
*
|
||||
* @return Boolean true if form is bound and not valid
|
||||
* @return Boolean
|
||||
*
|
||||
* @deprecated Deprecated since version 2.1, to be removed in 2.3. Count
|
||||
* {@link getErrors()} instead.
|
||||
*/
|
||||
public function hasErrors()
|
||||
{
|
||||
// Don't call isValid() here, as its semantics are slightly different
|
||||
// Forms are not valid if their children are invalid, but
|
||||
// hasErrors() returns only true if a form itself has errors
|
||||
return count($this->errors) > 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ interface FormInterface extends \ArrayAccess, \Traversable, \Countable
|
|||
public function addError(FormError $error);
|
||||
|
||||
/**
|
||||
* Returns whether the form is valid.
|
||||
* Returns whether the form and all children are valid.
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
|
|
Reference in New Issue