Chunk.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 Chunk
  12. {
  13. /**
  14. * @var int
  15. */
  16. private $start;
  17. /**
  18. * @var int
  19. */
  20. private $startRange;
  21. /**
  22. * @var int
  23. */
  24. private $end;
  25. /**
  26. * @var int
  27. */
  28. private $endRange;
  29. /**
  30. * @var array
  31. */
  32. private $lines;
  33. /**
  34. * @param int $start
  35. * @param int $startRange
  36. * @param int $end
  37. * @param int $endRange
  38. * @param array $lines
  39. */
  40. public function __construct($start = 0, $startRange = 1, $end = 0, $endRange = 1, array $lines = array())
  41. {
  42. $this->start = (int) $start;
  43. $this->startRange = (int) $startRange;
  44. $this->end = (int) $end;
  45. $this->endRange = (int) $endRange;
  46. $this->lines = $lines;
  47. }
  48. /**
  49. * @return int
  50. */
  51. public function getStart()
  52. {
  53. return $this->start;
  54. }
  55. /**
  56. * @return int
  57. */
  58. public function getStartRange()
  59. {
  60. return $this->startRange;
  61. }
  62. /**
  63. * @return int
  64. */
  65. public function getEnd()
  66. {
  67. return $this->end;
  68. }
  69. /**
  70. * @return int
  71. */
  72. public function getEndRange()
  73. {
  74. return $this->endRange;
  75. }
  76. /**
  77. * @return array
  78. */
  79. public function getLines()
  80. {
  81. return $this->lines;
  82. }
  83. /**
  84. * @param array $lines
  85. */
  86. public function setLines(array $lines)
  87. {
  88. $this->lines = $lines;
  89. }
  90. }