Return type for PrivateMessageConfigFormBase::validateForm() should be void.

Created on 30 September 2024, 7 months ago

Problem/Motivation

The method validateForm is intended to change the $form_state in case of errors and it doesn't need to return anything.

But \Drupal\private_message\Plugin\PrivateMessageConfigForm\PrivateMessageConfigFormBase::validateForm() is returning an (empty) array.

Proposed resolution

Since removing the return of the empty array makes the function empty, is it better to remove the method validateForm?

Remaining tasks

Is it a good opportunity to add the (correct) return types all over?
Right now, the return types are rare.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡΅πŸ‡ΉPortugal dxvargas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024