Branch Coverage

blib/lib/Perl/Critic/Policy/Catalyst/ProhibitUnreachableCode.pm
Criterion Covered Total %
branch 41 64 64.0


line true false branch
47 30 16 unless is_method_call($element)
50 0 16 unless $statement
56 4 12 unless _is_terminating_context_method($element, \@context_methods) or _is_terminating_controller_method($element, \@controller_methods)
61 0 12 if $child->isa('PPI::Token::Operator') and exists $OPERATORS{$child}
62 2 12 if $child->isa('PPI::Token::Word') and exists $CONDITIONALS{$child}
73 22 10 if $element ne $method
77 6 10 unless $found_method
80 0 10 unless $prev
81 0 10 if $prev ne '->'
82 0 10 unless $prev->isa('PPI::Token::Operator')
85 0 10 unless $prev
86 0 10 if $prev ne '$c'
87 0 10 unless $prev->isa('PPI::Token::Symbol')
97 0 3 if $element ne $method
101 3 3 unless $found_method
104 0 3 unless $prev
105 0 3 if $prev ne '->'
106 0 3 unless $prev->isa('PPI::Token::Operator')
109 0 3 unless $prev
110 0 3 if $prev ne '$self'
111 0 3 unless $prev->isa('PPI::Token::Symbol')
114 1 2 unless _find_package_name($element) =~ /::Controller::/
125 3 13 if ($element->isa('PPI::Statement::Package'))
128 0 3 if $element->ancestor_of($original)
132 3 0 unless $blocks
149 0 5 if @children and $children[0]->isa('PPI::Token::Label')
150 2 3 if $statement->isa('PPI::Statement::Sub')
151 0 3 if $statement->isa('PPI::Statement::End')
152 0 3 if $statement->isa('PPI::Statement::Data')
153 0 3 if $statement->isa('PPI::Statement::Package')
155 0 3 if $statement->isa('PPI::Statement::Include') and $statement->type ne 'require'
158 0 3 if $statement->isa('PPI::Statement::Variable') and $statement->type eq 'our'