@@ -485,8 +485,8 @@ public static function isAOf($value, $class, $message = '')
485485
486486 if (!\is_a ($ value , $ class , \is_string ($ value ))) {
487487 static ::reportInvalidArgument (sprintf (
488- $ message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s ' ,
489- static ::typeToString ($ value ),
488+ $ message ?: 'Expected an instance of this class or to this class among its parents " %2$s" . Got: %s ' ,
489+ static ::valueToString ($ value ),
490490 $ class
491491 ));
492492 }
@@ -511,8 +511,8 @@ public static function isNotA($value, $class, $message = '')
511511
512512 if (\is_a ($ value , $ class , \is_string ($ value ))) {
513513 static ::reportInvalidArgument (sprintf (
514- $ message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s ' ,
515- static ::typeToString ($ value ),
514+ $ message ?: 'Expected an instance of this class or to this class among its parents other than " %2$s" . Got: %s ' ,
515+ static ::valueToString ($ value ),
516516 $ class
517517 ));
518518 }
@@ -539,9 +539,9 @@ public static function isAnyOf($value, array $classes, $message = '')
539539 }
540540
541541 static ::reportInvalidArgument (sprintf (
542- $ message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s ' ,
543- static ::typeToString ($ value ),
544- \implode (', ' , \array_map ( array ( ' static ' , ' valueToString ' ), $ classes) )
542+ $ message ?: 'Expected an instance of any of this classes or any of those classes among their parents " %2$s" . Got: %s ' ,
543+ static ::valueToString ($ value ),
544+ \implode (', ' , $ classes )
545545 ));
546546 }
547547
0 commit comments