BuildMetaData.php 719 B

12345678910111213141516171819202122232425262728
  1. <?php declare(strict_types = 1);
  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 BuildMetaData {
  12. /** @var string */
  13. private $value;
  14. public function __construct(string $value) {
  15. $this->value = $value;
  16. }
  17. public function asString(): string {
  18. return $this->value;
  19. }
  20. public function equals(BuildMetaData $other): bool {
  21. return $this->asString() === $other->asString();
  22. }
  23. }