<commit_before><?php
class Kwf_Assets_Dependency_File extends Kwf_Assets_Dependency_Abstract
{
    protected $_fileName;
    private $_mtimeCache;
    private $_fileNameCache;

    public function __construct($fileNameWithType)
    {
        if (substr($fileNameWithType, 0, 1) == '/') {
            throw new Kwf_Exception('Don\'t use absolute file names');
        }
        if (!$fileNameWithType) {
            throw new Kwf_Exception("Invalid filename");
        }
        $this->_fileName = $fileNameWithType;

        //check commented out, only required for debugging
        //if (!file_exists($this->getAbsoluteFileName())) {
        //    throw new Kwf_Exception("File not found: '$this->_fileName' ('{$this->getAbsoluteFileName()}')");
        //}
    }

    public function getContents($language)
    {
        return file_get_contents($this->getAbsoluteFileName());
    }

    public function getType()
    {
        return substr($this->_fileName, 0, strpos($this->_fileName, '/'));
    }

    public function getFileNameWithType()
    {
        return $this->_fileName;
    }
    private static function _getAllPaths()
    {
        static $paths;
        if (!isset($paths)) {
            $cacheId = 'assets-file-paths';<commit_msg>make method protected so it can be used in child classes<commit_after><?php
class Kwf_Assets_Dependency_File extends Kwf_Assets_Dependency_Abstract
{
    protected $_fileName;
    private $_mtimeCache;
    private $_fileNameCache;

    public function __construct($fileNameWithType)
    {
        if (substr($fileNameWithType, 0, 1) == '/') {
            throw new Kwf_Exception('Don\'t use absolute file names');
        }
        if (!$fileNameWithType) {
            throw new Kwf_Exception("Invalid filename");
        }
        $this->_fileName = $fileNameWithType;

        //check commented out, only required for debugging
        //if (!file_exists($this->getAbsoluteFileName())) {
        //    throw new Kwf_Exception("File not found: '$this->_fileName' ('{$this->getAbsoluteFileName()}')");
        //}
    }

    public function getContents($language)
    {
        return file_get_contents($this->getAbsoluteFileName());
    }

    public function getType()
    {
        return substr($this->_fileName, 0, strpos($this->_fileName, '/'));
    }

    public function getFileNameWithType()
    {
        return $this->_fileName;
    }

    protected static function _getAllPaths()
    {
        static $paths;
        if (!isset($paths)) {
            $cacheId = 'assets-file-paths';
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0023584905660377358, 'mean_word_length': 2.646131805157593, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '5261112', 'n_tokens_mistral': 704, 'n_tokens_neox': 702, 'n_words': 161}