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.
The interface
Whip_Requirementwants to be an abstract requirement that only knows about a::component(). However, inWhip_RequirementsChecker::requirementIsFulfilled(), the requirementsversion()is being checked, despite the interface not having such a method.So, either
Whip_Requirementis actually aWhip_VersionRequirement, or theWhip_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.