Whip_InvalidVersionRequirementMessage

Class Whip_InvalidVersionMessage.

Defined (1)

The class is defined in the following location(s).

/vendor/yoast/whip/src/messages/Whip_InvalidVersionRequirementMessage.php  
  1. class Whip_InvalidVersionRequirementMessage implements Whip_Message { 
  2.  
  3. private $requirement; 
  4. /** 
  5. * @var 
  6. */ 
  7. private $detected; 
  8.  
  9. /** 
  10. * Whip_InvalidVersionRequirementMessage constructor. 
  11. * @param Whip_Requirement $requirement 
  12. * @param $detected 
  13. */ 
  14. public function __construct( Whip_VersionRequirement $requirement, $detected ) 
  15. $this->requirement = $requirement; 
  16. $this->detected = $detected; 
  17.  
  18. /** 
  19. * @return string 
  20. */ 
  21. public function body() { 
  22. return sprintf( 
  23. 'Invalid version detected for %s. Found %s but expected %s.',  
  24. $this->requirement->component(),  
  25. $this->detected,  
  26. $this->requirement->version() 
  27. );