Lines 100.00% 8 / 8
Methods 100.00% 1 / 1
Classes 100.00% 1 / 1
Covered by tests of size
Name Lines Methods CRAP
 __toString 100.00% 8 / 8 100.00% 1 / 1 1
27class Exception extends \Exception implements \Stringable
28{
29    /**
30     * Converts Exception to a string.
31     */
32    public function __toString(): string
33    {
34        return sprintf(
35            "Exception %s with message %s in %s: %s\nStack trace:\n%s",
36            self::class,
37            $this->getMessage(),
38            $this->getFile(),
39            $this->getLine(),
40            $this->getTraceAsString(),
41        );
42    }
43}