Line.php 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  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. 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. /**
  25. * @param int $type
  26. * @param string $content
  27. */
  28. public function __construct($type = self::UNCHANGED, $content = '')
  29. {
  30. $this->type = $type;
  31. $this->content = $content;
  32. }
  33. /**
  34. * @return string
  35. */
  36. public function getContent()
  37. {
  38. return $this->content;
  39. }
  40. /**
  41. * @return int
  42. */
  43. public function getType()
  44. {
  45. return $this->type;
  46. }
  47. }