ExactVersionConstraint.php 602 B

12345678910111213141516171819202122
  1. <?php
  2. /*
  3. * This file is part of PharIo\Version.
  4. *
  5. * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace PharIo\Version;
  11. class ExactVersionConstraint extends AbstractVersionConstraint {
  12. /**
  13. * @param Version $version
  14. *
  15. * @return bool
  16. */
  17. public function complies(Version $version) {
  18. return $this->asString() == $version->getVersionString();
  19. }
  20. }