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 9cf7a37 commit 0c986eaCopy full SHA for 0c986ea
src/Http/Client.php
@@ -195,10 +195,6 @@ private function parseResponse(ResponseInterface $response)
195
*/
196
private function isJSONResponse(array $headerValues): bool
197
{
198
- $filteredHeaders = array_filter($headerValues, static function (string $headerValue) {
199
- return false !== strpos($headerValue, 'application/json');
200
- });
201
-
202
- return \count($filteredHeaders) > 0;
+ return [] !== array_filter($headerValues, static fn (string $v) => str_contains($v, 'application/json'));
203
}
204
0 commit comments