<commit_before><?php
declare(strict_types=1);

namespace ManaPHP\Data;

interface ModelInterface
{
    public function rules(): array;

    public static function query(?string $alias = null): QueryInterface;

    public static function all(array $filters = [], ?array $fields = null): array;

    public static function paginate(array $filters = [], ?array $fields = null): Paginator;

    public static function lists(string|array $fields, array $filters = []): array;

    public static function get(int|string $id, ?array $fields = null): static;

    public static function first(array $filters, ?array $fields = null): ?static;

    public static function firstOrFail(array $filters, ?array $fields = null): static;

    public static function firstOrNew(array $filters, array $fields = []): static;

    public static function firstOrCreate(array $filters, array $fields = []): static;

    public static function last(array $filters, ?array $fields = null): ?static;

    public static function value(array $filters, string $field): mixed;

    public static function valueOrFail(array $filters, string $field): mixed;

    public static function valueOrDefault(array $filters, string $field, mixed $default): mixed;

    public static function values(string $field, array $filters = []): array;

    public static function kvalues(string|array $kv, array $filters = []): array;

    public static function exists(array $filters): bool;

    public static function count(array $filters = [], string $field = '*'): int;

    public static function sum(string $field, array $filters = []): mixed;

    public static function max(string $field, array $filters = []): mixed;

    public static function min(string $field, array $filters = []): mixed;

    public static function avg(string $field, array $filters = []): ?float;

    public function load(?array $fields = null): static;

    public function assign(array|object $data, array $fields): static;

    public function fill(array $kv): static;

    public function validate(?array $fields = null): void;

    public function validateField(string $field, ?array $rules = null): void;

    public function save(?array $fields = null): static;

    public function create(): static;

    public function update(): static;

    public static function updateAll(array $fieldValues, array $filters): int;

    public function delete(): static;

    public static function deleteAll(array $filters): int;

    public function with(string|array $withs): static;

    public function toArray(): array;<commit_msg>remove ManaPHP\Data\Model::validateField<commit_after><?php
declare(strict_types=1);

namespace ManaPHP\Data;

interface ModelInterface
{
    public function rules(): array;

    public static function query(?string $alias = null): QueryInterface;

    public static function all(array $filters = [], ?array $fields = null): array;

    public static function paginate(array $filters = [], ?array $fields = null): Paginator;

    public static function lists(string|array $fields, array $filters = []): array;

    public static function get(int|string $id, ?array $fields = null): static;

    public static function first(array $filters, ?array $fields = null): ?static;

    public static function firstOrFail(array $filters, ?array $fields = null): static;

    public static function firstOrNew(array $filters, array $fields = []): static;

    public static function firstOrCreate(array $filters, array $fields = []): static;

    public static function last(array $filters, ?array $fields = null): ?static;

    public static function value(array $filters, string $field): mixed;

    public static function valueOrFail(array $filters, string $field): mixed;

    public static function valueOrDefault(array $filters, string $field, mixed $default): mixed;

    public static function values(string $field, array $filters = []): array;

    public static function kvalues(string|array $kv, array $filters = []): array;

    public static function exists(array $filters): bool;

    public static function count(array $filters = [], string $field = '*'): int;

    public static function sum(string $field, array $filters = []): mixed;

    public static function max(string $field, array $filters = []): mixed;

    public static function min(string $field, array $filters = []): mixed;

    public static function avg(string $field, array $filters = []): ?float;

    public function load(?array $fields = null): static;

    public function assign(array|object $data, array $fields): static;

    public function fill(array $kv): static;

    public function validate(?array $fields = null): void;

    public function save(?array $fields = null): static;

    public function create(): static;

    public function update(): static;

    public static function updateAll(array $fieldValues, array $filters): int;

    public function delete(): static;

    public static function deleteAll(array $filters): int;

    public function with(string|array $withs): static;

    public function toArray(): array;
{'fraction_non_alphanumeric': 0.11624704956726986, 'fraction_numerical': 0.0003933910306845004, 'mean_word_length': 4.467741935483871, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6417731', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1261, 'n_words': 504}