<commit_before><?php

  namespace FS;
  
  class Relationship extends \Org\Gedcomx\Conclusion\Relationship {
  
    private $client;
  
    public function __construct($data, $client) {
      
      parent::__construct($data);
      
      $this->client = $client;
      
    }
  
    public function getSpouse() {
      return $this->getPerson($this->spouse->resource);
    }
    
    public function getPerson1() {
      return $this->getPerson($this->person1->resource);
    }
    
    public function getPerson2() {
      return $this->getPerson($this->person2->resource);
    }
    
    private function getPerson($resource) {
      return $this->client->getFSJson($resource)->getPerson();
    }
    
  }
  
  class ChildAndParentsRelationship extends \Org\Familysearch\Platform\Ct\ChildAndParentsRelationship {
  
    private $client;
  
    public function __construct($data, $client) {
      
      parent::__construct($data);
      
      $this->client = $client;
      
    }
    
    public function getFather() {
      return $this->getPerson($this->father->resource);
    }
    
    public function getMother() {
      return $this->getPerson($this->mother->resource);
    }
    
    public function getChild() {
      return $this->getPerson($this->child->resource);<commit_msg>Don't request a mother or father that doesn't exist<commit_after><?php

  namespace FS;
  
  class Relationship extends \Org\Gedcomx\Conclusion\Relationship {
  
    private $client;
  
    public function __construct($data, $client) {
      
      parent::__construct($data);
      
      $this->client = $client;
      
    }
  
    public function getSpouse() {
      return $this->getPerson($this->spouse->resource);
    }
    
    public function getPerson1() {
      return $this->getPerson($this->person1->resource);
    }
    
    public function getPerson2() {
      return $this->getPerson($this->person2->resource);
    }
    
    private function getPerson($resource) {
      return $this->client->getFSJson($resource)->getPerson();
    }
    
  }
  
  class ChildAndParentsRelationship extends \Org\Familysearch\Platform\Ct\ChildAndParentsRelationship {
  
    private $client;
  
    public function __construct($data, $client) {
      
      parent::__construct($data);
      
      $this->client = $client;
      
    }
    
    public function hasFather() {
      return isset($this->father);
    }
    
    public function hasMother() {
      return isset($this->mother);
    }
    
    public function getFather() {
      if( $this->father ) {
        return $this->getPerson($this->father->resource);
      } else {
        return null;
      }
    }
    
    public function getMother() {
      if( $this->mother ) {
        return $this->getPerson($this->mother->resource);
      } else {
        return null;
      }
    }
    
    public function getChild() {
      return $this->getPerson($this->child->resource);
{'fraction_non_alphanumeric': 0.12832764505119454, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 2.357388316151203, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, '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': '7116283', 'n_tokens_mistral': 869, 'n_tokens_neox': 850, 'n_words': 155}