Repository: symfony/symfony
File: src/Symfony/Component/Form/FormInterface.php (PHP)

Code before:
     * @param bool $deep    Whether to include errors of child forms as well
     * @param bool $flatten Whether to flatten the list of errors in case
     *                      $deep is set to true
     */
    public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIterator;

    /**
     * Updates the form with default model data.
     *
     * @param mixed $modelData The data formatted as expected for the underlying object
     *
     * @return $this
     *
     * @throws Exception\AlreadySubmittedException     If the form has already been submitted
     * @throws Exception\LogicException                if the view data does not match the expected type
     *                                                 according to {@link FormConfigInterface::getDataClass}
     * @throws Exception\RuntimeException              If listeners try to call setData in a cycle or if
     *                                                 the form inherits data from its parent
     * @throws Exception\TransformationFailedException if the synchronization failed
     */
    public function setData(mixed $modelData): static;

    /**
     * Returns the model data in the format needed for the underlying object.
     *
     * @return null|T When the field is not submitted, the default data is returned.
     *                When the field is submitted, the default data has been bound
     *                to the submitted view data.
     *
     * @throws Exception\RuntimeException If the form inherits data but has no parent
     */
    public function getData(): mixed;

    /**
     * Returns the normalized data of the field, used as internal bridge
     * between model data and view data.
     *
     * @return mixed When the field is not submitted, the default data is returned.
     *               When the field is submitted, the normalized submitted data
     *               is returned if the field is synchronized with the view data,
     *               null otherwise.
     *
     * @throws Exception\RuntimeException If the form inherits data but has no parent
     */
    public function getNormData(): mixed;

    /**
     * Returns the view data of the field.
     *
     * It may be defined by {@link FormConfigInterface::getDataClass}.
     *

Review comment (suggestion):
```suggestion
     * @return T|null When the field is not submitted, the default data is returned.
```

Code after:
     * @param bool $deep    Whether to include errors of child forms as well
     * @param bool $flatten Whether to flatten the list of errors in case
     *                      $deep is set to true
     */
    public function getErrors(bool $deep = false, bool $flatten = true): FormErrorIterator;

    /**
     * Updates the form with default model data.
     *
     * @param mixed $modelData The data formatted as expected for the underlying object
     *
     * @return $this
     *
     * @throws Exception\AlreadySubmittedException     If the form has already been submitted
     * @throws Exception\LogicException                if the view data does not match the expected type
     *                                                 according to {@link FormConfigInterface::getDataClass}
     * @throws Exception\RuntimeException              If listeners try to call setData in a cycle or if
     *                                                 the form inherits data from its parent
     * @throws Exception\TransformationFailedException if the synchronization failed
     */
    public function setData(mixed $modelData): static;

    /**
     * Returns the model data in the format needed for the underlying object.
     *
     * @return T|null When the field is not submitted, the default data is returned.
     *                When the field is submitted, the default data has been bound
     *                to the submitted view data.
     *
     * @throws Exception\RuntimeException If the form inherits data but has no parent
     */
    public function getData(): mixed;

    /**
     * Returns the normalized data of the field, used as internal bridge
     * between model data and view data.
     *
     * @return mixed When the field is not submitted, the default data is returned.
     *               When the field is submitted, the normalized submitted data
     *               is returned if the field is synchronized with the view data,
     *               null otherwise.
     *
     * @throws Exception\RuntimeException If the form inherits data but has no parent
     */
    public function getNormData(): mixed;

    /**
     * Returns the view data of the field.
     *
     * It may be defined by {@link FormConfigInterface::getDataClass}.
     *