@@ -83,6 +83,7 @@ class Diff_SequenceMatcher
83
83
* @param string|array $a A string or array containing the lines to compare against.
84
84
* @param string|array $b A string or array containing the lines to compare.
85
85
* @param string|array $junkCallback Either an array or string that references a callback function (if there is one) to determine 'junk' characters.
86
+ * @param array $options
86
87
*/
87
88
public function __construct ($ a , $ b , $ junkCallback =null , $ options )
88
89
{
@@ -93,6 +94,11 @@ public function __construct($a, $b, $junkCallback=null, $options)
93
94
$ this ->setSequences ($ a , $ b );
94
95
}
95
96
97
+ /**
98
+ * Set new options
99
+ *
100
+ * @param array $options
101
+ */
96
102
public function setOptions ($ options )
97
103
{
98
104
$ this ->options = array_merge ($ this ->defaultOptions , $ options );
@@ -206,8 +212,8 @@ private function chainB()
206
212
/**
207
213
* Checks if a particular character is in the junk dictionary
208
214
* for the list of junk characters.
209
- *
210
- * @return boolean $b True if the character is considered junk. False if not.
215
+ * @param $b
216
+ * @return boolean True if the character is considered junk. False if not.
211
217
*/
212
218
private function isBJunk ($ b )
213
219
{
@@ -631,7 +637,7 @@ private function quickRatio()
631
637
{
632
638
if ($ this ->fullBCount === null ) {
633
639
$ this ->fullBCount = array ();
634
- $ bLength = count ($ b );
640
+ $ bLength = count ($ this -> b );
635
641
for ($ i = 0 ; $ i < $ bLength ; ++$ i ) {
636
642
$ char = $ this ->b [$ i ];
637
643
$ this ->fullBCount [$ char ] = $ this ->arrayGetDefault ($ this ->fullBCount , $ char , 0 ) + 1 ;
@@ -729,7 +735,7 @@ private function tupleSort($a, $b)
729
735
}
730
736
}
731
737
732
- if (count ($ a ) == $ count ($ b )) {
738
+ if (count ($ a ) == count ($ b )) {
733
739
return 0 ;
734
740
}
735
741
else if (count ($ a ) < count ($ b )) {
0 commit comments