<commit_before><?php
namespace ajumamoro;

abstract class Ajuma
{
    private $attributes;
    private $id;
    protected $store;
    
    public function addAttribute($attribute)
    {
        $this->attributes[] = $attribute;
    }
    
    public function getAttribute($attribute)
    {
        return $this->attributes[$attribute];
    }
        
    public function setId($id)
    {
        $this->id = $id;
    }
    
    public function getId()
    {
        return $this->id;
    }
    
    <commit_msg>Added attributes as array access<commit_after><?php
namespace ajumamoro;

abstract class Ajuma implements \ArrayAccess
{
    private $attributes;
    private $id;
    protected $store;
    
    public function offsetGet($offset)
    {
        return $this->attributes[$offset];
    }

    public function offsetSet($offset,$value)
    {
        $this->attributes[$offset] = $value;
    }

    public function offsetExists($offset)
    {
        return isset($this->attributes[$offset]);
    }

    public function offsetUnset($offset)
    {
        unset($this->attributes[$offset]);
    } 
    
    public function addAttribute($key, $value)
    {
        $this->attributes[$key] = $value;
    }
    
    public function getAttribute($key)
    {
        return $this->attributes[$key];
    }
        
    public function setId($id)
    {
        $this->id = $id;
    }
    
    public function getId()
    {
        return $this->id;
    }
    
    
{'fraction_non_alphanumeric': 0.11909650924024641, 'fraction_numerical': 0.0, 'mean_word_length': 2.0714285714285716, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '6148423', 'n_tokens_mistral': 431, 'n_tokens_neox': 428, 'n_words': 90}