Problem/Motivation

The Quiz forms at quiz/src/Form/ contain boilerplate that can be removed. The parameters docblock for the constructor can be removed in accordance with constructor promotion.

Steps to reproduce

N/A

Proposed resolution

All form classes extending FormBase or ConfigFormBase will need the AutowireTrait to be added for BC before 11.4. With 11.4 the trait is added to FormBase. ConfigFormBase extends from FormBase.

Add Use AutowireTrait; to the form classes and add the class to the use statements.
Remove redundant use statements(s).
Add 'readonly' to constructor parameters where appropriate.
Remove the constructor docblock replace it with a single line docblock.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

Issue fork quiz-3588048

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

oily created an issue. See original summary.

oily’s picture

Status: Active » Needs work

oily’s picture

Status: Needs work » Needs review