<commit_before><?php

class CRM_Travelcase_ApplicantPaysConfig {
  
  protected static $singleton;
  
  protected $custom_group_ids;
  
  protected $activity_type_id;
  
  protected $restrictied_activities;
  
  protected function __construct() {
    $this->activity_type_id = civicrm_api3('OptionValue', 'getvalue', array('name' => 'Condition: Applicant Pays', 'option_group_id' => 2, 'return' => 'value'));
    $this->loadCustomGroupIds();
    $this->loadRestrictedActivities();
  }
  
  /**
   * 
   * @return CRM_Travelcase_ApplicantPaysConfig
   */
  public static function singleton() {
    if (!self::$singleton) {
      self::$singleton = new CRM_Travelcase_ApplicantPaysConfig();
    }
    return self::$singleton;
  }
  
  protected function loadCustomGroupIds() {
    $ta_config = CRM_Travelcase_InfoForTravelAgencyConfig::singleton();
    $dsa_config = CRM_Travelcase_InfoForDsaConfig::singleton();
    
    $this->custom_group_ids = array();
    $this->custom_group_ids[] = $ta_config->getInfoForTravelAgencyCustomGroup('id');
    $this->custom_group_ids[] = $dsa_config->getCustomGroupInfoForDsa('id');
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'travel_parent', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'travel_data', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'traveler_information', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'pickup', 'return' => 'id'));
  }
  
  protected function loadRestrictedActivities() {<commit_msg>build in reference to main activity for applicant pays activity<commit_after><?php

class CRM_Travelcase_ApplicantPaysConfig {
  
  protected static $singleton;
  
  protected $custom_group_ids;
  
  protected $activity_type_id;
  
  protected $restrictied_activities;
  
  protected function __construct() {
    if (class_exists('CRM_Mainactivity_ApplicantPaysConfig')) {
     $ma_applicantpaysconfig = CRM_Mainactivity_ApplicantPaysConfig::singleton();
     $this->activity_type_id = $ma_applicantpaysconfig->getActivityTypeId();
    } else {
      $this->activity_type_id = civicrm_api3('OptionValue', 'getvalue', array('name' => 'Condition: Applicant Pays', 'option_group_id' => 2, 'return' => 'value'));
    }
    $this->loadCustomGroupIds();
    $this->loadRestrictedActivities();
  }
  
  /**
   * 
   * @return CRM_Travelcase_ApplicantPaysConfig
   */
  public static function singleton() {
    if (!self::$singleton) {
      self::$singleton = new CRM_Travelcase_ApplicantPaysConfig();
    }
    return self::$singleton;
  }
  
  protected function loadCustomGroupIds() {
    $ta_config = CRM_Travelcase_InfoForTravelAgencyConfig::singleton();
    $dsa_config = CRM_Travelcase_InfoForDsaConfig::singleton();
    
    $this->custom_group_ids = array();
    $this->custom_group_ids[] = $ta_config->getInfoForTravelAgencyCustomGroup('id');
    $this->custom_group_ids[] = $dsa_config->getCustomGroupInfoForDsa('id');
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'travel_parent', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'travel_data', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'traveler_information', 'return' => 'id'));
    $this->custom_group_ids[] = civicrm_api3('CustomGroup', 'getvalue', array('name' => 'pickup', 'return' => 'id'));
  }
  
  protected function loadRestrictedActivities() {
{'fraction_non_alphanumeric': 0.15546448087431694, 'fraction_numerical': 0.003278688524590164, 'mean_word_length': 5.344887348353553, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, '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': '4538884', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1196, 'n_words': 186}