It seems like $requestContentType can also be of type null; however, parameter $subject of preg_match() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
34
if (preg_match($jsonContentType, /** @scrutinizer ignore-type */ $requestContentType) > 0) {
Loading history...
35
4
return true;
36
}
37
}
38
1
return false;
39
}
40
41
4
private function parseBody(ServerRequestInterface $request) : array