Branch Coverage

blib/lib/Sport/Analytics/NHL/Report/GS.pm
Criterion Covered Total %
branch 106 256 41.4


line true false branch
154 20 0 $is_new ? :
155 20 0 $is_goal =~ /\d/ ? :
156 0 20 $event->{'type'} eq 'MISS' ? :
157 20 0 $is_new ? :
158 0 20 unless $is_special or $event->{'period'} =~ /\w/
159 20 0 $is_new ? :
160 20 0 $is_new ? :
161 20 0 $is_new ? :
162 20 0 if ($event->{'type'} eq 'GOAL')
163 20 0 $is_new ? :
164 20 0 $is_new ? :
166 0 20 if ($is_special)
171 20 0 $is_new ? :
172 0 20 if ($event->{'period'} eq 'OT') { }
0 20 elsif ($event->{'period'} eq 'SO' or $event->{'period'} eq 'F') { }
182 0 20 if ($event->{'assist1'} and $event->{'assist1'} =~ /unsuccessful/i)
186 0 20 if (ref $event->{'assist2'})
190 0 20 if ($event->{'type'} eq 'MISS')
195 0 20 if ($event->{'strength'} =~ /(.*)-EN/) { }
0 20 elsif ($event->{'strength'} =~ /(.*)-\s*PS/ or $event->{'type'} eq 'MISS') { }
200 0 0 if $1
210 20 0 if ($is_new) { }
225 0 20 if ref $event->{'on_ice'}[0][0]
239 0 0 if ($key eq 'on_ice') { }
249 0 0 if ($key =~ /^assist/ and not $event->{$key})
265 4 0 $is_new ? :
267 4 20 unless $row and ref $row
270 20 0 if $event
284 0 64 if $event->{'period'} eq 'OT'
285 0 64 if $event->{'period'} eq 'SO'
287 0 64 unless $event->{'time'} =~ /:/
292 0 64 if $event->{'penalty'} =~ /conduct/
293 4 60 if $event->{'penalty'} =~ /\-\s+bench/
294 0 64 if $event->{'penalty'} =~ /\bcoach\b/i
295 4 60 if $event->{'name'} and $event->{'name'} =~ /\bteam\b/i
310 0 0 unless $event->{'period'}
311 0 0 unless $event->{'period'} =~ /\w/
312 0 0 if $event->{'period'} eq 'OT'
319 0 0 if $event->{'penalty'} =~ /conduct/i
320 0 0 if $event->{'penalty'} =~ /\-\s+bench/i
321 0 0 if $event->{'penalty'} =~ /\-\s+coach/i
332 4 0 $is_new ? :
336 4 0 if ($is_new)
337 0 4 unless (ref $penalty_tables[0])
344 0 8 unless defined $penalty_table
347 8 64 unless $row and ref $row
349 64 0 if ($is_new) { }
352 64 0 if $event and $event->{'type'}
357 0 0 if $event->{'type'}
394 0 0 unless ref $row
396 0 0 if ($period =~ /(\d+)/) { }
0 0 elsif ($period eq 'OT') { }
402 0 0 if ($period =~ /(\d+)/ and $period > 0) { }
0 0 elsif ($period =~ /time/i) { }
434 0 4 unless ($self->{'officials'}{'referees'}[0])
449 0 4 $star1 && $star1 eq 'Team' ? :
453 0 12 unless ($team and $team =~ /[A-Z]\s*$/)
474 0 0 $g_span == 8 ? :
486 0 0 unless ($goalie->{'name'} and $goalie->{'name'} =~ /[a-z]/i)
490 0 0 unless $goalie->{'pt'} =~ /\d/
491 0 0 if ($goalie->{'pt'} =~ /:/)
502 0 0 unless ($name and $name =~ /[A-Z]\s*$/i)
514 0 0 unless $type
515 0 0 unless $type =~ /\w/
516 0 0 $type =~ /R|A/ ? :
519 0 0 if $name =~ /\w/
532 4 44 unless $goalies_row and ref $goalies_row
534 16 28 if ($number =~ /^\d+$/) { }
535 8 8 if $t
569 1 40 if $_ == $self->{'_id'}
0 4 grep({$Sport::Analytics::NHL::Report::GS::BROKEN_EVENTS{'BS'}{$_}{'1'} if $_ == $self->{'_id'};} keys %{$Sport::Analytics::NHL::Report::GS::BROKEN_EVENTS{'BS'};}) ? :
572 4 0 unless ($self->{'old'})
574 0 4 $main_table->tag eq 'table' ? :
576 0 4 $self->{'old'} ? :
577 0 4 $self->{'old'} ? :
578 0 4 $self->{'old'} ? :
579 0 4 $self->{'old'} ? :
580 0 4 unless ref $misc_summary
586 0 4 $self->{'old'} ? :
589 0 4 $self->{'old'} ? :
591 4 0 unless ($self->{'old'})
593 4 0 if (ref $goaltender_summary) { }
617 16 176 if ($field eq 'name_decision') { }
16 160 elsif ($field eq 'team') { }
32 128 elsif ($goalie->{$field} =~ /(\d+)\:(\d+)/) { }
32 96 elsif ($goalie->{$field} =~ /(\d+)\-(\d+)/) { }
618 8 8 if ($goalie->{$field} =~ /^(\S+.*)\,\s+(\S+.*\S+)\s+\((W|L|OT)\)/) { }
638 64 128 if ($goalie->{$field} eq ' ' or ord $goalie->{$field} == 160)
639 32 32 $field =~ /SHOT/ ? :
645 4 0 if (@{$self->{'events'};})
652 16 8 if ($team->{'pptype'}{$pptype} =~ m[(\d+)\-(\d+)/(\d+)\:(\d+)]) { }
675 0 16 unless $official
681 0 12 unless defined $star and ref $star and defined $star->{'name'}
689 60 984 if ($event->{$field} and $event->{$field} =~ /^(\d+)\s+\D/)
697 64 20 if (defined $event->{'team1'} and $event->{'team1'} =~ /^\d+$/)
700 0 20 if $event->{'assist1'} and lc $event->{'assist1'} eq 'unassisted' || $event->{'assist1'} =~ /unsuccessful/i || $event->{'assist1'} =~ /penalty shot/i
701 64 20 unless defined $event->{'assist2'} and $event->{'assist2'} =~ /\w/
705 0 84 if $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'player1'}}
706 0 84 if $event->{'assist1'} and $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'assist1'}}
707 0 84 if $event->{'assist2'} and $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'assist2'}}
716 8 8 $goalie->{'team'} eq $self->{'teams'}[0]{'name'} ? :
717 8 8 if $goalie->{'decision'}
727 0 8 unless $team->{'_decision'}
740 0 0 if ($event->{'type'} eq 'GOAL' or $event->{'type'} eq 'MISS') { }
0 0 elsif ($event->{'type'} eq 'PENL') { }
742 0 0 if ($event->{'assist1'} and $event->{'assist1'} =~ /\w/) { }
744 0 0 if ($event->{'assist2'} and $event->{'assist2'} =~ /\w/) { }
754 0 0 if ($Sport::Analytics::NHL::Report::GS::SPECIAL_EVENTS{$self->{'_id'}} and not $event->{'on_ice'}[0][0] or $event->{'on_ice'}[0][0] =~ /Data/) { }
773 0 0 if ($event->{'player1'} and $event->{'player1'} =~ /\D/)
778 0 0 if (defined $event->{'team1'} and $event->{'team1'} =~ /^\d+$/)
783 0 0 if $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'player1'}}
784 0 0 if $event->{'assist1'} and $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'assist1'}}
785 0 0 if $event->{'assist2'} and $Sport::Analytics::NHL::Report::GS::NAME_TYPOS{$event->{'assist2'}}
786 0 0 if $event->{'assist1'} and $event->{'assist1'} =~ /unassisted/i || !($event->{'assist1'} =~ /[a-z]/i)
787 0 0 if $event->{'assist2'} and $event->{'assist2'} =~ /unassisted/i || !($event->{'assist2'} =~ /[a-z]/i)
803 0 0 if ($goalie->{'team_decision'} =~ /^(\S{3})\(([A-Z])\)/) { }
804 0 0 if (not $t0) { }
0 0 elsif ($t0 ne $1) { }
818 0 0 if (not $t0) { }
0 0 elsif ($t0 ne $1) { }
827 0 0 if $goalie->{'decision'}
828 0 0 if ($goalie->{'name'} eq 'EMPTY NET')
841 0 0 unless $team->{'_decision'}
851 0 4 $self->{'old'} ? :
854 4 0 unless $ENV{'GS_KEEP_PENL'}
856 0 20 if (my $evx = $Sport::Analytics::NHL::Report::GS::BROKEN_EVENTS{'GS'}{$self->{'_id'}}{$event->{'id'}})
862 0 20 if ($event->{'type'} eq 'PENL')
868 40 40 if exists $event->{$v}