Branch Coverage

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


line true false branch
60 117 17 unless exists $OPERATOR_TYPES{$elem_text}
62 0 17 unless my $leading_operator = $self->_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}
81 17 0 if !defined($leading_operator_compatibility) || $leading_operator_compatibility->[$operator_type] and !defined($next_compatibility) || $next_compatibility->[$operator_type]
90 0 0 if $operator_type and defined $leading_operator_compatibility and not $leading_operator_compatibility->[$operator_type] and $self->_have_stringy_x($leading_operator)
95 0 0 if $self->_is_special_string_number_addion($elem_text, $leading_operator, $next_elem)
105 0 51 if $self->_is_file_operator($elem)
109 51 72 if $elem->isa($class)
120 0 0 unless $elem
122 0 0 unless my $prev_oper = $elem->sprevious_sibling
124 0 0 unless $prev_oper->isa("PPI::Token::Operator")
125 0 0 if "x" ne $prev_oper->content
135 0 17 unless my $previous_element = $elem->sprevious_sibling
137 17 0 if ($self->_get_token_compatibility($previous_element))
139 0 17 if ($previous_sibling and $self->_is_file_operator($previous_sibling))
154 0 66 unless $elem
155 66 0 unless $elem->isa("PPI::Token::Operator")
166 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
169 0 0 if not $check_recursive and $self->_is_special_string_number_addion($elem_operator, $element_2, $element_1, 1)