original_string: public function insert($value, $priority)
      {
          if (! is_int($priority)) {
              throw new Exception\InvalidArgumentException('The priority must be an integer');
          }
          $this->values[$priority][] = $value;
          if (! isset($this->priorities[$priority])) {
              $this->priorities[$priority] = $priority;
              $this->maxPriority           = max($priority, $this->maxPriority);
          }
          ++$this->count;
      }
code: public function insert($value, $priority)
      {
          if (! is_int($priority)) {
              throw new Exception\InvalidArgumentException('The priority must be an integer');
          }
          $this->values[$priority][] = $value;
          if (! isset($this->priorities[$priority])) {
              $this->priorities[$priority] = $priority;
              $this->maxPriority           = max($priority, $this->maxPriority);
          }
          ++$this->count;
      }
code_tokens: public function insert ( $ value , $ priority ) { if ( ! is_int ( $ priority ) ) { throw new Exception \ InvalidArgumentException ( 'The priority must be an integer' ) ; } $ this -> values [ $ priority ] [ ] = $ value ; if ( ! isset ( $ this -> priorities [ $ priority ] ) ) { $ this -> priorities [ $ priority ] = $ priority ; $ this -> maxPriority = max ( $ priority , $ this -> maxPriority ) ; } ++ $ this -> count ; }
docstring: Insert an element in the queue with a specified priority
  
  @param mixed $value
  @param integer $priority a positive integer
docstring_tokens: Insert an element in the queue with a specified priority