Removes methods from TranslatorAwareInterface and the implementations in AbstractValidator:
hasTranslator
setTranslatorEnabled
isTranslatorEnabled
setTranslatorTextDomain
getTranslatorTextDomain
Leaving only setTranslator and getTranslator
Enabling and disabling translation can be done via options. The getters are unnecessary.
Removes methods from AbstractValidator:
getOption
getOptions
setOptions
getMessageVariables
getMessageTemplates
setMessages
setValueObscured
isValueObscured
getDefaultTranslator
hasDefaultTranslator
getDefaultTranslatorTextDomain
getMessageLength
Reduces the API surface of AbstractValidator making a number of previously protected methods private.
Removes abstractOptions property in favour of protected or private instance properties.
Remove a number of useless tests that verified the content of internal properties, i.e. ensuring that messageTemplates were identical to the declaration.
Appends the options relevant to the abstract class such as translator, messages etc to all the options declarations in concrete validators. Psalm does not support unions of array shapes in type declarations.
Adds more types: Down to ~230 psalm issues and 99.2% type coverage
Description
Removes methods from
TranslatorAwareInterface
and the implementations inAbstractValidator
:hasTranslator
setTranslatorEnabled
isTranslatorEnabled
setTranslatorTextDomain
getTranslatorTextDomain
Leaving only
setTranslator
andgetTranslator
Enabling and disabling translation can be done via options. The getters are unnecessary.
Removes methods from
AbstractValidator
:getOption
getOptions
setOptions
getMessageVariables
getMessageTemplates
setMessages
setValueObscured
isValueObscured
getDefaultTranslator
hasDefaultTranslator
getDefaultTranslatorTextDomain
getMessageLength
Reduces the API surface of
AbstractValidator
making a number of previouslyprotected
methodsprivate
.Removes
abstractOptions
property in favour of protected or private instance properties.Remove a number of useless tests that verified the content of internal properties, i.e. ensuring that
messageTemplates
were identical to the declaration.Appends the options relevant to the abstract class such as
translator
,messages
etc to all the options declarations in concrete validators. Psalm does not support unions of array shapes in type declarations.Adds more types: Down to ~230 psalm issues and 99.2% type coverage