File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 2323 "php" : " >=7.4"
2424 },
2525 "require-dev" : {
26- "opis/string" : " ^2.0 " ,
26+ "opis/string" : " ^2.1 " ,
2727 "ext-bcmath" : " *" ,
2828 "ext-json" : " *" ,
2929 "ext-mbstring" : " *" ,
Original file line number Diff line number Diff line change @@ -36,10 +36,8 @@ class ValidatorHelper implements IValidatorHelper
3636 public function __construct (int $ scale = 10 )
3737 {
3838 $ this ->scale = $ scale ;
39- if (class_exists ('\\Opis\String \\UnicodeString ' , true )) {
40- $ this ->strLengthFunc = function (string $ data ): int {
41- return \Opis \String \UnicodeString::from ($ data )->length ();
42- };
39+ if (class_exists (\Opis \String \UnicodeString::class, true )) {
40+ $ this ->strLengthFunc = [\Opis \String \UnicodeString::class, "getStringLength " ];
4341 }
4442 else {
4543 $ this ->strLengthFunc = function_exists ('mb_strlen ' ) ? 'mb_strlen ' : 'strlen ' ;
You can’t perform that action at this time.
0 commit comments