<commit_before><?php namespace SleepingOwl\Models;

use Carbon\Carbon;
use InvalidArgumentException;
use SleepingOwl\Models\Interfaces\ValidationModelInterface;
use SleepingOwl\Models\Traits\DeleteAllModelTrait;
use SleepingOwl\Models\Traits\ModelWithImageOrFileFieldsTrait;
use SleepingOwl\Models\Traits\ValidationModelTrait;

/**
 * @method static defaultSort()
 */
abstract class SleepingOwlModel extends \Eloquent implements ValidationModelInterface
{
	use DeleteAllModelTrait, ValidationModelTrait, ModelWithImageOrFileFieldsTrait;

	/**
	 * @return \Illuminate\Database\Eloquent\Builder
	 */
	public function newQuery()
	{
		$query = parent::newQuery();
		$query->defaultSort();
		return $query;
	}

	/**
	 * @param $query
	 */
	public function scopeDefaultSort($query)
	{
		return $query;
	}

	/**
	 * @return \Illuminate\Database\Eloquent\Builder
	 */
	public static function withoutOrders()
	{
		$instance = new static;
		$query = $instance->newQuery();
		$query->getQuery()->orders = [];
		return $query;
	}

	/**<commit_msg>Added trait for async mode<commit_after><?php namespace SleepingOwl\Models;

use Carbon\Carbon;
use InvalidArgumentException;
use SleepingOwl\Models\Interfaces\ValidationModelInterface;
use SleepingOwl\Models\Traits\DeleteAllModelTrait;
use SleepingOwl\Models\Traits\ModelWithImageOrFileFieldsTrait;
use SleepingOwl\Models\Traits\ValidationModelTrait;

/**
 * @method static defaultSort()
 */
abstract class SleepingOwlModel extends \Eloquent implements ValidationModelInterface
{
	use DeleteAllModelTrait, ValidationModelTrait, ModelWithImageOrFileFieldsTrait;
	use \SleepingOwl\WithJoin\WithJoinTrait;

	/**
	 * @return \Illuminate\Database\Eloquent\Builder
	 */
	public function newQuery()
	{
		$query = parent::newQuery();
		$query->defaultSort();
		return $query;
	}

	/**
	 * @param $query
	 */
	public function scopeDefaultSort($query)
	{
		return $query;
	}

	/**
	 * @return \Illuminate\Database\Eloquent\Builder
	 */
	public static function withoutOrders()
	{
		$instance = new static;
		$query = $instance->newQuery();
		$query->getQuery()->orders = [];
		return $query;
	}

	/**
{'fraction_non_alphanumeric': 0.12141176470588236, 'fraction_numerical': 0.0, 'mean_word_length': 5.056980056980057, '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': '6636228', 'n_tokens_mistral': 711, 'n_tokens_neox': 675, 'n_words': 126}