Branch Coverage

blib/lib/Travel/Status/DE/HAFAS.pm
Criterion Covered Total %
branch 25 120 20.8


line true false branch
190 1 0 unless ($ua)
196 0 0 unless ($conf{'station'} or $conf{'journey'} or $conf{'geoSearch'} or $conf{'locationSearch'})
207 0 1 unless (defined $service)
211 0 1 if (defined $service and not exists $hafas_instance{$service})
234 0 1 if ($conf{'journey'}) { }
0 1 elsif ($conf{'geoSearch'}) { }
0 1 elsif ($conf{'locationSearch'}) { }
246 0 0 $conf{'with_polyline'} ? :
306 0 1 if ($self->{'station'} =~ / ^ [0-9]+ $ /ux) { }
338 0 1 $conf{'arrivals'} ? :
351 0 1 if ($self->{'cache'})
360 1 0 if (my $salt = $hafas_instance{$service}{'salt'})
361 0 1 if ($hafas_instance{$service}{'micmac'}) { }
371 0 1 if ($conf{'async'})
376 1 0 if ($conf{'json'}) { }
380 0 0 if ($self->{'developer_mode'})
386 0 0 if ($error)
391 0 0 if ($self->{'developer_mode'})
400 0 1 if ($conf{'journey'}) { }
0 1 elsif ($conf{'geoSearch'} or $conf{'locationSearch'}) { }
417 0 0 unless ($conf{'station'} or $conf{'journey'} or $conf{'geoSearch'} or $conf{'locationSearch'})
435 0 0 if ($conf{'journey'}) { }
0 0 elsif ($conf{'geoSearch'} or $conf{'locationSearch'}) { }
444 0 0 if ($self->errstr) { }
477 0 1 if (my(@mots) = @{$self->{'exclusive_mots'} // [];})
484 0 1 if (my(@mots) = @{$self->{'excluded_mots'} // [];})
497 0 0 if ($self->{'developer_mode'})
501 0 0 if ($cache)
503 0 0 if ($content)
504 0 0 if ($self->{'developer_mode'})
511 0 0 if ($self->{'developer_mode'})
521 0 0 if ($reply->is_error)
526 0 0 if ($cache)
538 0 0 if ($self->{'developer_mode'})
544 0 0 if ($cache)
546 0 0 if ($content)
547 0 0 if ($self->{'developer_mode'})
554 0 0 if ($self->{'developer_mode'})
561 0 0 if (my $err = $tx->error)
567 0 0 if ($cache)
587 0 1 if ($self->{'raw_json'}{'err'} and $self->{'raw_json'}{'err'} ne 'OK') { }
0 1 elsif (defined $self->{'raw_json'}{'cInfo'}{'code'} and $self->{'raw_json'}{'cInfo'}{'code'} ne 'OK' and $self->{'raw_json'}{'cInfo'}{'code'} ne 'VH') { }
0 1 elsif (@{$self->{'raw_json'}{'svcResL'} // [];} == 0) { }
0 1 elsif ($self->{'raw_json'}{'svcResL'}[0]{'err'} ne 'OK') { }
619 0 1 if ($is_him)
626 0 1 if ($code eq "OPERATOR")
631 0 0 if ($code eq $message->{'code'} and $text eq $message->{'text'})
654 0 0 if ($self->{'errstr'})
661 0 0 if ($self->{'raw_json'}{'svcResL'}[0]{'res'}{'match'})
678 0 0 if ($self->{'errstr'})
686 0 0 if ($journey->{'poly'})
712 0 1 if ($self->{'errstr'})
751 0 0 if ($service and exists $hafas_instance{$service}{'stopfinder'})
759 0 0 if (my $err = $sf->errstr)
773 0 0 if ($service and exists $hafas_instance{$service}{'stopfinder'})
791 0 0 if ($self->{'station_info'})
801 0 0 if ($loc->{'pRefL'})
811 0 0 if ($loc) { }
856 0 0 if (defined $service and exists $hafas_instance{$service})
865 1 0 if (defined $self->{'active_service'})