Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
StaticContentBase | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
toBody | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Http\Client; |
6 | |
7 | use PeServer\Core\Binary; |
8 | |
9 | /** |
10 | * 構築時点でもう粗方確定している本文データ。 |
11 | * |
12 | * 本文データ自体は継承側コンストラクタで構築すること。 |
13 | */ |
14 | abstract class StaticContentBase extends HttpClientContentBase |
15 | { |
16 | #region variable |
17 | |
18 | protected readonly Binary $body; |
19 | |
20 | #endregion |
21 | |
22 | protected function __construct(Binary $body) |
23 | { |
24 | $this->body = $body; |
25 | } |
26 | |
27 | #region HttpClientContentBase |
28 | |
29 | public function toBody(): Binary |
30 | { |
31 | return $this->body; |
32 | } |
33 | |
34 | #endregion |
35 | } |