Skip to content

Commit a0e1686

Browse files
committed
Leverage str_starts_with(), str_ends_with() and str_contains()
1 parent 6530589 commit a0e1686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authenticator/JsonLoginAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __construct(HttpUtils $httpUtils, UserProviderInterface $userPro
6565

6666
public function supports(Request $request): ?bool
6767
{
68-
if (false === strpos($request->getRequestFormat() ?? '', 'json') && false === strpos($request->getContentType() ?? '', 'json')) {
68+
if (!str_contains($request->getRequestFormat() ?? '', 'json') && !str_contains($request->getContentType() ?? '', 'json')) {
6969
return false;
7070
}
7171

0 commit comments

Comments
 (0)