comparison vendor/sebastian/diff/src/Diff.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 7a779792577d
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
1 <?php 1 <?php declare(strict_types=1);
2 /* 2 /*
3 * This file is part of sebastian/diff. 3 * This file is part of sebastian/diff.
4 * 4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 * 6 *
8 * file that was distributed with this source code. 8 * file that was distributed with this source code.
9 */ 9 */
10 10
11 namespace SebastianBergmann\Diff; 11 namespace SebastianBergmann\Diff;
12 12
13 class Diff 13 final class Diff
14 { 14 {
15 /** 15 /**
16 * @var string 16 * @var string
17 */ 17 */
18 private $from; 18 private $from;
30 /** 30 /**
31 * @param string $from 31 * @param string $from
32 * @param string $to 32 * @param string $to
33 * @param Chunk[] $chunks 33 * @param Chunk[] $chunks
34 */ 34 */
35 public function __construct($from, $to, array $chunks = array()) 35 public function __construct(string $from, string $to, array $chunks = [])
36 { 36 {
37 $this->from = $from; 37 $this->from = $from;
38 $this->to = $to; 38 $this->to = $to;
39 $this->chunks = $chunks; 39 $this->chunks = $chunks;
40 } 40 }
41 41
42 /** 42 public function getFrom(): string
43 * @return string
44 */
45 public function getFrom()
46 { 43 {
47 return $this->from; 44 return $this->from;
48 } 45 }
49 46
50 /** 47 public function getTo(): string
51 * @return string
52 */
53 public function getTo()
54 { 48 {
55 return $this->to; 49 return $this->to;
56 } 50 }
57 51
58 /** 52 /**
59 * @return Chunk[] 53 * @return Chunk[]
60 */ 54 */
61 public function getChunks() 55 public function getChunks(): array
62 { 56 {
63 return $this->chunks; 57 return $this->chunks;
64 } 58 }
65 59
66 /** 60 /**