sandfoxme/phpstorm-metadata-export

View on GitHub
src/Common/Helpers/ErrorFormatter.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Arokettu\PhpStorm\Metadata\Common\Helpers;

/**
 * @internal
 */
final class ErrorFormatter
{
    public static function format(\Throwable $exception): string
    {
        return TypeStrings::getTypeStringByInstance($exception) .
            ' /* Error message: "' . $exception->getMessage() . '" */';
    }
}