<commit_before><?php
declare(strict_types=1);
namespace Viserio\Component\View\Proxy;

use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Viserio\Component\StaticalProxy\StaticalProxy;
use Viserio\Component\View\ViewFactory;

class View extends StaticalProxy
{
    /**
     * {@inheritdoc}
     *
     * @codeCoverageIgnore
     */
    public static function getInstanceIdentifier()
    {
        return ViewFactory::class;
    }

    public static function createResponseView(string $template, array $args = [])
    {
        $response = self::$container->get(ResponseFactoryInterface::class)->createResponse();

        $stream = self::$container->get(StreamFactoryInterface::class)->createStream();
        $stream->write((string) self::$container->get(ViewFactory::class)->create($template, $args));

        return $response->withBody($stream);
    }
}
<commit_msg>[Exception] refactoring (#628)<commit_after><?php
declare(strict_types=1);
namespace Viserio\Component\View\Proxy;

use Interop\Http\Factory\ResponseFactoryInterface;
use Interop\Http\Factory\StreamFactoryInterface;
use Viserio\Component\StaticalProxy\StaticalProxy;
use Viserio\Component\View\ViewFactory;

class View extends StaticalProxy
{
    /**
     * {@inheritdoc}
     *
     * @codeCoverageIgnore
     */
    public static function getInstanceIdentifier()
    {
        return ViewFactory::class;
    }

    public static function createResponseView(string $template, array $args = [])
    {
        $response = self::$container->get(ResponseFactoryInterface::class)->createResponse();
        $response = $response->withAddedHeader('Content-Type', 'text/html');

        $stream = self::$container->get(StreamFactoryInterface::class)->createStream();
        $stream->write((string) self::$container->get(ViewFactory::class)->create($template, $args));

        return $response->withBody($stream);
    }
}

{'fraction_non_alphanumeric': 0.13711340206185568, 'fraction_numerical': 0.002577319587628866, 'mean_word_length': 4.332417582417582, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 20, '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': '3570919', 'n_tokens_mistral': 541, 'n_tokens_neox': 533, 'n_words': 85}