<commit_before><?php
namespace Asgard\Entity;

/**
 * Collection of many elements.
 * @author <NAME> <<EMAIL>>
 */
class ManyCollection implements \ArrayAccess, \Iterator, \Countable {
	/**
	 * Elements.
	 * @var array
	 */
	protected $elements = [];
	/**
	 * Entity Definition.
	 * @var EntityDefinition
	 */
	protected $definition;
	/**
	 * Entity.
	 * @var Entity
	 */
	protected $entity;
	/**
	 * Name.
	 * @var string
	 */
	protected $name;

	/**
	 * Constructor.
	 * @param EntityDefinition $definition
	 * @param Entity           $entity
	 * @param string           $name
	 */
	public function __construct($definition, $entity, $name) {
		$this->definition = $definition;
		$this->entity = $entity;
		$this->name = $name;
	}

	/**
	 * Return number of elements.
	 * @return integer
	 */
	public function count() {
		return count($this->elements);
	}

	/**
	 * Return all elements.
	 * @return array
	 */<commit_msg>a bit of refactoring<commit_after><?php
namespace Asgard\Entity;

/**
 * Collection of many elements.
 * @author <NAME> <<EMAIL>>
 */
class ManyCollection implements \ArrayAccess, \Iterator, \Countable {
	/**
	 * Elements.
	 * @var array
	 */
	protected $elements = [];
	/**
	 * Entity Definition.
	 * @var EntityDefinition
	 */
	protected $definition;
	/**
	 * Entity.
	 * @var Entity
	 */
	protected $entity;
	/**
	 * Name.
	 * @var string
	 */
	protected $name;

	/**
	 * Constructor.
	 * @param EntityDefinition $definition
	 * @param Entity           $entity
	 * @param string           $name
	 */
	public function __construct($definition, $entity, $name) {
		$this->definition = $definition;
		$this->entity     = $entity;
		$this->name       = $name;
	}

	/**
	 * Return number of elements.
	 * @return integer
	 */
	public function count() {
		return count($this->elements);
	}

	/**
	 * Return all elements.
	 * @return array
	 */
{'fraction_non_alphanumeric': 0.1569048898441698, 'fraction_numerical': 0.0, 'mean_word_length': 2.6944444444444446, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '2311345', 'n_tokens_mistral': 618, 'n_tokens_neox': 555, 'n_words': 151}