We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
str_contains
1 parent aefc35d commit d7b45f7Copy full SHA for d7b45f7
src/Http/Client.php
@@ -197,10 +197,6 @@ private function parseResponse(ResponseInterface $response)
197
*/
198
private function isJSONResponse(array $headerValues): bool
199
{
200
- $filteredHeaders = array_filter($headerValues, static function (string $headerValue) {
201
- return false !== strpos($headerValue, 'application/json');
202
- });
203
-
204
- return \count($filteredHeaders) > 0;
+ return [] !== array_filter($headerValues, static fn (string $v) => str_contains($v, 'application/json'));
205
}
206
0 commit comments