<commit_before><?php

declare(strict_types=1);

/*
 * This file is part of the Sonata Project package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\AdminBundle\Model;

/**
 * @author <NAME> <<EMAIL>>
 *
 * @phpstan-template T of object
 */
interface AuditReaderInterface
{
    /**
     * @param int|string $id
     * @param int|string $revisionId
     *
     * @phpstan-param class-string<T> $className
     * @phpstan-return T|null
     */
    public function find(string $className, $id, $revisionId): ?object;

    /**
     * @return Revision[]
     *
     * @phpstan-param class-string<T> $className
     */
    public function findRevisionHistory(string $className, int $limit = 20, int $offset = 0): array;<commit_msg>Allow a null limit for findRevisionHistory<commit_after><?php

declare(strict_types=1);

/*
 * This file is part of the Sonata Project package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\AdminBundle\Model;

/**
 * @author <NAME> <<EMAIL>>
 *
 * @phpstan-template T of object
 */
interface AuditReaderInterface
{
    /**
     * @param int|string $id
     * @param int|string $revisionId
     *
     * @phpstan-param class-string<T> $className
     * @phpstan-return T|null
     */
    public function find(string $className, $id, $revisionId): ?object;

    /**
     * NEXT_MAJOR: Change the default limit value to `null` and change the native type to `?int`.
     *
     * @return Revision[]
     *
     * @phpstan-param class-string<T> $className
     */
    public function findRevisionHistory(string $className, int $limit = 20, int $offset = 0): array;
{'fraction_non_alphanumeric': 0.1281081081081081, 'fraction_numerical': 0.004324324324324324, 'mean_word_length': 3.168918918918919, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 19, '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': '5376568', 'n_tokens_mistral': 579, 'n_tokens_neox': 566, 'n_words': 175}