| Conditions | 4 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 20 | public static function fromAmazonRequest(array $amazonRequest): self |
|
| 33 | { |
||
| 34 | 20 | return new self( |
|
| 35 | 20 | new: isset($amazonRequest['new']) ? (bool) $amazonRequest['new'] : null, |
|
| 36 | 20 | sessionId: PropertyHelper::checkNullValueString($amazonRequest, 'sessionId'), |
|
| 37 | 20 | application: isset($amazonRequest['application']) ? Application::fromAmazonRequest($amazonRequest['application']) : null, |
|
| 38 | 20 | attributes: $amazonRequest['attributes'] ?? [], |
|
| 39 | 20 | user: isset($amazonRequest['user']) ? User::fromAmazonRequest($amazonRequest['user']) : null, |
|
| 40 | 20 | ); |
|
| 43 |