<commit_before><?php

namespace UniMapper;

use UniMapper\Reflection,
    UniMapper\EntityCollection,
    UniMapper\Exceptions\QueryException;

/**
 * ORM query object
 */
abstract class Query
{

    public $conditions = array();
    protected $conditionOperators = array("=", "<", ">", "<>", ">=", "<=", "IS", "IS NOT", "!=", "LIKE", "COMPARE", "IN");
    public $mappers = array();
    public $elapsed;
    public $result = null;

    /** @var \UniMapper\Reflection\Entity */
    public $entityReflection;

    public function __construct(Reflection\Entity $entityReflection, array $mappers)
    {
        if (count($mappers) === 0) {
            throw new QueryException("Query can not be used without mappers!");
        }
        $this->mappers = $mappers;

        if (count($entityReflection->getMappers()) === 0) {
            throw new QueryException("Missing mapper definition in entity " . $entityReflection->getName() . "!");
        }
        $this->entityReflection = $entityReflection;
    }

    public static function getName()
    {
        return lcfirst(\ReflectionClass::getShortName(get_called_class()));
    }
<commit_msg>queries: fixed getName()<commit_after><?php

namespace UniMapper;

use UniMapper\Reflection,
    UniMapper\EntityCollection,
    UniMapper\Exceptions\QueryException;

/**
 * ORM query object
 */
abstract class Query
{

    public $conditions = array();
    protected $conditionOperators = array("=", "<", ">", "<>", ">=", "<=", "IS", "IS NOT", "!=", "LIKE", "COMPARE", "IN");
    public $mappers = array();
    public $elapsed;
    public $result = null;

    /** @var \UniMapper\Reflection\Entity */
    public $entityReflection;

    public function __construct(Reflection\Entity $entityReflection, array $mappers)
    {
        if (count($mappers) === 0) {
            throw new QueryException("Query can not be used without mappers!");
        }
        $this->mappers = $mappers;

        if (count($entityReflection->getMappers()) === 0) {
            throw new QueryException("Missing mapper definition in entity " . $entityReflection->getName() . "!");
        }
        $this->entityReflection = $entityReflection;
    }

    public static function getName()
    {
        $reflection = new \ReflectionClass(get_called_class());
        return lcfirst($reflection->getShortName());
    }

{'fraction_non_alphanumeric': 0.15414175918018788, 'fraction_numerical': 0.0017079419299743809, 'mean_word_length': 3.110526315789474, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, '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': '6108652', 'n_tokens_mistral': 674, 'n_tokens_neox': 663, 'n_words': 157}