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

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

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

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

        $this->conflicts[] = "{$trait}::{$method} insteadOf {$insteadOfTrait};";

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

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

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

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

        $this->conflicts[] = "{$trait}::{$method} insteadOf {$insteadOfTrait};";

        return $this;
    }
public function resolveConflictInsteadOf ( $ trait , $ method , $ insteadOfTrait ) { $ fullClass = $ this -> classFile -> getFullClassName ( $ trait ) ; if ( method_exists ( $ fullClass , $ method ) === false ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: undefinedMethod ( $ trait , $ method ) ; } if ( $ trait !== $ this -> name && $ insteadOfTrait !== $ this -> name ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: knownTraitNotUsedByResolveInsteadOf ( $ this -> name ) ; } else if ( $ trait !== $ this -> name && in_array ( $ trait , $ this -> secondNames ) === false ) { if ( $ this -> classFile -> isClassDefined ( $ trait ) === false ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: traitNotFound ( $ trait ) ; } $ this -> secondNames [ ] = $ trait ; } else if ( $ insteadOfTrait !== $ this -> name && in_array ( $ insteadOfTrait , $ this -> secondNames ) === false ) { if ( $ this -> classFile -> isClassDefined ( $ insteadOfTrait ) === false ) { throw \ Aviogram \ Common \ PHPClass \ Exception \ ClassTrait :: traitNotFound ( $ insteadOfTrait ) ; } $ this -> secondNames [ ] = $ insteadOfTrait ; } $ this -> conflicts [ ] = "{$trait}::{$method} insteadOf {$insteadOfTrait};" ; return $ this ; }
Resolve method name conflict with ignoring one trait over the other

@param string $trait          The trait that will be used
@param string $method         The method of the trait which causes the conflict
@param string $insteadOfTrait The trait which will be ignored

@return $this
@throws \Aviogram\Common\PHPClass\Exception\ClassTrait   When the base trait is not used
@throws \Aviogram\Common\PHPClass\Exception\ClassTrait   When the method does not exists
Resolve method name conflict with ignoring one trait over the other