original_string: public function removeRandom()
      {
          $index = array_rand($this->entities);
          $entity = $this->entities[$index];
          unset($this->entities[$index]);
  
          return $entity;
      }
code: public function removeRandom()
      {
          $index = array_rand($this->entities);
          $entity = $this->entities[$index];
          unset($this->entities[$index]);
  
          return $entity;
      }
code_tokens: public function removeRandom ( ) { $ index = array_rand ( $ this -> entities ) ; $ entity = $ this -> entities [ $ index ] ; unset ( $ this -> entities [ $ index ] ) ; return $ entity ; }
docstring: Remove a random Entity from this collection, or null if the
  collection is empty.
  
  @return Entity|null
docstring_tokens: Remove a random Entity from this collection or null if the collection is empty .