public void check(Environment env) {
            if (parent != null) {
                if (parent.isNotRuntime && !isInternal()) {
                    FatalException e = new FatalException(
                            Messages.ERR_CANNOT_USE_SYSTEM_CLASS.fetch(parent.getName(), getName()),
                            ClassEntity.this.trace
                    );
                    if (env != null)
                        env.error(e.getTraceInfo(), e.getType(), e.getMessage());
                    else
                        throw e;
                }

                if (parent.isFinal) {
                    FatalException e = new FatalException(
                            Messages.ERR_CLASS_MAY_NOT_INHERIT_FINAL_CLASS.fetch(ClassEntity.this.getName(), parent.getName()),
                            ClassEntity.this.trace
                    );
                    if (env != null)
                        env.error(e.getTraceInfo(), e.getType(), e.getMessage());
                    else
                        throw e;
                }
                if (ClassEntity.this.type == Type.CLASS && parent.type != Type.CLASS) {
                    FatalException e = new FatalException(
                            Messages.ERR_CANNOT_EXTENDS.fetch(ClassEntity.this.getName(), parent.getName()),
                            ClassEntity.this.trace
                    );
                    if (env != null)
                        env.error(e.getTraceInfo(), e.getType(), e.getMessage());
                    else
                        throw e;
                }
            }

            if (methods != null) {
                methods.check(env);
            }
        }
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