<commit_before><?php

namespace Trellis\CodeGen\Schema;

use Trellis\Common\Object;

class EntityTypeDefinition extends Object
{
    protected $name;

    protected $implementor;

    protected $entity_implementor;

    protected $description;

    protected $options;

    protected $attributes;

    public function __construct(array $state = [])
    {
        $this->attributes = new AttributeDefinitionList();
        $this->options = new OptionDefinitionList();

        parent::__construct($state);
    }

    public function getName()
    {
        return $this->name;
    }

    public function getImplementor()
    {
        return $this->implementor;
    }

    public function getEntityImplementor()
    {
        return $this->entity_implementor;
    }

    public function getDescription()
    {
        return $this->description;
    }
<commit_msg>making sure that type-defs are always correct initialized<commit_after><?php

namespace Trellis\CodeGen\Schema;

use Trellis\Common\Object;

class EntityTypeDefinition extends Object
{
    protected $name;

    protected $implementor;

    protected $entity_implementor;

    protected $description;

    protected $options;

    protected $attributes;

    public function __construct(array $state = [])
    {
        parent::__construct($state);

        if (empty($this->attributes)) {
            $this->attributes = new AttributeDefinitionList();
        }
        if (empty($this->options)) {
            $this->options = new OptionDefinitionList();
        }
    }

    public function getName()
    {
        return $this->name;
    }

    public function getImplementor()
    {
        return $this->implementor;
    }

    public function getEntityImplementor()
    {
        return $this->entity_implementor;
    }

    public function getDescription()
    {
        return $this->description;
    }

{'fraction_non_alphanumeric': 0.0998398291510945, 'fraction_numerical': 0.0, 'mean_word_length': 2.5969289827255277, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4928906', 'n_tokens_mistral': 513, 'n_tokens_neox': 504, 'n_words': 115}