1 | <?php |
||
12 | class Driver implements \Bernard\Driver |
||
13 | { |
||
14 | const QUEUE_PREFIX = 'queue:'; |
||
15 | |||
16 | protected $redis; |
||
17 | |||
18 | /** |
||
19 | * @param Redis $redis |
||
20 | */ |
||
21 | public function __construct(Redis $redis) |
||
25 | |||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function listQueues() |
||
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | public function createQueue($queueName) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function countMessages($queueName) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function pushMessage($queueName, $message) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function popMessage($queueName, $duration = 5) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function peekQueue($queueName, $index = 0, $limit = 20) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | public function acknowledgeMessage($queueName, $receipt) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function removeQueue($queueName) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function info() |
||
109 | |||
110 | /** |
||
111 | * Transform the queueName into a key. |
||
112 | * |
||
113 | * @param string $queueName |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | protected function resolveKey($queueName) |
||
121 | } |
||
122 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: