Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
BinaryContent
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 toHeader
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\Core\Http\Client;
6
7use PeServer\Core\Binary;
8use PeServer\Core\Http\HttpHeader;
9use PeServer\Core\Text;
10
11/**
12 * バイナリ本文データ。
13 */
14class BinaryContent extends StaticContentBase
15{
16    public function __construct(
17        Binary $binary,
18        private string $mime = Text::EMPTY
19    ) {
20        parent::__construct($binary);
21    }
22
23    #region StaticContentBase
24
25    public function toHeader(): HttpHeader
26    {
27        return $this->createContentTypeHeader($this->mime);
28    }
29
30    #endregion
31}