@@ -83,6 +83,7 @@ class Diff_SequenceMatcher
8383 * @param string|array $a A string or array containing the lines to compare against.
8484 * @param string|array $b A string or array containing the lines to compare.
8585 * @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
8687 */
8788 public function __construct ($ a , $ b , $ junkCallback =null , $ options )
8889 {
@@ -93,6 +94,11 @@ public function __construct($a, $b, $junkCallback=null, $options)
9394 $ this ->setSequences ($ a , $ b );
9495 }
9596
97+ /**
98+ * Set new options
99+ *
100+ * @param array $options
101+ */
96102 public function setOptions ($ options )
97103 {
98104 $ this ->options = array_merge ($ this ->defaultOptions , $ options );
@@ -206,8 +212,8 @@ private function chainB()
206212 /**
207213 * Checks if a particular character is in the junk dictionary
208214 * 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.
211217 */
212218 private function isBJunk ($ b )
213219 {
@@ -631,7 +637,7 @@ private function quickRatio()
631637 {
632638 if ($ this ->fullBCount === null ) {
633639 $ this ->fullBCount = array ();
634- $ bLength = count ($ b );
640+ $ bLength = count ($ this -> b );
635641 for ($ i = 0 ; $ i < $ bLength ; ++$ i ) {
636642 $ char = $ this ->b [$ i ];
637643 $ this ->fullBCount [$ char ] = $ this ->arrayGetDefault ($ this ->fullBCount , $ char , 0 ) + 1 ;
@@ -729,7 +735,7 @@ private function tupleSort($a, $b)
729735 }
730736 }
731737
732- if (count ($ a ) == $ count ($ b )) {
738+ if (count ($ a ) == count ($ b )) {
733739 return 0 ;
734740 }
735741 else if (count ($ a ) < count ($ b )) {
0 commit comments