| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public static function createJWE($payload, array $shared_protected_headers = [], array $shared_headers = [], $aad = null) |
||
| 27 | { |
||
| 28 | $jwe = new JWE(); |
||
| 29 | $jwe = $jwe->withSharedProtectedHeaders($shared_protected_headers); |
||
| 30 | $jwe = $jwe->withSharedHeaders($shared_headers); |
||
| 31 | $jwe = $jwe->withPayload($payload); |
||
| 32 | |||
| 33 | if (null !== $aad) { |
||
| 34 | $jwe = $jwe->withAAD($aad); |
||
| 35 | } |
||
| 36 | |||
| 37 | return $jwe; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |