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
124 0 8 7 $begin->isa("PPI::Token::Word") and $begin->content eq 'if' || $begin->content eq 'unless'
157 0 0 4 $begin->isa("PPI::Token::Word") and $begin->content eq "given"
183 0 3 3 $first_token = $stmnt->schild(0) and "default" eq $first_token->content
223 9 3 6 $second_token->isa("PPI::Token::Operator") and $second_token eq "->"
236 108 67 21 $elem->isa("PPI::Token::Word") and exists $CONDITIONALS{$elem}
271 1 1 1 $elem->isa("PPI::Token::Word") and "when" eq $elem->content

or 2 conditions

line l !l condition
207 34 0 $stmnt->schild(0) || (return)
219 31 0 $stmnt->schild(0) || (return)
222 18 1 $stmnt->schild(1) || (return)
225 6 0 $stmnt->schild(2) || (return)

or 3 conditions

line l !l&&r !l&&!r condition
68 1 32 21 $self->_block_is_empty($block) or $self->_block_has_return($block)
98 48 9 26 $self->_is_explicit_return($final) || $self->_is_given_when_return($final) || $self->_is_compound_return($final)
109 31 15 16 $self->_is_return_or_goto_stmnt($final) || $self->_is_terminal_stmnt($final)
124 11 3 1 $begin->content eq 'if' || $begin->content eq 'unless'
129 16 30 30 $_->isa('PPI::Structure::Condition') || $_->isa('PPI::Token')
162 4 4 4 $_->isa('PPI::Structure::Given') || $_->isa('PPI::Token')
208 31 1 2 $first_token->content eq 'return' || $first_token->content eq 'goto'
246 6 3 6 $_->isa('PPI::Token') || $_->isa('PPI::Structure::When')
271 1 0 0 $self->_is_return_or_goto_stmnt($stmnt) || $self->_is_terminal_stmnt($stmnt)