Branch Coverage

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


line true false branch
60 255 170 unless exists $OPERATOR_TYPES{$elem_text}
62 0 170 unless my $leading_operator = $self->_get_potential_leading_operator($elem)
65 0 170 unless my $next_elem = $elem->snext_sibling
67 2 168 if ($next_elem->isa("PPI::Token::Operator"))
72 2 168 unless exists $OPERATOR_TYPES{$elem_text}
81 92 31 if !defined($leading_operator_compatibility) || $leading_operator_compatibility->[$operator_type] and !defined($next_compatibility) || $next_compatibility->[$operator_type]
90 4 40 if $operator_type and defined $leading_operator_compatibility and not $leading_operator_compatibility->[$operator_type] and $self->_have_stringy_x($leading_operator)
95 6 66 if $self->_is_special_string_number_addion($elem_text, $leading_operator, $next_elem)
105 46 460 if $self->_is_file_operator($elem)
109 458 488 if $elem->isa($class)
120 0 29 unless $elem
122 25 4 unless my $prev_oper = $elem->sprevious_sibling
124 0 4 unless $prev_oper->isa("PPI::Token::Operator")
125 0 4 if "x" ne $prev_oper->content
135 0 170 unless my $previous_element = $elem->sprevious_sibling
137 169 1 if ($self->_get_token_compatibility($previous_element))
139 48 121 if ($previous_sibling and $self->_is_file_operator($previous_sibling))
154 0 645 unless $elem
155 475 170 unless $elem->isa("PPI::Token::Operator")
166 6 2 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
169 2 132 if not $check_recursive and $self->_is_special_string_number_addion($elem_operator, $element_2, $element_1, 1)