LongestCommonSubsequence.php 618 B

123456789101112131415161718192021222324252627
  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. namespace SebastianBergmann\Diff\LCS;
  11. /**
  12. * Interface for implementations of longest common subsequence calculation.
  13. */
  14. interface LongestCommonSubsequence
  15. {
  16. /**
  17. * Calculates the longest common subsequence of two arrays.
  18. *
  19. * @param array $from
  20. * @param array $to
  21. *
  22. * @return array
  23. */
  24. public function calculate(array $from, array $to);
  25. }