<commit_before><?php

namespace Laradic\Generators\DocBlock\Definition;

use Reflector;
use Barryvdh\Reflection\DocBlock;

class ClassDefinition extends Definition
{
    /** @var \Laradic\Generators\DocBlock\Definition\DefinitionBuilder */
    protected $builder;

    /** @var \Laradic\Generators\DocBlock\Definition\DefinitionCollection */
    protected $collection;

    public function __construct(DefinitionBuilder $builder, Reflector $reflection, DocBlock $docBlock)
    {
        parent::__construct('class', $reflection, $docBlock);
        $this->builder    = $builder;
        $this->collection = new DefinitionCollection([ $this ]);
    }

    public function method($name)
    {
        $this->collection->push($definition = $this->builder->method($this, $name));
        return $definition;
    }

    public function property($name)
    {
        $this->collection->push($definition = $this->builder->property($this, $name));
        return $definition;
    }

    public function methods(array $methods)
    {
        foreach ($methods as $name => $params) {
            $this->method($name)->cleanAllTags()->ensureTag($params[ 0 ], $params[ 1 ]);
        }
        return $this;
    }

    public function properties(array $properties, $clean=false)
    {
        foreach ($properties as $name => $params) {
            if($clean){
                $this->property($name)->cleanAllTags();
            }
            $this->property($name)->ensureTag($params[ 0 ], $params[ 1 ]);
        }
        return $this;
    }

    public function getCollection()
    {
        return $this->collection;
    }

    public function collect()
    {
        return $this->getCollection();<commit_msg>menus upd<commit_after><?php

namespace Laradic\Generators\DocBlock\Definition;

use Reflector;
use Barryvdh\Reflection\DocBlock;

class ClassDefinition extends Definition
{
    /** @var \Laradic\Generators\DocBlock\Definition\DefinitionBuilder */
    protected $builder;

    /** @var \Laradic\Generators\DocBlock\Definition\DefinitionCollection */
    protected $collection;

    public function __construct(DefinitionBuilder $builder, Reflector $reflection, DocBlock $docBlock)
    {
        parent::__construct('class', $reflection, $docBlock);
        $this->builder    = $builder;
        $this->collection = new DefinitionCollection([ $this ]);
    }

    public function method($name)
    {
        $this->collection->push($definition = $this->builder->method($this, $name));
        return $definition;
    }

    public function property($name)
    {
        $this->collection->push($definition = $this->builder->property($this, $name));
        return $definition;
    }

    public function methods(array $methods, $clean = false)
    {
        foreach ($methods as $name => $params) {
            if($clean) {
                $this->method($name)->cleanAllTags();
            }
            $this->method($name)->ensureTag($params[ 0 ], $params[ 1 ]);
        }
        return $this;
    }

    public function properties(array $properties, $clean=false)
    {
        foreach ($properties as $name => $params) {
            if($clean){
                $this->property($name)->cleanAllTags();
            }
            $this->property($name)->ensureTag($params[ 0 ], $params[ 1 ]);
        }
        return $this;
    }

    public function getCollection()
    {
        return $this->collection;
    }

    public function collect()
    {
        return $this->getCollection();
{'fraction_non_alphanumeric': 0.14064737897450588, 'fraction_numerical': 0.0022916069894013177, 'mean_word_length': 2.6, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '5206499', 'n_tokens_mistral': 965, 'n_tokens_neox': 932, 'n_words': 194}