Branch Coverage

blib/lib/Perl/Critic/Policy/Community/WhileDiamondDefaultAssignment.pm
Criterion Covered Total %
branch 17 22 77.2


line true false branch
27 54 56 unless $elem eq "while" or $elem eq "for"
32 8 48 if ($elem eq 'for') { }
48 0 elsif ($elem eq 'while') { }
33 0 8 unless $next->isa("PPI::Structure::For")
35 0 8 unless @statements >= 2
37 4 4 if $middle->schildren and $middle->schild(0)->isa("PPI::Token::QuoteLike::Readline")
41 24 24 if ($next->isa("PPI::Structure::Condition"))
43 0 24 unless defined $next and $next->isa("PPI::Statement")
45 0 24 unless defined $next
48 8 40 if $next->isa("PPI::Token::QuoteLike::Readline")
49 20 10 if ($next->isa("PPI::Token::Word") and exists $bad_functions{$next} and is_function_call($next))