<commit_before><?php

namespace Hexmedia\UserBundle\Repository\Doctrine;

use Doctrine\ORM\EntityRepository;
use Hexmedia\UserBundle\Repository\UserRepositoryInterface;

class UserRepository extends EntityRepository implements UserRepositoryInterface {

	public function getPage($page = 1, $sort = 'id', $pageSize = 10, $sortDirection = 'ASC', $fields = array()) {
		$queryBuilder = $this->createQueryBuilder('u')
			->setMaxResults($pageSize)
			->setFirstResult(max(0, $page - 1) * $pageSize)
			->orderBy('u.' . $sort, $sortDirection == 'ASC' ? 'ASC' : 'DESC')
		;

		return $queryBuilder->getQuery()->getResult();
	}

	public function getCount() {
		$queryBuilder = $this->createQueryBuilder("u")
			->select("count(u.id)");

		return $queryBuilder->getQuery()->getSingleScalarResult();
	}

}
<commit_msg>Admin panel list's rewritten.<commit_after><?php

namespace Hexmedia\UserBundle\Repository\Doctrine;

use Doctrine\ORM\EntityRepository;
use Hexmedia\UserBundle\Repository\UserRepositoryInterface;
use Hexmedia\AdministratorBundle\Repository\Doctrine\ListTrait;

class UserRepository extends EntityRepository implements UserRepositoryInterface {

	use ListTrait;

}

{'fraction_non_alphanumeric': 0.13458262350936967, 'fraction_numerical': 0.004258943781942078, 'mean_word_length': 6.078313253012048, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '5884857', 'n_tokens_mistral': 370, 'n_tokens_neox': 342, 'n_words': 68}