def METHOD_NAME(self, cfn):
    matches = []
    for paramname, paramvalue in cfn.get_parameters().items():
        if isinstance(paramvalue, dict):
            for propname, propvalue in paramvalue.items():
                if propname not in self.valid_keys:
                    message = "Parameter {0} has invalid property {1}"
                    matches.append(
                        RuleMatch(
                            ["Parameters", paramname, propname],
                            message.format(paramname, propname),
                        )
                    )
                else:
                    props = self.valid_keys.get(propname)
                    prop_path = ["Parameters", paramname, propname]
                    matches.extend(self.check_type(propvalue, prop_path, props))
                    # Check that the property is needed for the current type
                    valid_for = props.get("ValidForTypes")
                    if valid_for is not None:
                        if paramvalue.get("Type") not in valid_for:
                            message = "Parameter {0} has property {1} which is only valid for {2}"
                            matches.append(
                                RuleMatch(
                                    ["Parameters", paramname, propname],
                                    message.format(paramname, propname, valid_for),
                                )
                            )
            for reqname in self.required_keys:
                if reqname not in paramvalue.keys():
                    message = "Parameter {0} is missing required property {1}"
                    matches.append(
                        RuleMatch(
                            ["Parameters", paramname],
                            message.format(paramname, reqname),
                        )
                    )
        else:
            message = "Parameter {0} is not an object"
            matches.append(
                RuleMatch(
                    ["Parameters", paramname], message.format(paramname, reqname)
                )
            )
    return matches