1 | <?php |
||
19 | final class ReceivedCommand implements Command |
||
20 | { |
||
21 | /** |
||
22 | * @var Command |
||
23 | */ |
||
24 | private $originalCommand; |
||
25 | |||
26 | /** |
||
27 | * ReceivedCommand constructor. |
||
28 | * |
||
29 | * @param Command $originalCommand |
||
30 | */ |
||
31 | public function __construct(Command $originalCommand) |
||
35 | |||
36 | /** |
||
37 | * Get original command. |
||
38 | * |
||
39 | * @return Command |
||
40 | */ |
||
41 | public function getOriginalCommand(): Command |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | * |
||
49 | * @throws ReceivedCommandException |
||
50 | */ |
||
51 | public function has(string $parameter): bool |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | * |
||
59 | * @throws ReceivedCommandException |
||
60 | * |
||
61 | * @return mixed |
||
|
|||
62 | */ |
||
63 | public function get(string $parameter) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | * |
||
71 | * @throws ReceivedCommandException |
||
72 | * |
||
73 | * @return array<string, mixed> |
||
74 | */ |
||
75 | public function getPayload(): array |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | * |
||
83 | * @throws ReceivedCommandException |
||
84 | */ |
||
85 | public static function reconstitute(array $parameters): void |
||
89 | } |
||
90 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.