<commit_before><?php

class BaseSession implements BaseSessionInterface {

  /**
   * @var BaseSessionInterface
   */
  private $session = null;

  /**
   * @param string $session_class
   * @throws BaseSessionException if session class is not defined
   * @throws BaseSessionException if session class is not a instance of BaseSessionInterface
   */
  public function __construct($session_class = '') {
    /*
     * TODO: Remove deprecated config calls
    if(empty($session_class)) {
      try {
        $session_class = Config::get_instance()->get('session.class');
      } catch (ConfigException $e) {} 
    }
    */

    if(!$session_class) {
      throw new BaseSessionException('Session class not defined');      
    }    
    
    if(class_exists($session_class, true)) {
      $this->session = new $session_class();
      if(!($this->session instanceof BaseSessionInterface)) {
        $this->session = null;
        throw new BaseSessionException($session_class . ' is not a instance of BaseSessionInterface');
      }
    } else {
      throw new BaseSessionException('Session class ' . $session_class . ' not found');
    }
  }
<commit_msg>Removed no longer required config access from session<commit_after><?php

class BaseSession implements BaseSessionInterface {

  /**
   * @var BaseSessionInterface
   */
  private $session = null;

  /**
   * @param string $session_class
   * @throws BaseSessionException if session class is not defined
   * @throws BaseSessionException if session class is not a instance of BaseSessionInterface
   */
  public function __construct($session_class = '') {
    if(!$session_class) {
      throw new BaseSessionException('Session class not defined');      
    }    
    
    if(class_exists($session_class, true)) {
      $this->session = new $session_class();
      if(!($this->session instanceof BaseSessionInterface)) {
        $this->session = null;
        throw new BaseSessionException($session_class . ' is not a instance of BaseSessionInterface');
      }
    } else {
      throw new BaseSessionException('Session class ' . $session_class . ' not found');
    }
  }

{'fraction_non_alphanumeric': 0.10709253170502583, 'fraction_numerical': 0.0, 'mean_word_length': 3.111969111969112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '6238174', 'n_tokens_mistral': 563, 'n_tokens_neox': 557, 'n_words': 157}