<commit_before><?php

namespace Dragooon\Hawk\Credentials;

class CallbackCredentialsProvider implements CredentialsProviderInterface
{
    private $callback;

    /**
     * @param $callback
     */
    public function __construct($callback)
    {
        $this->callback = $callback;
    }

    /**
     * {@inheritDoc}
     */
    public function loadCredentialsById($id)
    {
        $result = call_user_func($this->callback, $id);

        if (empty($result)) {
            throw new CredentialsNotFoundException($id);
        }

        return $result;
    }<commit_msg>Define $callback's type in CallbackCredentialsProvider<commit_after><?php

namespace Dragooon\Hawk\Credentials;

class CallbackCredentialsProvider implements CredentialsProviderInterface
{
    private $callback;

    /**
     * @param Callable $callback
     */
    public function __construct($callback)
    {
        $this->callback = $callback;
    }

    /**
     * {@inheritDoc}
     */
    public function loadCredentialsById($id)
    {
        $result = call_user_func($this->callback, $id);

        if (empty($result)) {
            throw new CredentialsNotFoundException($id);
        }

        return $result;
    }
{'fraction_non_alphanumeric': 0.11295681063122924, 'fraction_numerical': 0.0, 'mean_word_length': 2.56508875739645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7312953', 'n_tokens_mistral': 336, 'n_tokens_neox': 329, 'n_words': 65}