public function resolveConflictAlias($trait, $method, $alias)
    {
        $fullClass = $this->classFile->getFullClassName($trait);
        if (method_exists($fullClass, $method) === false) {
            throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method);
        }

        $this->conflicts[] = "{$trait}::{$method} as {$alias};";

        if ($trait !== $this->name && in_array($trait, $this->secondNames) === false) {
            if ($this->classFile->isTraitDefined($trait) === false) {
                throw \Aviogram\Common\PHPClass\Exception\ClassTrait::traitNotFound($trait);
            }

            $this->secondNames[] = $trait;
        }

        return $this;
    }
public function resolveConflictAlias($trait, $method, $alias)
    {
        $fullClass = $this->classFile->getFullClassName($trait);
        if (method_exists($fullClass, $method) === false) {
            throw \Aviogram\Common\PHPClass\Exception\ClassTrait::undefinedMethod($trait, $method);
        }

        $this->conflicts[] = "{$trait}::{$method} as {$alias};";

        if ($trait !== $this->name && in_array($trait, $this->secondNames) === false) {
            if ($this->classFile->isTraitDefined($trait) === false) {
                throw \Aviogram\Common\PHPClass\Exception\ClassTrait::traitNotFound($trait);
            }

            $this->secondNames[] = $trait;
        }

        return $this;
    }
public function resolveConflictAlias ( $ trait , $ method , $ alias ) { $ fullClass = $ this -> classFile -> getFullClassName ( $ trait ) ; if ( method_exists ( $ fullClass , $ method ) === false ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: undefinedMethod ( $ trait , $ method ) ; } $ this -> conflicts [ ] = "{$trait}::{$method} as {$alias};" ; if ( $ trait !== $ this -> name && in_array ( $ trait , $ this -> secondNames ) === false ) { if ( $ this -> classFile -> isTraitDefined ( $ trait ) === false ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: traitNotFound ( $ trait ) ; } $ this -> secondNames [ ] = $ trait ; } return $ this ; }
Resolve method name conflict with aliasing the method name

@param string $trait  The trait that causing the conflict
@param string $method The method of the trait that causing the conflict
@param string $alias  The alias for the method

@return $this
@throws \Aviogram\Common\PHPClass\Exception\ClassTrait   When the trait does not exists
@throws \Aviogram\Common\PHPClass\Exception\ClassTrait   When the method is not defined on the trait
Resolve method name conflict with aliasing the method name