<commit_before><?php

namespace Peakium;

class ListObject extends PeakiumObject implements \IteratorAggregate, \Countable
{
	public function offsetGet($k)
	{
		switch(gettype($k)):
			case 'string':
				return parent::offsetGet($k);
			default:
				throw new ArgumentError(sprintf("You tried to access the %s index, but ListObject types only support String keys. (HINT: List calls return an object with a 'data' (which is the data array). You likely want to call \$object['data'][%s])", $k, $k));
		endswitch;
	}

	// So we can do foreach, etc
	public function getIterator()
	{
		return new \Iterator($this->data);
	}
<commit_msg>Fix bug of missing iterator class<commit_after><?php

namespace Peakium;

class ListObject extends PeakiumObject implements \IteratorAggregate, \Countable
{
	public function offsetGet($k)
	{
		switch(gettype($k)):
			case 'string':
				return parent::offsetGet($k);
			default:
				throw new ArgumentError(sprintf("You tried to access the %s index, but ListObject types only support String keys. (HINT: List calls return an object with a 'data' (which is the data array). You likely want to call \$object['data'][%s])", $k, $k));
		endswitch;
	}

	// So we can do foreach, etc
	public function getIterator()
	{
		return new \ArrayIterator($this->data);
	}

{'fraction_non_alphanumeric': 0.11965811965811966, 'fraction_numerical': 0.0, 'mean_word_length': 4.4576271186440675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '893248', 'n_tokens_mistral': 411, 'n_tokens_neox': 390, 'n_words': 145}