@@ -467,8 +467,8 @@ public static function isAOf($value, $class, $message = '')
467467
468468 if (!\is_a ($ value , $ class , \is_string ($ value ))) {
469469 static ::reportInvalidArgument (sprintf (
470- $ message ?: 'Expected an instance of this class or to this class among his parents %2$s. Got: %s ' ,
471- static ::typeToString ($ value ),
470+ $ message ?: 'Expected an instance of this class or to this class among its parents " %2$s" . Got: %s ' ,
471+ static ::valueToString ($ value ),
472472 $ class
473473 ));
474474 }
@@ -493,8 +493,8 @@ public static function isNotA($value, $class, $message = '')
493493
494494 if (\is_a ($ value , $ class , \is_string ($ value ))) {
495495 static ::reportInvalidArgument (sprintf (
496- $ message ?: 'Expected an instance of this class or to this class among his parents other than %2$s. Got: %s ' ,
497- static ::typeToString ($ value ),
496+ $ message ?: 'Expected an instance of this class or to this class among its parents other than " %2$s" . Got: %s ' ,
497+ static ::valueToString ($ value ),
498498 $ class
499499 ));
500500 }
@@ -521,9 +521,9 @@ public static function isAnyOf($value, array $classes, $message = '')
521521 }
522522
523523 static ::reportInvalidArgument (sprintf (
524- $ message ?: 'Expected an any of instance of this class or to this class among his parents other than %2$s. Got: %s ' ,
525- static ::typeToString ($ value ),
526- \implode (', ' , \array_map ( array ( ' static ' , ' valueToString ' ), $ classes) )
524+ $ message ?: 'Expected an instance of any of this classes or any of those classes among their parents " %2$s" . Got: %s ' ,
525+ static ::valueToString ($ value ),
526+ \implode (', ' , $ classes )
527527 ));
528528 }
529529
0 commit comments