Jyxo\HtmlTag::isRequiredAttr PHP Method

isRequiredAttr() private method

Returns if the given attribute is mandatory.
private isRequiredAttr ( string $tag, string $attr ) : boolean
$tag string HTML tag name
$attr string Attribute name
return boolean
    private function isRequiredAttr(string $tag, string $attr) : bool
    {
        if (isset($this->requiredAttrs[$tag])) {
            if (is_array($this->requiredAttrs[$tag])) {
                return in_array($attr, $this->requiredAttrs[$tag]);
            }
            return $attr == $this->requiredAttrs[$tag];
        }
        return false;
    }