<commit_before><?php

namespace Railken\Laravel\Manager;

abstract class ModelRepository
{

	/**
	 * Class entity
	 *
	 * @var string
	 */
	public $entity;

	/**
	 * Retrieve new instance of entity
	 *
	 * @param array $params
	 *
	 * @return entity
	 */
	public function newEntity(array $params = [])
	{
		return new $this->entity($params);
	}

	/**
	 * Find by primary
	 *
	 * @param integer $id
	 *
	 * @return User
	 */
	public function find($id)
	{
		return $this->getQuery()->findById($id);
	}<commit_msg>fixed find by id<commit_after><?php

namespace Railken\Laravel\Manager;

abstract class ModelRepository
{

	/**
	 * Class entity
	 *
	 * @var string
	 */
	public $entity;

	/**
	 * Retrieve new instance of entity
	 *
	 * @param array $params
	 *
	 * @return entity
	 */
	public function newEntity(array $params = [])
	{
		$entity = $this->entity;

		return new $entity($params);
	}

	/**
	 * Find by primary
	 *
	 * @param integer $id
	 *
	 * @return User
	 */
	public function find($id)
	{
		return $this->findById($id);
	}

	/**
	 * Find by primary
	 *
	 * @param integer $id
	 *
	 * @return User
	 */
	public function findById($id)
	{
		return $this->getQuery()->whereId($id)->first();
	}
{'fraction_non_alphanumeric': 0.15557404326123128, 'fraction_numerical': 0.0, 'mean_word_length': 2.8434504792332267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6239107', 'n_tokens_mistral': 446, 'n_tokens_neox': 392, 'n_words': 102}