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 11namespace SebastianBergmann\Diff; 12 13class Diff 14{ 15 /** 16 * @var string 17 */ 18 private $from; 19 20 /** 21 * @var string 22 */ 23 private $to; 24 25 /** 26 * @var Chunk[] 27 */ 28 private $chunks; 29 30 /** 31 * @param string $from 32 * @param string $to 33 * @param Chunk[] $chunks 34 */ 35 public function __construct($from, $to, array $chunks = array()) 36 { 37 $this->from = $from; 38 $this->to = $to; 39 $this->chunks = $chunks; 40 } 41 42 /** 43 * @return string 44 */ 45 public function getFrom() 46 { 47 return $this->from; 48 } 49 50 /** 51 * @return string 52 */ 53 public function getTo() 54 { 55 return $this->to; 56 } 57 58 /** 59 * @return Chunk[] 60 */ 61 public function getChunks() 62 { 63 return $this->chunks; 64 } 65 66 /** 67 * @param Chunk[] $chunks 68 */ 69 public function setChunks(array $chunks) 70 { 71 $this->chunks = $chunks; 72 } 73} 74