protected static function createUndefinedMemberException(
        $className,
        $property,
        $value,
        NativeException $cause = null
    ) {
        if ('key' === $property) {
            $property = 'name';
        }

        return new Exception\UndefinedClassConstantException(
            $className,
            $property,
            $value,
            $cause
        );
    }