Line.php 826 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of sebastian/diff.
  4. *
  5. * (c) 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 SebastianBergmann\Diff;
  11. final class Line
  12. {
  13. const ADDED = 1;
  14. const REMOVED = 2;
  15. const UNCHANGED = 3;
  16. /**
  17. * @var int
  18. */
  19. private $type;
  20. /**
  21. * @var string
  22. */
  23. private $content;
  24. public function __construct(int $type = self::UNCHANGED, string $content = '')
  25. {
  26. $this->type = $type;
  27. $this->content = $content;
  28. }
  29. public function getContent(): string
  30. {
  31. return $this->content;
  32. }
  33. public function getType(): int
  34. {
  35. return $this->type;
  36. }
  37. }