<commit_before><?php
/**
 * Created by PhpStorm.
 * User: daedeloth
 * Date: 8/04/14
 * Time: 15:38
 */

namespace Neuron\Collections;

use ArrayAccess;
use Countable;
use Iterator;
use Neuron\Models\Observable;

abstract class Collection
	extends Observable
	implements Iterator, ArrayAccess, Countable
{
	private $position = 0;
	private $data = array ();

	protected function setCollectionValues (array $data)
	{
		$this->data = $data;
	}

	public function push ($value) {
		array_push ($this, $value);
	}

	public function pop () {
		array_pop ($this);
	}

	public function shift ($value) {
		array_shift ($this, $value);
	}<commit_msg>A few rudimentary array methods.<commit_after><?php
/**
 * Created by PhpStorm.
 * User: daedeloth
 * Date: 8/04/14
 * Time: 15:38
 */

namespace Neuron\Collections;

use ArrayAccess;
use Countable;
use Iterator;
use Neuron\Models\Observable;

abstract class Collection
	extends Observable
	implements Iterator, ArrayAccess, Countable
{
	private $position = 0;
	private $data = array ();

	protected function setCollectionValues (array $data)
	{
		$this->data = $data;
	}

	public function add ($value) {
		$this[] = $value;
	}
{'fraction_non_alphanumeric': 0.1234991423670669, 'fraction_numerical': 0.017152658662092625, 'mean_word_length': 4.233183856502242, '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': '4538603', 'n_tokens_mistral': 419, 'n_tokens_neox': 388, 'n_words': 113}