/opt/cpanel/ea-wappspector/vendor/phpunit/phpunit/src/Util
NameSizeModeActions
Exception/-0755rm
Http/-0755rm
PHP/-0755rm
Xml/-0755rm
Cloner.php8660644editdlrm
Color.php48510644editdlrm
ExcludeList.php57990644editdlrm
Exporter.php15810644editdlrm
Filesystem.php13610644editdlrm
Filter.php36020644editdlrm
GlobalState.php105080644editdlrm
Json.php31310644editdlrm
Reflection.php29460644editdlrm
Test.php10450644editdlrm
ThrowableToStringMapper.php14480644editdlrm
VersionComparisonOperator.php15730644editdlrm
Edit: /opt/cpanel/ea-wappspector/vendor/phpunit/phpunit/src/Util/ThrowableToStringMapper.php (1448B)
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPUnit\Util; use function trim; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Framework\PhptAssertionFailedError; use PHPUnit\Framework\SelfDescribing; use PHPUnit\Runner\ErrorException; use Throwable; /** * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit * * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class ThrowableToStringMapper { public static function map(Throwable $t): string { if ($t instanceof ErrorException) { return $t->getMessage(); } if ($t instanceof SelfDescribing) { $buffer = $t->toString(); if ($t instanceof ExpectationFailedException && $t->getComparisonFailure()) { $buffer .= $t->getComparisonFailure()->getDiff(); } if ($t instanceof PhptAssertionFailedError) { $buffer .= $t->diff(); } if (!empty($buffer)) { $buffer = trim($buffer) . "\n"; } return $buffer; } return $t::class . ': ' . $t->getMessage() . "\n"; } }