public void setTrait(ClassEntity trait) {
        this.trait = trait;
    }
0 - success
1 - invalid protected
2 - invalid private
@param env
@return
jphp-runtime/src/php/runtime/reflection/MethodEntity.java