whip
whip copied to clipboard
Design issue with `Whip_Requirement`
The interface Whip_Requirement
wants to be an abstract requirement that only knows about a ::component()
. However, in Whip_RequirementsChecker::requirementIsFulfilled()
, the requirements version()
is being checked, despite the interface not having such a method.
So, either Whip_Requirement
is actually a Whip_VersionRequirement
, or the Whip_RequirementsChecker::requirementIsFulfilled()
needs to abstract away what it actually checks.
To abstract this away, it can delegate the isFulfilled()
to the requirement itself with all related knowledge it has.