Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 8adfd06

Browse files
committed
Adds comment to indicate purpose behind closing over callable.
1 parent 036d3ba commit 8adfd06

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Handler/NotFoundHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function __construct(
4646
string $template = self::TEMPLATE_DEFAULT,
4747
string $layout = self::LAYOUT_DEFAULT
4848
) {
49+
// Factory cast to closure in order to provide return type safety.
4950
$this->responseFactory = function () use ($responseFactory) : ResponseInterface {
5051
return $responseFactory();
5152
};

0 commit comments

Comments
 (0)