1 | <?php |
||
15 | class Diff |
||
16 | { |
||
17 | /** |
||
18 | * Method to find longest common subsequences, based on |
||
19 | * http://en.wikipedia.org/wiki/Longest_common_subsequence_problem |
||
20 | * |
||
21 | * @param string $s1 |
||
22 | * @param string $s2 |
||
23 | * @return array |
||
24 | * @see http://en.wikipedia.org/wiki/Longest_common_subsequence_problem |
||
25 | */ |
||
26 | protected function _lsm($s1, $s2) |
||
51 | |||
52 | /** |
||
53 | * Simple formatting of the array created by the <tt>lsm</tt> method. |
||
54 | * Lines are printed as normal, lines that are only in the second string are |
||
55 | * prefixed with '+', lines that are only in the first string are prefixed |
||
56 | * with '-' |
||
57 | * |
||
58 | * @param array $c Output of <tt>lsm</tt> method |
||
59 | * @param string First string |
||
60 | * @param string Second String |
||
61 | * @param int $i |
||
62 | * @param int $j |
||
63 | * @return string |
||
64 | * @see lsm |
||
65 | */ |
||
66 | protected function _printDiff($c, $s1, $s2, $i, $j) |
||
84 | |||
85 | /** |
||
86 | * Given two strings, returns a string in the format describe by |
||
87 | * Wally\Diff::printDiff |
||
88 | * |
||
89 | * @param string $s1 First String |
||
90 | * @param string $s2 Second String |
||
91 | * @return string |
||
92 | */ |
||
93 | public function getDiff($s1, $s2) |
||
100 | } |
||
101 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: