Problem/Motivation
$alreadyAccepted is used as a bool, but type hinted as a string, this causes alerts from phpstan when writing a custom plugin.
Steps to reproduce
Review TFABasePlugin, observe it is assigned boolean values not string values.
In both TfaTotpValidation and TfaHotpValidation we already override this typehint giving more weight to the argument this can be changed.
Proposed resolution
Change typehint to bool, remove unnecessary definitions in extending classes.
Remaining tasks
User interface changes
None
API changes
Typehint change correcting to match how variable has been actually utilized.
Data model changes
None
Issue fork tfa-3351698
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
Comment #3
cmlaraComment #6
cmlara