public void initEnvironment(Environment env) {
        if (isClass() && nativeInitEnvironment != null) {
            try {
                Method nativeInitEnvironment = this.nativeInitEnvironment;
                this.nativeInitEnvironment = null;

                nativeInitEnvironment.invoke(null, env);

                this.nativeInitEnvironment = nativeInitEnvironment;
            } catch (InvocationTargetException e) {
                env.__throwException(e);
            } catch (IllegalAccessException e) {
                throw new CriticalException(e);
            }
        }

        if (!traits.isEmpty()) {
            Set<ClassEntity> used = new HashSet<ClassEntity>();
            try {
                for (ClassEntity trait : traits.values()) {
                    trait.initTraitEnvironment(env, this, used);
                }
            } catch (Exception e) {
                env.catchUncaught(e);
            } catch (Throwable e) {
                throw new CriticalException(e);
            }
        }
    }
return empty list if success else list with not valid implemented methods in class

@param _interface
@return
jphp-runtime/src/php/runtime/reflection/ClassEntity.java