Chunk.php (2078B)
1 <?php 2 /* 3 * This file is part of the Diff package. 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 11 namespace SebastianBergmann\Diff; 12 13 /** 14 * @package Diff 15 * @author Sebastian Bergmann <sebastian@phpunit.de> 16 * @author Kore Nordmann <mail@kore-nordmann.de> 17 * @copyright Sebastian Bergmann <sebastian@phpunit.de> 18 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License 19 * @link http://www.github.com/sebastianbergmann/diff 20 */ 21 class Chunk 22 { 23 /** 24 * @var int 25 */ 26 private $start; 27 28 /** 29 * @var int 30 */ 31 private $startRange; 32 33 /** 34 * @var int 35 */ 36 private $end; 37 /** 38 * @var int 39 */ 40 private $endRange; 41 42 /** 43 * @var array 44 */ 45 private $lines; 46 47 /** 48 * @param int $start 49 * @param int $startRange 50 * @param int $end 51 * @param int $endRange 52 * @param array $lines 53 */ 54 public function __construct($start = 0, $startRange = 1, $end = 0, $endRange = 1, array $lines = array()) 55 { 56 $this->start = (int) $start; 57 $this->startRange = (int) $startRange; 58 $this->end = (int) $end; 59 $this->endRange = (int) $endRange; 60 $this->lines = $lines; 61 } 62 63 /** 64 * @return int 65 */ 66 public function getStart() 67 { 68 return $this->start; 69 } 70 71 /** 72 * @return int 73 */ 74 public function getStartRange() 75 { 76 return $this->startRange; 77 } 78 79 /** 80 * @return int 81 */ 82 public function getEnd() 83 { 84 return $this->end; 85 } 86 87 /** 88 * @return int 89 */ 90 public function getEndRange() 91 { 92 return $this->endRange; 93 } 94 95 /** 96 * @return array 97 */ 98 public function getLines() 99 { 100 return $this->lines; 101 } 102 103 /** 104 * @param array $lines 105 */ 106 public function setLines(array $lines) 107 { 108 $this->lines = $lines; 109 } 110 }