Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | /** |
6 | * This file is part of php-fast-forward/http-message. |
7 | * |
8 | * This source file is subject to the license bundled |
9 | * with this source code in the file LICENSE. |
10 | * |
11 | * @link https://github.com/php-fast-forward/http-message |
12 | * @copyright Copyright (c) 2025 Felipe Sayão Lobato Abreu <github@mentordosnerds.com> |
13 | * @license https://opensource.org/licenses/MIT MIT License |
14 | */ |
15 | |
16 | namespace FastForward\Http\Message; |
17 | |
18 | /** |
19 | * Interface PayloadAwareInterface. |
20 | * |
21 | * Defines functionality for objects that encapsulate and manage a payload. |
22 | * Implementations of this interface MUST provide immutable methods for accessing and replacing the payload. |
23 | * The payload MAY be of any type supported by the implementation, including arrays, objects, scalars, or null. |
24 | * |
25 | * @package FastForward\Http\Message |
26 | */ |
27 | interface PayloadAwareInterface |
28 | { |
29 | /** |
30 | * Retrieves the payload contained within the object. |
31 | * |
32 | * This method MUST return the payload as originally provided or modified. |
33 | * The returned type MAY vary depending on the structure of the payload (e.g., array, object, scalar, or null). |
34 | * |
35 | * @return mixed the payload, which MAY be of any type including array, object, scalar, or null |
36 | */ |
37 | public function getPayload(): mixed; |
38 | } |