<commit_before><?php
namespace WFV\Builder;
defined( 'ABSPATH' ) or die();

use WFV\Contract\BuilderInterface;

/**
 *
 *
 * @since 0.10.0
 *
 */
class Director {

	/**
	 *
	 *
	 * @since 0.10.0
	 * @access private
	 * @var array
	 */
	private $config = array();

	/**
	 *
	 *
	 * @since 0.10.0
	 * @access private
	 * @var array
	 */
	private $components = array();

	/**
	 * Give an attribute
	 *
	 * @since 0.10.0
	 *
	 * @param string $type
	 * @param string $attribute
	 * @return WFV\Builder\Director
	 */
	public function attribute( $type, $attribute ) {
		$this->config[ $type ] = $attribute;
		return $this;
	}

	/**
	 *
	 *
	 * @since 0.10.0
	 *
	 * @param BuilderInterface $builder
	 * @return class
	 */
	public function invoke( BuilderInterface $builder ) {
		$this->integrate( $this->components, $builder );

		return $builder
			->create( $this->config['action'] )
			->deliver();
	}

	/**
	 *
	 *
	 * @since 0.10.0
	 *
	 * @param string $type
	 * @param string $attribute
	 * @return
	 */
	public function give_attribute( $type, $attribute ) {
		$this->config[ $type ] = $attribute ;
		return $this;
	}

	/**
	 *
	 *
	 * @since 0.10.0
	 *
	 * @param string $entity
	 * @param string|array $attributes
	 * @return
	 */
	public function with_entity( $entity, $attributes ) {
		$this->config['component'][$entity] = $attributes;
		return $this;
	}
}<commit_msg>Director - fluent install method to add components<commit_after><?php
namespace WFV\Builder;
defined( 'ABSPATH' ) or die();

use WFV\Contract\BuilderInterface;

/**
 *
 *
 * @since 0.10.0
 *
 */
class Director {

	/**
	 *
	 *
	 * @since 0.10.0
	 * @access private
	 * @var array
	 */
	private $config = array();

	/**
	 *
	 *
	 * @since 0.10.0
	 * @access private
	 * @var array
	 */
	private $components = array();

	/**
	 * Give an attribute
	 *
	 * @since 0.10.0
	 *
	 * @param string $type
	 * @param string $attribute
	 * @return WFV\Builder\Director
	 */
	public function attribute( $type, $attribute ) {
		$this->config[ $type ] = $attribute;
		return $this;
	}

	/**
	 *
	 *
	 * @since 0.10.0
	 *
	 * @param BuilderInterface $builder
	 * @return class
	 */
	public function invoke( BuilderInterface $builder ) {
		$this->integrate( $this->components, $builder );

		return $builder
			->create( $this->config['action'] )
			->deliver();
	}

	/**
	 * Push component arguments into $this->components
	 *
	 * @since 0.10.0
	 *
	 * @param string $entity
	 * @param string|array $attributes
	 * @return WFV\Builder\Director
	 */
	public function install( $entity, $attributes ) {
		$this->components[ $entity ] = $attributes;
		return $this;
	}

	/**
	 *
	 *
	 * @since 0.10.0
	 *
	 * @param string $entity
	 * @param string|array $attributes
	 * @return
	 */
	public function with_entity( $entity, $attributes ) {
		$this->config['component'][$entity] = $attributes;
		return $this;
	}
}
{'fraction_non_alphanumeric': 0.17137870855148343, 'fraction_numerical': 0.01954624781849913, 'mean_word_length': 2.7960264900662253, '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': '2193818', 'n_tokens_mistral': 1115, 'n_tokens_neox': 951, 'n_words': 234}