Branch Coverage

blib/lib/Perl/Critic/Policy/ValuesAndExpressions/ProhibitMismatchedOperators.pm
Criterion Covered Total %
branch 15 42 35.7


line true false branch
60 118 17 unless exists $OPERATOR_TYPES{$elem_text}
62 0 17 unless my $leading_operator = _get_potential_leading_operator($elem)
65 0 17 unless my $next_elem = $elem->snext_sibling
67 0 17 if ($next_elem->isa("PPI::Token::Operator"))
72 0 17 unless exists $OPERATOR_TYPES{$elem_text}
80 17 0 if !defined($leading_operator_compatibility) || $leading_operator_compatibility->[$operator_type] and !defined($next_compatibility) || $next_compatibility->[$operator_type]
89 0 0 if $operator_type and defined $leading_operator_compatibility and not $leading_operator_compatibility->[$operator_type] and _have_stringy_x($leading_operator)
94 0 0 if $self->_is_special_string_number_addion($elem_text, $leading_operator, $next_elem)
104 0 51 if _is_file_operator($elem)
108 51 66 if $elem->isa($class)
119 0 0 unless $elem
121 0 0 unless my $prev_oper = $elem->sprevious_sibling
123 0 0 unless $prev_oper->isa("PPI::Token::Operator")
124 0 0 if "x" ne $prev_oper->content
134 0 17 unless my $previous_element = $elem->sprevious_sibling
136 17 0 if (_get_token_compatibility($previous_element))
138 0 17 if ($previous_sibling and _is_file_operator($previous_sibling))
153 0 66 unless $elem
154 66 0 unless $elem->isa("PPI::Token::Operator")
165 0 0 if $elem_operator and $elem_operator eq $TOKEN_COMPATIBILITY_SPECIAL_STRING_OPERATOR and $SPECIAL_STRING_VALUES{lc($element_1->content // 0)} and $element_2->isa("PPI::Token::Number") and $element_2->content == 0
168 0 0 if not $check_recursive and $self->_is_special_string_number_addion($elem_operator, $element_2, $element_1, 1)