diff --git a/PHPCSUtils/Exceptions/TestTargetNotFound.php b/PHPCSUtils/Exceptions/TestTargetNotFound.php index 0e9eed68..d9838080 100644 --- a/PHPCSUtils/Exceptions/TestTargetNotFound.php +++ b/PHPCSUtils/Exceptions/TestTargetNotFound.php @@ -34,7 +34,7 @@ final class TestTargetNotFound extends OutOfBoundsException public static function create($marker, $content, $file) { $contentPhrase = ''; - if ($content !== null) { + if (\is_string($content)) { $contentPhrase = ' with token content: ' . $content; }