Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-stdlib/src/PriorityQueue.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
97 } | 97 } |
98 if ($found) { | 98 if ($found) { |
99 unset($this->items[$key]); | 99 unset($this->items[$key]); |
100 $this->queue = null; | 100 $this->queue = null; |
101 | 101 |
102 if (!$this->isEmpty()) { | 102 if (! $this->isEmpty()) { |
103 $queue = $this->getQueue(); | 103 $queue = $this->getQueue(); |
104 foreach ($this->items as $item) { | 104 foreach ($this->items as $item) { |
105 $queue->insert($item['data'], $item['priority']); | 105 $queue->insert($item['data'], $item['priority']); |
106 } | 106 } |
107 } | 107 } |
275 */ | 275 */ |
276 protected function getQueue() | 276 protected function getQueue() |
277 { | 277 { |
278 if (null === $this->queue) { | 278 if (null === $this->queue) { |
279 $this->queue = new $this->queueClass(); | 279 $this->queue = new $this->queueClass(); |
280 if (!$this->queue instanceof \SplPriorityQueue) { | 280 if (! $this->queue instanceof \SplPriorityQueue) { |
281 throw new Exception\DomainException(sprintf( | 281 throw new Exception\DomainException(sprintf( |
282 'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"', | 282 'PriorityQueue expects an internal queue of type SplPriorityQueue; received "%s"', |
283 get_class($this->queue) | 283 get_class($this->queue) |
284 )); | 284 )); |
285 } | 285 } |