| Total Complexity | 3 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | final class JsonPayloadsBootloader extends Bootloader |
||
| 21 | { |
||
| 22 | /** @var array */ |
||
| 23 | protected const DEPENDENCIES = [ |
||
| 24 | HttpBootloader::class |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** @var ConfiguratorInterface */ |
||
| 28 | private $config; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * JsonPayloadsBootloader constructor. |
||
| 32 | * @param ConfiguratorInterface $config |
||
| 33 | */ |
||
| 34 | public function __construct(ConfiguratorInterface $config) |
||
| 35 | { |
||
| 36 | $this->config = $config; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param HttpBootloader $http |
||
| 41 | */ |
||
| 42 | public function boot(HttpBootloader $http): void |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Add custom MIME type to be parsed as JSON. |
||
| 58 | * |
||
| 59 | * @param string $contentType |
||
| 60 | */ |
||
| 61 | public function addContentType(string $contentType): void |
||
| 64 | } |
||
| 65 | } |
||
| 66 |