<commit_before><?php

namespace opensixt\SxTranslateBundle\Repository;

use Doctrine\Common\Collections\ArrayCollection;
//use Doctrine\ORM\Query\Expr\Join;
//use Knp\Bundle\PaginatorBundle\Pagination\SlidingPagination;

use opensixt\BikiniTranslateBundle\Repository\TextRepository;

/**
 * Text Model
 *
 * @author <NAME> <<EMAIL>>
 */
class MobileTextRepository extends TextRepository
{
    /** @var array */
    private $domains;


    /**
     * Sets domains
     *
     * @param array $domains
     */
    public function setDomains($domains)
    {
        $this->domains = $domains;
    }

    /**
     * Gets list of texts without translations
     *
     * @return QueryBuilder
     */
    public function getTranslations()
    {
        $query = $this->createQueryBuilder('m')
            ->select('m, t, l, r, dev')
            ->leftJoin('m.text', 't')
            ->leftJoin('m.device', 'dev')
            ->leftJoin('t.locale', 'l')
            ->leftJoin('t.resource', 'r')
            ->leftJoin('t.user', 'u');

        $this->setQueryParameters($query);

        return $query;
    }

    /**
     * Set query parameters by $this->task
     *
     * @param QueryBuilder $query
     */
    protected function setQueryParameters($query)
    {<commit_msg>refactoring: MobileTextRepository<commit_after><?php

namespace opensixt\SxTranslateBundle\Repository;

use Doctrine\Common\Collections\ArrayCollection;
//use Doctrine\ORM\Query\Expr\Join;
//use Knp\Bundle\PaginatorBundle\Pagination\SlidingPagination;

use opensixt\BikiniTranslateBundle\Repository\TextRepository;

/**
 * Text Model
 *
 * @author <NAME> <<EMAIL>>
 */
class MobileTextRepository extends TextRepository
{
    /** @var array */
    private $domains;


    /**
     * Sets domains
     *
     * @param array $domains
     */
    public function setDomains($domains)
    {
        $this->domains = $domains;
    }

    /**
     * Set query parameters by $this->task
     *
     * @param QueryBuilder $query
     */
    protected function setQueryParameters($query)
    {
{'fraction_non_alphanumeric': 0.13499025341130605, 'fraction_numerical': 0.0, 'mean_word_length': 2.5828970331588135, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, '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': '2561373', 'n_tokens_mistral': 628, 'n_tokens_neox': 615, 'n_words': 122}