Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / caxy / php-htmldiff / lib / Caxy / HtmlDiff / Match.php
1 <?php
2
3 namespace Caxy\HtmlDiff;
4
5 class Match implements \Countable
6 {
7     public $startInOld;
8     public $startInNew;
9     public $size;
10
11     public function __construct($startInOld, $startInNew, $size)
12     {
13         $this->startInOld = $startInOld;
14         $this->startInNew = $startInNew;
15         $this->size = $size;
16     }
17
18     public function endInOld()
19     {
20         return $this->startInOld + $this->size;
21     }
22
23     public function endInNew()
24     {
25         return $this->startInNew + $this->size;
26     }
27
28     public function count() {
29         return (int)$this->size;
30     }
31 }