22
33namespace ZxcvbnPhp ;
44
5- use ZxcvbnPhp \Matchers \Match ;
5+ use ZxcvbnPhp \Matchers \BaseMatch ;
66use ZxcvbnPhp \Matchers \MatchInterface ;
77
88class Matcher
@@ -23,14 +23,14 @@ class Matcher
2323 /**
2424 * Get matches for a password.
2525 *
26- * @see zxcvbn/src/matching.coffee::omnimatch
27- *
28- * @param string $password Password string to match
29- * @param array $userInputs Array of values related to the user (optional)
26+ * @param string $password Password string to match
27+ * @param array $userInputs Array of values related to the user (optional)
3028 * @code array('Alice Smith')
3129 * @endcode
3230 *
33- * @return Match[] Array of Match objects.
31+ * @return MatchInterface[] Array of Match objects.
32+ *
33+ * @see zxcvbn/src/matching.coffee::omnimatch
3434 */
3535 public function getMatches ($ password , array $ userInputs = [])
3636 {
@@ -77,7 +77,7 @@ public static function usortStable(array &$array, callable $value_compare_func)
7777 {
7878 $ index = 0 ;
7979 foreach ($ array as &$ item ) {
80- $ item = array ( $ index ++, $ item) ;
80+ $ item = [ $ index ++, $ item] ;
8181 }
8282 $ result = usort ($ array , function ($ a , $ b ) use ($ value_compare_func ) {
8383 $ result = $ value_compare_func ($ a [1 ], $ b [1 ]);
@@ -89,7 +89,7 @@ public static function usortStable(array &$array, callable $value_compare_func)
8989 return $ result ;
9090 }
9191
92- public static function compareMatches (Match $ a , Match $ b )
92+ public static function compareMatches (BaseMatch $ a , BaseMatch $ b )
9393 {
9494 $ beginDiff = $ a ->begin - $ b ->begin ;
9595 if ($ beginDiff ) {
0 commit comments