<commit_before><?php
namespace Behat\RestApiExtension\Context\Initializer;

use Behat\Behat\Context\Context;
use Behat\Behat\Context\Initializer\ContextInitializer;
use GuzzleHttp\ClientInterface;

/**
 *
 */
class RestApiAwareInitializer implements ContextInitializer
{

    private $parameters;
    /**
     * Initializes initializer.
     *
     * @param array $parameters
     */
    public function __construct(array $parameters)
    {
        $this->parameters = $parameters;
    }
    /**
     * Initializes provided context.
     *
     * @param Context $context
     */
    public function initializeContext(Context $context)
    {
            $context->setParameters($this->parameters);
    }
}<commit_msg>check instance to avoid error when other extension are initialized.<commit_after><?php
namespace Behat\RestApiExtension\Context\Initializer;

use Behat\Behat\Context\Context;
use Behat\Behat\Context\Initializer\ContextInitializer;
use GuzzleHttp\ClientInterface;
use Behat\RestApiExtension\Context\RestApiContext;

/**
 *
 */
class RestApiAwareInitializer implements ContextInitializer
{

    private $parameters;
    /**
     * Initializes initializer.
     *
     * @param array $parameters
     */
    public function __construct(array $parameters)
    {
        $this->parameters = $parameters;
    }
    /**
     * Initializes provided context.
     *
     * @param Context $context
     */
    public function initializeContext(Context $context)
    {
            if ($context instanceof RestApiContext) {
                $context->setParameters($this->parameters);
            }
    }
}
{'fraction_non_alphanumeric': 0.1019266625233064, 'fraction_numerical': 0.0, 'mean_word_length': 2.946078431372549, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3102477', 'n_tokens_mistral': 438, 'n_tokens_neox': 433, 'n_words': 89}