Condition Coverage

blib/lib/Perl/Critic/Policy/Subroutines/RequireFinalReturn.pm
Criterion Covered Total %
condition 44 53 83.0


and 3 conditions

line !l l&&!r l&&r condition
123 0 8 7 $begin->isa("PPI::Token::Word") and $begin->content eq 'if' || $begin->content eq 'unless'
156 0 0 4 $begin->isa("PPI::Token::Word") and $begin->content eq "given"
182 0 3 3 $first_token = $stmnt->schild(0) and "default" eq $first_token->content
222 9 3 6 $second_token->isa("PPI::Token::Operator") and $second_token eq "->"
235 108 67 21 $elem->isa("PPI::Token::Word") and exists $CONDITIONALS{$elem}
270 1 1 1 $elem->isa("PPI::Token::Word") and "when" eq $elem->content

or 2 conditions

line l !l condition
206 34 0 $stmnt->schild(0) || (return)
218 31 0 $stmnt->schild(0) || (return)
221 18 1 $stmnt->schild(1) || (return)
224 6 0 $stmnt->schild(2) || (return)

or 3 conditions

line l !l&&r !l&&!r condition
67 1 32 21 $self->_block_is_empty($block) or $self->_block_has_return($block)
97 48 9 26 $self->_is_explicit_return($final) || $self->_is_given_when_return($final) || $self->_is_compound_return($final)
108 31 15 16 $self->_is_return_or_goto_stmnt($final) || $self->_is_terminal_stmnt($final)
123 11 3 1 $begin->content eq 'if' || $begin->content eq 'unless'
128 16 30 30 $_->isa('PPI::Structure::Condition') || $_->isa('PPI::Token')
161 4 4 4 $_->isa('PPI::Structure::Given') || $_->isa('PPI::Token')
207 31 1 2 $first_token->content eq 'return' || $first_token->content eq 'goto'
245 6 3 6 $_->isa('PPI::Token') || $_->isa('PPI::Structure::When')
270 1 0 0 $self->_is_return_or_goto_stmnt($stmnt) || $self->_is_terminal_stmnt($stmnt)