original_string: public function remove($entry, $priority = false)
      {
          $unsetAnything = false;
          foreach ($this->entries as $i => $entryData) {
              if ($entry === $entryData['data'] && ($priority === false || $entryData['priority'] == $priority)) {
                  unset($this->entries[$i]);
                  $unsetAnything = true;
              }
          }
          if ($unsetAnything) {
              $this->sorted = false;
          }
          return $this;
      }
code: public function remove($entry, $priority = false)
      {
          $unsetAnything = false;
          foreach ($this->entries as $i => $entryData) {
              if ($entry === $entryData['data'] && ($priority === false || $entryData['priority'] == $priority)) {
                  unset($this->entries[$i]);
                  $unsetAnything = true;
              }
          }
          if ($unsetAnything) {
              $this->sorted = false;
          }
          return $this;
      }
code_tokens: public function remove ( $ entry , $ priority = false ) { $ unsetAnything = false ; foreach ( $ this -> entries as $ i => $ entryData ) { if ( $ entry === $ entryData [ 'data' ] && ( $ priority === false || $ entryData [ 'priority' ] == $ priority ) ) { unset ( $ this -> entries [ $ i ] ) ; $ unsetAnything = true ; } } if ( $ unsetAnything ) { $ this -> sorted = false ; } return $ this ; }
docstring: Removes an entry from the list.
  @param mixed $entry
  @param bool|int $priority When false, remove all instances of $entry from the list, otherwise only those with matching priority
  @return $this
docstring_tokens: Removes an entry from the list .