Skip to content

Commit 1f871e2

Browse files
fixup! style: add braces to comply with PSR-12
1 parent 79ceb94 commit 1f871e2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

middlewares/SecurityMiddleware.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class SecurityMiddleware implements Middleware
1010
public function __invoke(Request $request, $next): Response
1111
{
1212
foreach ($request->toArray() as $key => $value) {
13-
//TODO: verify if the type of parameter matches the type defined by the bridge in ParameterValidator
14-
if (is_string($value) || is_array($value) && array_all($value, 'is_string')) {
13+
if (is_string($value) || is_array($value) && array_all($value, fn($v, $k) => is_string($v))) {
1514
continue;
1615
}
1716
return new Response(render(__DIR__ . '/../templates/error.html.php', [

0 commit comments

Comments
 (0)