original_string: public function readAll($chat, $route, $nameReader)
      {
          $queue = new \AMQPQueue($this->channel);
          $queue->setName($nameReader);
          /** @noinspection PhpUndefinedMethodInspection */
          $queue->declare();
          $queue->bind($chat, $route);
  
          $result = [];
          while ($envelop = $queue->get()) {
              $queue->ack($envelop->getDeliveryTag());
              $result[] = $envelop;
          }
  
          return $result;
      }
code: public function readAll($chat, $route, $nameReader)
      {
          $queue = new \AMQPQueue($this->channel);
          $queue->setName($nameReader);
          /** @noinspection PhpUndefinedMethodInspection */
          $queue->declare();
          $queue->bind($chat, $route);
  
          $result = [];
          while ($envelop = $queue->get()) {
              $queue->ack($envelop->getDeliveryTag());
              $result[] = $envelop;
          }
  
          return $result;
      }
code_tokens: public function readAll ( $ chat , $ route , $ nameReader ) { $ queue = new \ AMQPQueue ( $ this -> channel ) ; $ queue -> setName ( $ nameReader ) ; /** @noinspection PhpUndefinedMethodInspection */ $ queue -> declare ( ) ; $ queue -> bind ( $ chat , $ route ) ; $ result = [ ] ; while ( $ envelop = $ queue -> get ( ) ) { $ queue -> ack ( $ envelop -> getDeliveryTag ( ) ) ; $ result [ ] = $ envelop ; } return $ result ; }
docstring: Read all messages
  
  @access public
  
  @param string $chat name chat room
  @param string $route name route
  @param string $nameReader name queue
  
  @return array
  @throws \AMQPConnectionException
  @throws \AMQPQueueException
  @throws \AMQPChannelException
docstring_tokens: Read all messages