1 | <?php |
||
17 | class RedisQueue implements Queue |
||
18 | { |
||
19 | const SCRIPT_PUSH = <<<'LUA' |
||
20 | local id = redis.call('INCR', KEYS[2]) |
||
21 | return redis.call('ZADD', KEYS[1], ARGV[2], id..':'..ARGV[1]) |
||
22 | LUA; |
||
23 | |||
24 | const SCRIPT_POP = <<<'LUA' |
||
25 | local items = redis.call('ZRANGEBYSCORE', KEYS[1], '-inf', ARGV[1], 'LIMIT', 0, 1) |
||
26 | if 0 == #items then return -1 end |
||
27 | redis.call('ZREM', KEYS[1], items[1]) |
||
28 | return string.sub(items[1], string.find(items[1], ':') + 1) |
||
29 | LUA; |
||
30 | |||
31 | /** |
||
32 | * @var \Redis |
||
33 | */ |
||
34 | private $redis; |
||
35 | |||
36 | 27 | public function __construct(\Redis $redis) |
|
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 23 | public function push($item, $eta = null) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 20 | public function pop() |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 2 | public function count() |
|
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | 2 | public function clear() |
|
94 | |||
95 | /** |
||
96 | * @param mixed $result |
||
97 | * |
||
98 | * @throws QueueException |
||
99 | */ |
||
100 | 24 | protected function assertResult($result) |
|
106 | } |
||
107 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.