| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function __construct($wrapperKey, $responseData) |
||
| 27 | { |
||
| 28 | if (!is_string($wrapperKey)) { |
||
| 29 | throw new InvalidArgumentException('parameter must be string'); |
||
| 30 | } |
||
| 31 | if (0 >= strlen($wrapperKey)) { |
||
| 32 | throw new DomainException('string must not be empty'); |
||
| 33 | } |
||
| 34 | parent::__construct(); |
||
| 35 | $this->setBody( |
||
| 36 | [ |
||
| 37 | 'data' => [ |
||
| 38 | $wrapperKey => $responseData, |
||
| 39 | ], |
||
| 40 | ] |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |