<commit_before><?php

namespace ByJG\Util;

use ByJG\Util\Psr7\Response;
use MintWare\Streams\MemoryStream;
use Psr\Http\Message\RequestInterface;

class MockClient extends HttpClient
{
    /**
     * @var Response
     */
    protected $expectedResponse;


    /**
     * MockClient constructor.
     * @param Response $expectedResponse
     */
    public function __construct(Response $expectedResponse = null)
    {
        if (is_null($expectedResponse)) {
            $expectedResponse = (new Response(200))
                                    ->withBody(new MemoryStream('{"key":"value"}'));
        }
        $this->expectedResponse = $expectedResponse;
    }

    /**
     * @return MockClient
     */
    public static function getInstance()
    {
        return new MockClient(new Response(200));
    }<commit_msg>Fix PHPDoc<commit_after><?php

namespace ByJG\Util;

use ByJG\Util\Psr7\Response;
use MintWare\Streams\MemoryStream;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\RequestInterface;

class MockClient extends HttpClient
{
    /**
     * @var Response
     */
    protected $expectedResponse;


    /**
     * MockClient constructor.
     * @param Response|MessageInterface $expectedResponse
     */
    public function __construct(Response $expectedResponse = null)
    {
        if (is_null($expectedResponse)) {
            $expectedResponse = (new Response(200))
                                    ->withBody(new MemoryStream('{"key":"value"}'));
        }
        $this->expectedResponse = $expectedResponse;
    }

    /**
     * @return MockClient
     */
    public static function getInstance()
    {
        return new MockClient(new Response(200));
    }
{'fraction_non_alphanumeric': 0.1146384479717813, 'fraction_numerical': 0.00823045267489712, 'mean_word_length': 2.4383838383838383, 'pattern_counts': {'":': 2, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7442890', 'n_tokens_mistral': 485, 'n_tokens_neox': 465, 'n_words': 95}