| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | abstract class AbstractRequest |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param string $type Request type |
||
| 11 | * @param ?\DateTime $timestamp Request timestamp |
||
| 12 | */ |
||
| 13 | 62 | public function __construct( |
|
| 14 | public string $type, |
||
| 15 | public ?\DateTime $timestamp = null, |
||
| 16 | ) { |
||
| 17 | 62 | } |
|
| 18 | |||
| 19 | abstract public static function fromAmazonRequest(array $amazonRequest): self; |
||
| 20 | |||
| 21 | 10 | public function validateTimestamp(): bool |
|
| 22 | { |
||
| 23 | 10 | return true; |
|
| 24 | } |
||
| 25 | |||
| 26 | 54 | public function validateSignature(): bool |
|
| 29 | } |
||
| 30 | |||
| 31 | 48 | protected static function getTime(string|int|null $value): ?\DateTime |
|
| 43 | } |
||
| 44 | } |
||
| 45 |