<commit_before><?php

namespace JPB\WpBehatExtension\ServiceContainer;

use Behat\Behat\Context\ServiceContainer\ContextExtension;
use Behat\Testwork\ServiceContainer\Extension;
use Behat\Testwork\ServiceContainer\ExtensionManager;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

class WpBehatExtension
	implements Extension {

	/**
	 * {@inheritDoc}
	 */
	public function process( ContainerBuilder $container ) {
		// TODO: Implement process() method.
	}

	/**
	 * {@inheritDoc}
	 */
	public function getConfigKey() {
		return 'wp';
	}

	/**
	 * {@inheritDoc}
	 */
	public function initialize( ExtensionManager $extensionManager ) {
		// TODO: Implement initialize() method.
	}

	/**
	 * {@inheritDoc}
	 */
	public function configure( ArrayNodeDefinition $builder ) {
		$builder
			->addDefaultsIfNotSet()
			->children()
				->scalarNode( 'path' )
					->defaultValue( __DIR__ . 'vendor' )
				->end()
			->end();
	}

	/**
	 * {@inheritdoc}
	 */
	public function load(ContainerBuilder $container, array $config)
	{
		$this->loadContextInitializer($container);
		$container->setParameter('wp.parameters', $config);
	}

	/**
	 * Register a Context Initializer service for the behat
	 *
	 * @param ContainerBuilder $container the service will check for JPB\WpBehat\Context\WpContext contexts
	 */
	private function loadContextInitializer(ContainerBuilder $container)
	{
		$definition = new Definition('JPB\WpBehat\Context\Initializer\WpContextInitializer', array(
			'%wp.parameters%',
			'%mink.parameters%',
			'%paths.base%',
		));
		$definition->addTag(ContextExtension::INITIALIZER_TAG, array('priority' => 0));
		$container->setDefinition('behat.wp.service.wp_context_initializer', $definition);
	}

}<commit_msg>Fix namespace of context initializer<commit_after><?php

namespace JPB\WpBehatExtension\ServiceContainer;

use Behat\Behat\Context\ServiceContainer\ContextExtension;
use Behat\Testwork\ServiceContainer\Extension;
use Behat\Testwork\ServiceContainer\ExtensionManager;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

class WpBehatExtension
	implements Extension {

	/**
	 * {@inheritDoc}
	 */
	public function process( ContainerBuilder $container ) {
		// TODO: Implement process() method.
	}

	/**
	 * {@inheritDoc}
	 */
	public function getConfigKey() {
		return 'wp';
	}

	/**
	 * {@inheritDoc}
	 */
	public function initialize( ExtensionManager $extensionManager ) {
		// TODO: Implement initialize() method.
	}

	/**
	 * {@inheritDoc}
	 */
	public function configure( ArrayNodeDefinition $builder ) {
		$builder
			->addDefaultsIfNotSet()
			->children()
				->scalarNode( 'path' )
					->defaultValue( __DIR__ . 'vendor' )
				->end()
			->end();
	}

	/**
	 * {@inheritdoc}
	 */
	public function load(ContainerBuilder $container, array $config)
	{
		$this->loadContextInitializer($container);
		$container->setParameter('wp.parameters', $config);
	}

	/**
	 * Register a Context Initializer service for the behat
	 *
	 * @param ContainerBuilder $container the service will check for JPB\WpBehat\Context\WpContext contexts
	 */
	private function loadContextInitializer(ContainerBuilder $container)
	{
		$definition = new Definition('JPB\WpBehatExtension\Context\Initializer\WpContextInitializer', array(
			'%wp.parameters%',
			'%mink.parameters%',
			'%paths.base%',
		));
		$definition->addTag(ContextExtension::INITIALIZER_TAG, array('priority' => 0));
		$container->setDefinition('behat.wp.service.wp_context_initializer', $definition);
	}

}
{'fraction_non_alphanumeric': 0.13368983957219252, 'fraction_numerical': 0.0005347593582887701, 'mean_word_length': 4.71145038167939, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '5438849', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1101, 'n_words': 214}