PIDS/NextPredictedStopDetail.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 1 totaltotal 59.2% 16 / 27 CC 3 SCAR 17.5
CC
3
Cov
62%
new
12.0
__ANON__
1.1
BEGIN
1.0
CRAP 5.7
« PIDS/RouteChange.pm ↑ Summary PIDS/RouteStop.pm »
1 package WWW::PIDS::NextPredictedStopDetail;
2  
3 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 9 our @ATTR = qw(StopNo PredictedArrivalDateTime);
7  
8 {
9 9 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 0 ▶ *$_ = sub { return shift->{ $_ } } for @ATTR;
Subroutine __ANON__: not called CC=1 SCAR=1.2
11 }
12  
13 0 ▶sub new {
Subroutine new: not called CC=3 SCAR=24.8
Pod undocumented
14 0 my ( $class, $obj ) = @_;
15 0 my $self = bless {}, $class;
16  
17 0 for my $a ( @ATTR ) {
18 defined $obj->{ $a}
19 0 ▶ ? $self->{ $a } = $obj->{ $a }
Branch: 1 branch
BranchTrueFalseTotal
defined $obj->{$a} ? : 0 0 0
20 : die "Mandatory parameter $a not supplied in constructor" ;
21 }
22  
23 0 return $self
24 }
25  
26 9 1;
27  
28 __END__
« PIDS/RouteChange.pm ↑ Summary PIDS/RouteStop.pm »