From f09026bdf9a255d05059262307f10df523d4a559 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 18 Jul 2024 12:33:26 +0300 Subject: [PATCH 01/15] Add solution providers --- src/Renderer/HtmlRenderer.php | 8 ++++++ src/Solution/FriendlyExceptionSolution.php | 20 ++++++++++++++ src/Solution/SolutionGenerator.php | 31 ++++++++++++++++++++++ src/Solution/SolutionProviderInterface.php | 12 +++++++++ templates/development.php | 15 ++++++++--- 5 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 src/Solution/FriendlyExceptionSolution.php create mode 100644 src/Solution/SolutionGenerator.php create mode 100644 src/Solution/SolutionProviderInterface.php diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index d01b87b..bd6f203 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -12,6 +12,8 @@ use Yiisoft\ErrorHandler\CompositeException; use Yiisoft\ErrorHandler\ErrorData; use Yiisoft\ErrorHandler\Exception\ErrorException; +use Yiisoft\ErrorHandler\Solution\SolutionGenerator; +use Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution; use Yiisoft\ErrorHandler\ThrowableRendererInterface; use Yiisoft\FriendlyException\FriendlyExceptionInterface; @@ -104,6 +106,8 @@ final class HtmlRenderer implements ThrowableRendererInterface */ private ?array $vendorPaths = null; + private SolutionGenerator $solutionGenerator; + /** * @param array $settings Settings can have the following keys: * - template: string, full path of the template file for rendering exceptions without call stack information. @@ -131,6 +135,7 @@ public function __construct(array $settings = []) $this->maxSourceLines = $settings['maxSourceLines'] ?? 19; $this->maxTraceLines = $settings['maxTraceLines'] ?? 13; $this->traceHeaderLine = $settings['traceHeaderLine'] ?? null; + $this->solutionGenerator = new SolutionGenerator([new FriendlyExceptionSolution()]); } public function render(Throwable $t, ServerRequestInterface $request = null): ErrorData @@ -143,9 +148,12 @@ public function render(Throwable $t, ServerRequestInterface $request = null): Er public function renderVerbose(Throwable $t, ServerRequestInterface $request = null): ErrorData { + $solutions = $this->solutionGenerator->generate($t); + return new ErrorData($this->renderTemplate($this->verboseTemplate, [ 'request' => $request, 'throwable' => $t, + 'solutions' => $solutions, ])); } diff --git a/src/Solution/FriendlyExceptionSolution.php b/src/Solution/FriendlyExceptionSolution.php new file mode 100644 index 0000000..4e8a302 --- /dev/null +++ b/src/Solution/FriendlyExceptionSolution.php @@ -0,0 +1,20 @@ +getSolution() !== null; + } + + public function generate(\Throwable $e): string + { + return $e->getSolution(); + } +} diff --git a/src/Solution/SolutionGenerator.php b/src/Solution/SolutionGenerator.php new file mode 100644 index 0000000..81bea70 --- /dev/null +++ b/src/Solution/SolutionGenerator.php @@ -0,0 +1,31 @@ +generators as $generator) { + if ($generator->supports($e)) { + $result[] = $generator->generate($e); + } + } + return $result; + } +} diff --git a/src/Solution/SolutionProviderInterface.php b/src/Solution/SolutionProviderInterface.php new file mode 100644 index 0000000..6e02ad6 --- /dev/null +++ b/src/Solution/SolutionProviderInterface.php @@ -0,0 +1,12 @@ +getFirstException(); } $isFriendlyException = $throwable instanceof FriendlyExceptionInterface; -$solution = $isFriendlyException ? $throwable->getSolution() : null; $exceptionClass = get_class($throwable); $exceptionMessage = $throwable->getMessage(); @@ -79,9 +79,16 @@ htmlEncode($exceptionMessage)) ?> - -
parseMarkdown($solution) ?>
- + '; + foreach ($solutions as $i => $solution) { + echo '
'; + echo $this->parseMarkdown($solution); + echo '
'; + } + } + ?> renderPreviousExceptions($originalException) ?> From 85ec4f05d08b34bfa2a5703c1895847876d6e7b2 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Thu, 18 Jul 2024 12:42:39 +0300 Subject: [PATCH 02/15] Move providers to config --- composer.json | 3 ++- config/di-web.php | 5 +++++ config/params.php | 18 ++++++++++++++++++ src/Renderer/HtmlRenderer.php | 6 +++--- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 config/params.php diff --git a/composer.json b/composer.json index fe45b1b..cabdb1d 100644 --- a/composer.json +++ b/composer.json @@ -73,7 +73,8 @@ "source-directory": "config" }, "config-plugin": { - "di-web": "di-web.php" + "di-web": "di-web.php", + "params": "params.php" } }, "config": { diff --git a/config/di-web.php b/config/di-web.php index c0f814f..417e401 100644 --- a/config/di-web.php +++ b/config/di-web.php @@ -11,4 +11,9 @@ return [ ThrowableRendererInterface::class => HtmlRenderer::class, + HtmlRenderer::class => [ + '__construct()' => [ + 'solutionProviders' => $params['yiisoft/error-handler']['solutionProviders'], + ], + ], ]; diff --git a/config/params.php b/config/params.php new file mode 100644 index 0000000..b3b8f5d --- /dev/null +++ b/config/params.php @@ -0,0 +1,18 @@ + [ + 'solutionProviders' => [ + \Yiisoft\Definitions\Reference::to(\Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), + ] + ] +]; diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index bd6f203..8b061c8 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -13,7 +13,6 @@ use Yiisoft\ErrorHandler\ErrorData; use Yiisoft\ErrorHandler\Exception\ErrorException; use Yiisoft\ErrorHandler\Solution\SolutionGenerator; -use Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution; use Yiisoft\ErrorHandler\ThrowableRendererInterface; use Yiisoft\FriendlyException\FriendlyExceptionInterface; @@ -123,8 +122,9 @@ final class HtmlRenderer implements ThrowableRendererInterface * maxTraceLines?: int, * traceHeaderLine?: string, * } $settings + * @param \Yiisoft\ErrorHandler\Solution\SolutionProviderInterface[] $solutionProviders */ - public function __construct(array $settings = []) + public function __construct(array $settings = [], array $solutionProviders = []) { $this->markdownParser = new GithubMarkdown(); $this->markdownParser->html5 = true; @@ -135,7 +135,7 @@ public function __construct(array $settings = []) $this->maxSourceLines = $settings['maxSourceLines'] ?? 19; $this->maxTraceLines = $settings['maxTraceLines'] ?? 13; $this->traceHeaderLine = $settings['traceHeaderLine'] ?? null; - $this->solutionGenerator = new SolutionGenerator([new FriendlyExceptionSolution()]); + $this->solutionGenerator = new SolutionGenerator($solutionProviders); } public function render(Throwable $t, ServerRequestInterface $request = null): ErrorData From 884f7bebd0635004149c56c2a98c55abdbea149a Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 18 Jul 2024 09:42:52 +0000 Subject: [PATCH 03/15] Apply fixes from StyleCI --- config/params.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/params.php b/config/params.php index b3b8f5d..afbde92 100644 --- a/config/params.php +++ b/config/params.php @@ -2,8 +2,6 @@ declare(strict_types=1); -use Yiisoft\ErrorHandler\Renderer\HtmlRenderer; -use Yiisoft\ErrorHandler\ThrowableRendererInterface; /** * @var array $params @@ -13,6 +11,6 @@ 'yiisoft/error-handler' => [ 'solutionProviders' => [ \Yiisoft\Definitions\Reference::to(\Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), - ] - ] + ], + ], ]; From b67993d23728002cbe123bee83b9e5ff577a9a33 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sun, 4 Aug 2024 22:26:18 +0300 Subject: [PATCH 04/15] Allow form controls --- src/Renderer/HtmlRenderer.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index 8b061c8..c417a9b 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -209,6 +209,9 @@ public function parseMarkdown(string $content): string 'ol', 'li', 'img', + 'form', + 'input', + 'button', ]); } From 6e2ceb221d50a71b1d063d84d376e47867f310c4 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sat, 21 Dec 2024 16:46:19 +0300 Subject: [PATCH 05/15] fix test --- tests/ConfigTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 838edf0..5554592 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -32,6 +32,9 @@ private function createContainer(?string $postfix = null): Container private function getDiConfig(?string $postfix = null): array { + $params = [ + 'yiisoft/error-handler' => ['solutionProviders' => []], + ]; return require dirname(__DIR__) . '/config/di' . ($postfix !== null ? '-' . $postfix : '') . '.php'; } } From 8bf9840d47f88be5e78656ff4f8f4a9c3d21b38e Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 28 Jul 2025 08:41:29 +0000 Subject: [PATCH 06/15] Apply fixes from StyleCI --- config/params.php | 2 +- src/Renderer/HtmlRenderer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/params.php b/config/params.php index afbde92..3910dd9 100644 --- a/config/params.php +++ b/config/params.php @@ -10,7 +10,7 @@ return [ 'yiisoft/error-handler' => [ 'solutionProviders' => [ - \Yiisoft\Definitions\Reference::to(\Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), + Yiisoft\Definitions\Reference::to(Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), ], ], ]; diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index eb32415..e281792 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -163,7 +163,7 @@ public function __construct( $this->traceHeaderLine = $traceHeaderLine ?? $settings['traceHeaderLine'] ?? null; - + $this->solutionGenerator = new SolutionGenerator($solutionProviders); } From ce78cfc2052f488da04c3596a41fd9193e03a304 Mon Sep 17 00:00:00 2001 From: xepozz <6815714+xepozz@users.noreply.github.com> Date: Mon, 28 Jul 2025 08:41:51 +0000 Subject: [PATCH 07/15] Apply Rector changes (CI) --- src/Renderer/HtmlRenderer.php | 2 +- src/Solution/SolutionGenerator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index e281792..f0c715e 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -108,7 +108,7 @@ final class HtmlRenderer implements ThrowableRendererInterface */ private ?array $vendorPaths = null; - private SolutionGenerator $solutionGenerator; + private readonly SolutionGenerator $solutionGenerator; /** * @param array $settings (deprecated) Settings can have the following keys: diff --git a/src/Solution/SolutionGenerator.php b/src/Solution/SolutionGenerator.php index 81bea70..649c9f8 100644 --- a/src/Solution/SolutionGenerator.php +++ b/src/Solution/SolutionGenerator.php @@ -10,7 +10,7 @@ public function __construct( /** * @var SolutionGeneratorInterface[] */ - private array $generators, + private readonly array $generators, ) { } From 5d41ab08afd1ce8e39b47368553fb00155025d8f Mon Sep 17 00:00:00 2001 From: Dmitriy Derepko Date: Mon, 28 Jul 2025 21:42:45 +0300 Subject: [PATCH 08/15] refactor: remove generator, pass providers directly --- .gitignore | 2 ++ config/params.php | 2 +- src/Renderer/HtmlRenderer.php | 12 +++++++----- src/Solution/SolutionGenerator.php | 31 ------------------------------ templates/development.php | 11 +++++++---- 5 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 src/Solution/SolutionGenerator.php diff --git a/.gitignore b/.gitignore index efcb7f6..93ae619 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ composer.lock /phpunit.phar /phpunit.xml /.phpunit.cache +.phpunit.result.cache + diff --git a/config/params.php b/config/params.php index 3910dd9..afbde92 100644 --- a/config/params.php +++ b/config/params.php @@ -10,7 +10,7 @@ return [ 'yiisoft/error-handler' => [ 'solutionProviders' => [ - Yiisoft\Definitions\Reference::to(Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), + \Yiisoft\Definitions\Reference::to(\Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), ], ], ]; diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index f0c715e..554aac6 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -12,7 +12,7 @@ use Yiisoft\ErrorHandler\CompositeException; use Yiisoft\ErrorHandler\ErrorData; use Yiisoft\ErrorHandler\Exception\ErrorException; -use Yiisoft\ErrorHandler\Solution\SolutionGenerator; +use Yiisoft\ErrorHandler\Solution\SolutionProviderInterface; use Yiisoft\ErrorHandler\ThrowableRendererInterface; use Yiisoft\FriendlyException\FriendlyExceptionInterface; use Yiisoft\Http\Header; @@ -108,7 +108,10 @@ final class HtmlRenderer implements ThrowableRendererInterface */ private ?array $vendorPaths = null; - private readonly SolutionGenerator $solutionGenerator; + /** + * @var SolutionProviderInterface[] + */ + private array $solutionProviders; /** * @param array $settings (deprecated) Settings can have the following keys: @@ -164,7 +167,7 @@ public function __construct( ?? $settings['traceHeaderLine'] ?? null; - $this->solutionGenerator = new SolutionGenerator($solutionProviders); + $this->solutionProviders = $solutionProviders; } public function render(Throwable $t, ?ServerRequestInterface $request = null): ErrorData @@ -180,12 +183,11 @@ public function render(Throwable $t, ?ServerRequestInterface $request = null): E public function renderVerbose(Throwable $t, ?ServerRequestInterface $request = null): ErrorData { - $solutions = $this->solutionGenerator->generate($t); return new ErrorData( $this->renderTemplate($this->verboseTemplate, [ 'request' => $request, 'throwable' => $t, - 'solutions' => $solutions, + 'solutions' => $this->solutionProviders, ]), [Header::CONTENT_TYPE => self::CONTENT_TYPE], ); diff --git a/src/Solution/SolutionGenerator.php b/src/Solution/SolutionGenerator.php deleted file mode 100644 index 649c9f8..0000000 --- a/src/Solution/SolutionGenerator.php +++ /dev/null @@ -1,31 +0,0 @@ -generators as $generator) { - if ($generator->supports($e)) { - $result[] = $generator->generate($e); - } - } - return $result; - } -} diff --git a/templates/development.php b/templates/development.php index 3a8e9b1..3e48efd 100644 --- a/templates/development.php +++ b/templates/development.php @@ -4,13 +4,14 @@ use Yiisoft\ErrorHandler\CompositeException; use Yiisoft\ErrorHandler\Exception\ErrorException; use Yiisoft\ErrorHandler\Renderer\HtmlRenderer; +use Yiisoft\ErrorHandler\Solution\SolutionProviderInterface; use Yiisoft\FriendlyException\FriendlyExceptionInterface; /** * @var $this HtmlRenderer * @var $request ServerRequestInterface|null * @var $throwable Throwable - * @var $solutions string[] + * @var $solutions SolutionProviderInterface[] */ $theme = $_COOKIE['yii-exception-theme'] ?? ''; @@ -96,9 +97,11 @@ if (!empty($solutions)) { echo '
'; foreach ($solutions as $i => $solution) { - echo '
'; - echo $this->parseMarkdown($solution); - echo '
'; + if ($solution->supports($throwable)) { + echo '
'; + echo $this->parseMarkdown($solution->generate($throwable)); + echo '
'; + } } } ?> From e904abfe7be353827aebac35514d7a550a70340d Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 28 Jul 2025 18:43:00 +0000 Subject: [PATCH 09/15] Apply fixes from StyleCI --- config/params.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/params.php b/config/params.php index afbde92..3910dd9 100644 --- a/config/params.php +++ b/config/params.php @@ -10,7 +10,7 @@ return [ 'yiisoft/error-handler' => [ 'solutionProviders' => [ - \Yiisoft\Definitions\Reference::to(\Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), + Yiisoft\Definitions\Reference::to(Yiisoft\ErrorHandler\Solution\FriendlyExceptionSolution::class), ], ], ]; From 6371efeb3ece2ce087aa8e0386fa09703e5621c9 Mon Sep 17 00:00:00 2001 From: xepozz <6815714+xepozz@users.noreply.github.com> Date: Mon, 28 Jul 2025 18:43:18 +0000 Subject: [PATCH 10/15] Apply Rector changes (CI) --- src/Renderer/HtmlRenderer.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index 554aac6..5639fa4 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -108,11 +108,6 @@ final class HtmlRenderer implements ThrowableRendererInterface */ private ?array $vendorPaths = null; - /** - * @var SolutionProviderInterface[] - */ - private array $solutionProviders; - /** * @param array $settings (deprecated) Settings can have the following keys: * - template: string, full path of the template file for rendering exceptions without call stack information. @@ -144,7 +139,7 @@ public function __construct( ?int $maxSourceLines = null, ?int $maxTraceLines = null, ?string $traceHeaderLine = null, - array $solutionProviders = [] + private readonly array $solutionProviders = [] ) { $this->markdownParser = new GithubMarkdown(); $this->markdownParser->html5 = true; @@ -166,8 +161,6 @@ public function __construct( $this->traceHeaderLine = $traceHeaderLine ?? $settings['traceHeaderLine'] ?? null; - - $this->solutionProviders = $solutionProviders; } public function render(Throwable $t, ?ServerRequestInterface $request = null): ErrorData From 4d1259a8fcb65cccd88285d0b2bb2eef72961c4a Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 28 Jul 2025 18:43:32 +0000 Subject: [PATCH 11/15] Apply fixes from StyleCI --- src/Renderer/HtmlRenderer.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Renderer/HtmlRenderer.php b/src/Renderer/HtmlRenderer.php index 5639fa4..ebc39fd 100644 --- a/src/Renderer/HtmlRenderer.php +++ b/src/Renderer/HtmlRenderer.php @@ -12,7 +12,6 @@ use Yiisoft\ErrorHandler\CompositeException; use Yiisoft\ErrorHandler\ErrorData; use Yiisoft\ErrorHandler\Exception\ErrorException; -use Yiisoft\ErrorHandler\Solution\SolutionProviderInterface; use Yiisoft\ErrorHandler\ThrowableRendererInterface; use Yiisoft\FriendlyException\FriendlyExceptionInterface; use Yiisoft\Http\Header; From 8cfee00a0c28172f643677452818c505270abc59 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sat, 9 Aug 2025 23:54:03 +0300 Subject: [PATCH 12/15] Apply suggestion from @xepozz --- src/Solution/SolutionProviderInterface.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Solution/SolutionProviderInterface.php b/src/Solution/SolutionProviderInterface.php index 6e02ad6..b9a587b 100644 --- a/src/Solution/SolutionProviderInterface.php +++ b/src/Solution/SolutionProviderInterface.php @@ -4,6 +4,10 @@ namespace Yiisoft\ErrorHandler\Solution; +/** +* The interface declares an adapter to render a solution for an event. +* Basically, it renders the error message as-is, but possible could render a button with click-to-fix action that will be handled by an HTTP request (with middleware) back to server. +*/ interface SolutionProviderInterface { public function supports(\Throwable $e): bool; From 850326e5df7997aa55bab46f1ce7ac3fe39f2593 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sat, 9 Aug 2025 23:54:09 +0300 Subject: [PATCH 13/15] Apply suggestion from @xepozz --- src/Solution/SolutionProviderInterface.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Solution/SolutionProviderInterface.php b/src/Solution/SolutionProviderInterface.php index b9a587b..d423340 100644 --- a/src/Solution/SolutionProviderInterface.php +++ b/src/Solution/SolutionProviderInterface.php @@ -12,5 +12,8 @@ interface SolutionProviderInterface { public function supports(\Throwable $e): bool; +/** +* Generates an HTML code with solution which will be clean by {@see \Yiisoft\ErrorHandler\Renderer\HtmlRenderer} and shown to the end user. +*/ public function generate(\Throwable $e): string; } From a45baf8f0cfc28832464d03b96eebce933cac065 Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Sat, 9 Aug 2025 23:54:15 +0300 Subject: [PATCH 14/15] Apply suggestion from @xepozz --- src/Solution/SolutionProviderInterface.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Solution/SolutionProviderInterface.php b/src/Solution/SolutionProviderInterface.php index d423340..2083139 100644 --- a/src/Solution/SolutionProviderInterface.php +++ b/src/Solution/SolutionProviderInterface.php @@ -10,6 +10,9 @@ */ interface SolutionProviderInterface { +/** +* Returns true if the implementation may suggest more than regular provider. +*/ public function supports(\Throwable $e): bool; /** From ff4a1a0827fa64c135e1ece18bf6fb3a60aa9bc3 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 9 Aug 2025 20:54:23 +0000 Subject: [PATCH 15/15] Apply fixes from StyleCI --- src/Solution/SolutionProviderInterface.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Solution/SolutionProviderInterface.php b/src/Solution/SolutionProviderInterface.php index 2083139..dba4c5f 100644 --- a/src/Solution/SolutionProviderInterface.php +++ b/src/Solution/SolutionProviderInterface.php @@ -10,13 +10,13 @@ */ interface SolutionProviderInterface { -/** -* Returns true if the implementation may suggest more than regular provider. -*/ + /** + * Returns true if the implementation may suggest more than regular provider. + */ public function supports(\Throwable $e): bool; -/** -* Generates an HTML code with solution which will be clean by {@see \Yiisoft\ErrorHandler\Renderer\HtmlRenderer} and shown to the end user. -*/ + /** + * Generates an HTML code with solution which will be clean by {@see \Yiisoft\ErrorHandler\Renderer\HtmlRenderer} and shown to the end user. + */ public function generate(\Throwable $e): string; }