<commit_before><?php
class UserVote
{
  private function __construct()
  {
    $this->placed = false;
    $this->flipped = false;
    $this->value = 0;
  }
  
  // Create instance from member entity
  public static function create($member, $currentPoll)
  {
    $vote = new UserVote();
    $vote->id = $member->getId();
    $vote->name = $member->getName();
    
    // Poll related values
    if(is_null($currentPoll))
      return $vote;
  
    // Flip cards if poll was completed
    $vote->flipped = $currentPoll->getResult() > 0;
    
    // Find matching member in poll
    foreach($currentPoll->getVotes() as $candidate)
    {
      if($candidate->getMember() === $member)
      {
        $match = $candidate; 
      }
    }
  
    if(isset($match))
    {
      $vote->placed = true;
      $vote->value = $match->getValue();  
    }
    
    return $vote;
  }
  
  // Id of the member
  public integer $id;
  
  // Name of the user
  public string $name;
  
  // Flag if value was set allready
  public bool $placed;
  
  // Value of the vote
  public float $value;
  
  // For ui only
  public bool $flipped;
}<commit_msg>Bugfix for type<commit_after><?php
class UserVote
{
  private function __construct()
  {
    $this->placed = false;
    $this->flipped = false;
    $this->value = 0;
  }
  
  // Create instance from member entity
  public static function create($member, $currentPoll)
  {
    $vote = new UserVote();
    $vote->id = $member->getId();
    $vote->name = $member->getName();
    
    // Poll related values
    if(is_null($currentPoll))
      return $vote;
  
    // Flip cards if poll was completed
    $vote->flipped = $currentPoll->getResult() > 0;
    
    // Find matching member in poll
    foreach($currentPoll->getVotes() as $candidate)
    {
      if($candidate->getMember() === $member)
      {
        $match = $candidate; 
      }
    }
  
    if(isset($match))
    {
      $vote->placed = true;
      $vote->value = $match->getValue();  
    }
    
    return $vote;
  }
  
  // Id of the member
  public $id;
  
  // Name of the user
  public $name;
  
  // Flag if value was set allready
  public $placed;
  
  // Value of the vote
  public $value;
  
  // For ui only
  public $flipped;
}
{'fraction_non_alphanumeric': 0.13895114298520841, 'fraction_numerical': 0.0017929179740026895, 'mean_word_length': 2.152542372881356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4518524', 'n_tokens_mistral': 754, 'n_tokens_neox': 749, 'n_words': 195}