Update vendored libs
This commit is contained in:
@@ -21,7 +21,7 @@ class PhraseBuilder implements PhraseBuilderInterface
|
||||
/**
|
||||
* Constructs a PhraseBuilder with given parameters
|
||||
*/
|
||||
public function __construct($length = 5, $charset = 'abcdefghijklmnpqrstuvwxyz123456789')
|
||||
public function __construct($length = 5, $charset = 'abcdefghijklmnpqrstuvwxyz123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
|
||||
{
|
||||
$this->length = $length;
|
||||
$this->charset = $charset;
|
||||
@@ -53,7 +53,23 @@ class PhraseBuilder implements PhraseBuilderInterface
|
||||
* "Niceize" a code
|
||||
*/
|
||||
public function niceize($str)
|
||||
{
|
||||
return self::doNiceize($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* A static helper to niceize
|
||||
*/
|
||||
public static function doNiceize($str)
|
||||
{
|
||||
return strtr(strtolower($str), '01', 'ol');
|
||||
}
|
||||
|
||||
/**
|
||||
* A static helper to compare
|
||||
*/
|
||||
public static function comparePhrases($str1, $str2)
|
||||
{
|
||||
return self::doNiceize($str1) === self::doNiceize($str2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user