AMP_Tag_And_Attribute_Sanitizer D

Total Complexity 454
Dependencies 12
Dependents 7
Total lines 2,614
Lines of code 1,428
Logical lines of code 750
Comment lines 891
Methods 51
Properties 9

Methods 51

Method Rating Maintainability Complexity Lines of code
process_node()
D
16
58 281
is_valid_layout()
C
33 28 94
sanitize_disallowed_attribute_values_in_node()
C
38 30 60
validate_attr_spec_list_for_node()
B
41 22 58
validate_cdata_for_node()
B
42 21 46
check_attr_spec_rule_value_properties()
B
41 15 63
calculate_layout()
A
51 15 28
check_valid_children()
A
43 13 50
check_attr_spec_rule_disallowed_relative()
A
49 13 33
sanitize_element()
A
45 12 42
validate_tag_spec_for_node()
A
46 12 39
check_attr_spec_rule_allowed_protocol()
A
51 12 27
get_rule_spec_list_to_validate()
A
44 10 43
is_amp_allowed_attribute()
A
49 10 30
is_inside_mustache_template()
A
55 10 18
check_attr_spec_rule_value_casei()
A
51 9 28
get_required_script_components()
A
51 9 26
check_attr_spec_rule_valid_url()
A
52 9 24
check_matching_attribute_value()
A
55 9 21
check_attr_spec_rule_disallowed_value_regex()
A
53 8 24
check_attr_spec_rule_value()
A
55 8 21
get_ancestor_with_matching_spec_name()
A
53 8 21
__construct()
S
49 7 30
remove_node()
S
60 8 13
replace_node_with_children()
S
54 7 21
check_attr_spec_rule_mandatory()
S
58 7 16
remove_disallowed_descendants()
S
51 6 27
parse_tag_and_attributes_from_spec_name()
S
52 6 23
get_missing_mandatory_attributes()
S
57 6 15
has_parent()
S
60 6 12
check_attr_spec_rule_disallowed_empty()
S
59 5 15
calculate_height()
S
58 5 15
calculate_width()
S
59 5 15
get_spec_name()
S
60 4 13
get_json_error_code()
S
60 3 15
process_alternate_names()
S
64 4 10
check_attr_spec_rule_value_regex()
S
63 4 10
check_attr_spec_rule_value_regex_casei()
S
63 4 10
extract_attribute_urls()
S
61 3 13
parse_properties_attribute()
S
62 3 11
get_element_attribute_intersection()
S
66 3 9
has_layout_attribute_with_mustache_variable()
S
66 3 8
supports_layout()
S
64 3 9
has_ancestor()
S
71 2 6
sanitize()
S
71 2 6
parse_protocol()
S
70 2 6
serialize_properties_attribute()
S
64 1 11
is_amp_allowed_tag()
S
79 1 3
is_missing_mandatory_attribute()
S
78 1 3
normalize_url_from_attribute_value()
S
78 1 3
get_scripts()
S
79 1 3