1 | <?php |
||
24 | final class ArrayAdapter implements AdapterInterface |
||
25 | { |
||
26 | /** @var MessageInterface[] */ |
||
27 | protected $queue = []; |
||
28 | |||
29 | /** |
||
30 | * @param MessageInterface[] $messages |
||
31 | 18 | */ |
|
32 | public function __construct(array $messages = []) |
||
33 | 18 | { |
|
34 | 18 | $this->enqueue($messages); |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param array $messages |
||
39 | */ |
||
40 | public function acknowledge(array $messages) |
||
46 | |||
47 | /** |
||
48 | * Attempt to reject all the following messages (make the message immediately visible to other consumers) |
||
49 | * |
||
50 | * @param MessageInterface[] $messages |
||
51 | * |
||
52 | 16 | * @return void |
|
53 | * |
||
54 | * @throws FailedAcknowledgementException |
||
55 | */ |
||
56 | public function reject(array $messages) |
||
60 | 16 | ||
61 | /** |
||
62 | 16 | * @param MessageFactoryInterface $factory |
|
63 | * @param int $limit |
||
64 | * |
||
65 | * @return LimitIterator |
||
66 | */ |
||
67 | public function dequeue(MessageFactoryInterface $factory, $limit) |
||
79 | |||
80 | 4 | /** |
|
81 | 4 | * @param array $messages |
|
82 | */ |
||
83 | public function enqueue(array $messages) |
||
89 | 2 | ||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function purge() |
||
97 | 18 | ||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function delete() |
||
105 | |||
106 | /** |
||
107 | * @param MessageInterface $message |
||
108 | */ |
||
109 | protected function addMessage(MessageInterface $message) |
||
113 | } |
||
114 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..