| 1 | <?php | ||
| 5 | class FirstDiff | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * Loop through each line, and produce a difference report of what to write out to the terminal | ||
| 9 | * | ||
| 10 | * Assumes the beginning of old and new are the same line | ||
| 11 | * | ||
| 12 | * @param string[] $old | ||
| 13 | * @param string[] $new | ||
| 14 | * | ||
| 15 | * @return array [[:col, :str]] | ||
| 16 | */ | ||
| 17 | public function lines(array $old, array $new) | ||
| 36 | |||
| 37 | /** | ||
| 38 | * Looks through a line to find the character to of the first difference between the 2 strings. | ||
| 39 | * | ||
| 40 | * If no difference is found, returns -1 | ||
| 41 | * | ||
| 42 | * @param string $old | ||
| 43 | * @param string $new | ||
| 44 | * | ||
| 45 | * @return int | ||
| 46 | */ | ||
| 47 | public function firstDifference($old, $new) | ||
| 67 | } | ||
| 68 |