<commit_before><?php
namespace Behapi\Context;

use stdClass;

use Behapi\Extension\Context\ApiTrait;
use Behapi\Extension\Context\ApiInterface;

use Behapi\Extension\Tools\LastHistory;

use Webmozart\Assert\Assert;

class Json extends AbstractJson implements ApiInterface
{
    use ApiTrait;

    public function __construct(LastHistory $history)
    {
        $this->history = $history;
    }

    /** {@inheritDoc} */
    protected function getJson(): stdClass
    {
        return json_decode((string) $this->getResponse()->getBody());
    }

    public function responseIsValidjson()
    {
        Assert::same($this->getResponse()->getHeaderLine('Content-Type'), 'application/json', 'The response should have a valid content-type (expected %2$s, got %1$s)');

        parent::responseIsValidjson();
    }
}
<commit_msg>add missing call to the parent's constructor<commit_after><?php
namespace Behapi\Context;

use stdClass;

use Behapi\Extension\Context\ApiTrait;
use Behapi\Extension\Context\ApiInterface;

use Behapi\Extension\Tools\LastHistory;

use Webmozart\Assert\Assert;

class Json extends AbstractJson implements ApiInterface
{
    use ApiTrait;

    public function __construct(LastHistory $history)
    {
        parent::__construct();
        $this->history = $history;
    }

    /** {@inheritDoc} */
    protected function getJson(): stdClass
    {
        return json_decode((string) $this->getResponse()->getBody());
    }

    public function responseIsValidjson()
    {
        Assert::same($this->getResponse()->getHeaderLine('Content-Type'), 'application/json', 'The response should have a valid content-type (expected %2$s, got %1$s)');

        parent::responseIsValidjson();
    }
}

{'fraction_non_alphanumeric': 0.1261682242990654, 'fraction_numerical': 0.002336448598130841, 'mean_word_length': 3.811797752808989, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1960990', 'n_tokens_mistral': 502, 'n_tokens_neox': 492, 'n_words': 111}