<commit_before><?php

namespace MABI;

include_once __DIR__ . '/ModelLoader.php';
include_once __DIR__ . '/Utilities.php';

/**
 * todo: docs
 */
class DirectoryModelLoader extends ModelLoader {

  protected $directory;
  protected $namespace;

  /**
   * @var string[]
   */
  protected $modelClasses;

  /**
   * todo: docs
   *
   * @param $directory string
   * @param $namespace string|null
   */
  public function __construct($directory, $namespace = NULL) {
    $this->directory = $directory;
    $this->namespace = $namespace;

    // Make sure all PHP files in the directory are included
    $modelClassFiles = DirectoryHelper::directoryToArray($this->directory, TRUE, '.php');<commit_msg>Fixed bug when Directory has no models<commit_after><?php

namespace MABI;

include_once __DIR__ . '/ModelLoader.php';
include_once __DIR__ . '/Utilities.php';

/**
 * todo: docs
 */
class DirectoryModelLoader extends ModelLoader {

  protected $directory;
  protected $namespace;

  /**
   * @var string[]
   */
  protected $modelClasses = array();

  /**
   * todo: docs
   *
   * @param $directory string
   * @param $namespace string|null
   */
  public function __construct($directory, $namespace = NULL) {
    $this->directory = $directory;
    $this->namespace = $namespace;

    // Make sure all PHP files in the directory are included
    $modelClassFiles = DirectoryHelper::directoryToArray($this->directory, TRUE, '.php');
{'fraction_non_alphanumeric': 0.13067784765897975, 'fraction_numerical': 0.0, 'mean_word_length': 3.634304207119741, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1843515', 'n_tokens_mistral': 424, 'n_tokens_neox': 410, 'n_words': 114}