Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
41 | public function supports(MessageInterface $message): bool |
||
42 | { |
||
43 | if (!class_exists(SfDumper::class)) { |
||
44 | return false; |
||
45 | } |
||
46 | |||
47 | if (!$message instanceof ResponseInterface) { |
||
48 | return false; |
||
49 | } |
||
50 | |||
51 | [$contentType,] = explode(';', $message->getHeaderLine('Content-Type'), 2); |
||
52 | |||
53 | return 'application/json' === $contentType; |
||
54 | } |
||
56 |