protected function createDefinition(\ReflectionClass $reflection): Definition
    {
        $definition = new Definition($reflection->getName());

        foreach ($this->processors as $processor)
        {
            $processor->process($reflection, $definition);
        }

        $parent = $reflection->getParentClass();

        if ($parent !== false) {
            $definition->merge($this->createDefinition($parent));
        }

        foreach ($reflection->getTraits() as $trait)
        {
            $definition->merge($this->createDefinition($trait));
        }

        return $definition;
    }
protected function createDefinition(\ReflectionClass $reflection): Definition
    {
        $definition = new Definition($reflection->getName());

        foreach ($this->processors as $processor)
        {
            $processor->process($reflection, $definition);
        }

        $parent = $reflection->getParentClass();

        if ($parent !== false) {
            $definition->merge($this->createDefinition($parent));
        }

        foreach ($reflection->getTraits() as $trait)
        {
            $definition->merge($this->createDefinition($trait));
        }

        return $definition;
    }
protected function createDefinition ( \ ReflectionClass $ reflection ) : Definition { $ definition = new Definition ( $ reflection -> getName ( ) ) ; foreach ( $ this -> processors as $ processor ) { $ processor -> process ( $ reflection , $ definition ) ; } $ parent = $ reflection -> getParentClass ( ) ; if ( $ parent !== false ) { $ definition -> merge ( $ this -> createDefinition ( $ parent ) ) ; } foreach ( $ reflection -> getTraits ( ) as $ trait ) { $ definition -> merge ( $ this -> createDefinition ( $ trait ) ) ; } return $ definition ; }
Create definition for given class

@param  \ReflectionClass $reflection
@return Definition
Create definition for given class