1 | <?php |
||
13 | class QueueReader implements DomainQueueReader |
||
14 | { |
||
15 | /** |
||
16 | * @var SqsClient |
||
17 | */ |
||
18 | protected $sqs; |
||
19 | |||
20 | /** |
||
21 | * @var SnsClient |
||
22 | */ |
||
23 | protected $sns; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $queueUrl; |
||
29 | |||
30 | /** |
||
31 | * @var MessageHandler |
||
32 | */ |
||
33 | protected $messageHandler; |
||
34 | |||
35 | /** |
||
36 | * @var LoggerInterface |
||
37 | */ |
||
38 | protected $logger; |
||
39 | |||
40 | /** |
||
41 | * @param SqsClient $sqs |
||
42 | * @param SnsClient $sns |
||
43 | * @param string $queueName |
||
44 | * @param string $topicName |
||
45 | * @param MessageHandler $messageHandler |
||
46 | * @param LoggerInterface $logger |
||
47 | */ |
||
48 | public function __construct( |
||
63 | |||
64 | /** |
||
65 | * @param callable $callback |
||
66 | * @param int $timeout |
||
67 | * |
||
68 | * @throws TimeoutReaderException |
||
69 | * @throws ReaderException |
||
70 | */ |
||
71 | public function read(callable $callback, $timeout=0) |
||
83 | |||
84 | /** |
||
85 | * Deletes all messages from the queue |
||
86 | */ |
||
87 | public function purge() |
||
91 | |||
92 | /** |
||
93 | * @param int $timeout |
||
94 | * |
||
95 | * @throws TimeoutReaderException |
||
96 | */ |
||
97 | protected function consume($timeout) |
||
116 | |||
117 | /** |
||
118 | * @param string $queueName |
||
119 | * @param string $topicName |
||
120 | * |
||
121 | * @throws ReaderException |
||
122 | */ |
||
123 | protected function initialize($queueName, $topicName) |
||
133 | |||
134 | /** |
||
135 | * Creates the queue in SQS, nothing will happen if the queue already exists |
||
136 | * |
||
137 | * @param string $queueName |
||
138 | */ |
||
139 | protected function createQueue($queueName) |
||
144 | |||
145 | /** |
||
146 | * @param string $topicName |
||
147 | */ |
||
148 | protected function bindToSNS($topicName) |
||
180 | } |
||
181 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: