Branch Coverage

blib/lib/Travel/Status/DE/HAFAS/Journey.pm
Criterion Covered Total %
branch 44 82 53.6


line true false branch
52 25 0 if ($msg->{'type'} eq 'REM' and defined $msg->{'remX'}) { }
0 0 elsif ($msg->{'type'} eq 'HIM' and defined $msg->{'himX'}) { }
65 34 0 if (@{$journey->{'stopL'} // [];} or $journey->{'stbStop'})
67 0 34 if ($jid =~ /#/u) { }
72 0 0 if (length $date_ref < 5) { }
0 0 elsif (length $date_ref == 5) { }
85 0 34 if (length $date_ref < 7) { }
30 4 elsif (length $date_ref == 7) { }
121 30 4 if ($journey->{'stbStop'})
122 0 30 if ($hafas->{'arrivals'}) { }
150 30 4 if ($journey->{'stbStop'}) { }
4 0 elsif ($stops[0] and $stops[0]{'loc'}) { }
151 0 30 if ($hafas->{'arrivals'}) { }
167 30 4 if ($journey->{'stbStop'})
187 0 30 $hafas->{'arrivals'} ? :
0 30 $hafas->{'arrivals'} ? :
201 0 30 $hafas->{'arrivals'} ? :
0 30 $hafas->{'arrivals'} ? :
204 29 1 $datetime_r ? :
214 2 28 if ($ref->{'delay'}) { }
229 0 0 if (defined $load and $load > 10)
235 0 30 if (%tco)
239 3 31 if ($opt{'polyline'})
259 0 5 if (defined $self->{'rt_platform'} and defined $self->{'sched_platform'})
260 0 0 if ($self->{'rt_platform'} ne $self->{'sched_platform'})
265 0 5 if (defined $self->{'rt_platform'})
275 2 0 if ($self->{'messages'})
284 0 0 if ($self->{'operators'})
290 0 0 if $_->prod_arr or $_->prod_dep
301 0 0 if ($self->{'polyline'})
310 215 0 if ($self->{'route'} and @{$self->{'route'};})
311 7 208 if ($self->{'route'}[0] and $self->{'route'}[0]{'stop'})
332 84 148 if ($stop->loc->name =~ / HB $ | hl\.n\. $ | Hbf | Hauptbahnhof | Bf | Bahnhof | Centraal | Flughafen /ux)
341 6 12 if (@via_main and $via_main[-1]->loc->name eq $last_stop->loc->name)
344 0 18 if (@via and $via[-1]->loc->name eq $last_stop->loc->name)
348 6 4 if (@via_main and @via and $via[0]->loc->name eq $via_main[0]->loc->name)
353 2 16 if (@via < $max_parts) { }
357 4 12 if (@via_main >= $max_parts) { }
366 0 12 if (&any(sub {
382 0 0 if ($stop->loc->name eq $req_stop or $stop->loc->eva eq $req_stop)
395 0 0 if (ref $ret->{$k} eq "DateTime")