Debian Codegraph @

vendor/jfcherng/php-diff/src/Renderer/RendererInterface.php

raw
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Jfcherng\Diff\Renderer;
6
7 use Jfcherng\Diff\Differ;
8 use Jfcherng\Diff\Exception\UnsupportedFunctionException;
9
10 /**
11 * Renderer Interface.
12 */
13 interface RendererInterface
14 {
15 /**
16 * Get the renderer result when the old and the new are the same.
17 */
18 public function getResultForIdenticals(): string;
19
20 /**
21 * Render the differ and return the result.
22 *
23 * @param Differ $differ the Differ object to be rendered
24 */
25 public function render(Differ $differ): string;
26
27 /**
28 * Render the differ array and return the result.
29 *
30 * @param array[][] $differArray the Differ array to be rendered
31 *
32 * @throws UnsupportedFunctionException if the renderer does not support this method
33 */
34 public function renderArray(array $differArray): string;
35 }