| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class LicenseResponder implements FormattedResponderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param array{ |
||
| 14 | * valid: string, |
||
| 15 | * email: string, |
||
| 16 | * licenseExpires: string |
||
| 17 | * } $licenseData |
||
| 18 | */ |
||
| 19 | 4 | public function __construct( |
|
| 22 | 4 | } |
|
| 23 | |||
| 24 | 1 | public function writeXml(XMLArray $XMLArray): void |
|
| 25 | { |
||
| 26 | 1 | $XMLArray->add( |
|
| 27 | 1 | 'license', |
|
| 28 | 1 | null, |
|
| 29 | 1 | $this->licenseData |
|
| 30 | 1 | ); |
|
| 31 | } |
||
| 32 | |||
| 33 | 1 | public function writeJson(array &$root): void |
|
| 34 | { |
||
| 35 | 1 | $root['license'] = $this->licenseData; |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function isBinaryResponder(): bool |
|
| 41 | } |
||
| 42 | } |
||
| 43 |