original_string: public function getNewBatch($limit = 0)
      {
          try {
              if (!is_numeric($limit) || $limit <= 0) {
                  $limit = $this->limit;
              }
              return (new Query)
                      ->from($this->queueTable)
                      ->where(['status' => Email::STATUS_PENDING])
                      ->orderBy(['id' => SORT_ASC])
                      ->limit((int)$limit)
                      ->all($this->db);
          } catch (Exception $e) {
              Log::error($e->getMessage(), null, __METHOD__);
          }
      }
code: public function getNewBatch($limit = 0)
      {
          try {
              if (!is_numeric($limit) || $limit <= 0) {
                  $limit = $this->limit;
              }
              return (new Query)
                      ->from($this->queueTable)
                      ->where(['status' => Email::STATUS_PENDING])
                      ->orderBy(['id' => SORT_ASC])
                      ->limit((int)$limit)
                      ->all($this->db);
          } catch (Exception $e) {
              Log::error($e->getMessage(), null, __METHOD__);
          }
      }
code_tokens: public function getNewBatch ( $ limit = 0 ) { try { if ( ! is_numeric ( $ limit ) || $ limit <= 0 ) { $ limit = $ this -> limit ; } return ( new Query ) -> from ( $ this -> queueTable ) -> where ( [ 'status' => Email :: STATUS_PENDING ] ) -> orderBy ( [ 'id' => SORT_ASC ] ) -> limit ( ( int ) $ limit ) -> all ( $ this -> db ) ; } catch ( Exception $ e ) { Log :: error ( $ e -> getMessage ( ) , null , __METHOD__ ) ; } }
docstring: Returns new batch of emails.
  @param int $limit maximum number of rows in batch
  @return array
docstring_tokens: Returns new batch of emails .