EFA/Line.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 57.1% 4 / 7 Podpod 100% 3 / 3 totaltotal 61.1% 22 / 36 CC 2 SCAR 9.2
CC
2
Cov
60%
mot_name
6.0
new
2.0
TO_JSON
2.0
CRAP 2.5
« EFA/Info.pm ↑ Summary EFA/Services.pm »
1 package Travel::Status::DE::EFA::Line;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use parent 'Class::Accessor';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '3.22';
10  
11 2 Travel::Status::DE::EFA::Line->mk_ro_accessors(
12 qw(direction mot name number operator route type valid));
13  
14 2 my @mot_mapping = qw{
15 zug s-bahn u-bahn stadtbahn tram stadtbus regionalbus
16 schnellbus seilbahn schiff ast sonstige
17 };
18  
19 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
20 0 my ( $obj, %conf ) = @_;
21  
22 0 my $ref = \%conf;
23  
24 0 return bless( $ref, $obj );
25 }
26  
27 0 ▶sub mot_name {
Subroutine mot_name: not called CC=2 SCAR=17.9
Pod documented
28 0 my ($self) = @_;
29  
30 0 ▶ return $mot_mapping[ $self->{mot} ] // 'sonstige';
Condition0%0/2
$mot_mapping[$self->{"mot"}] // "sonstige"
l!l
00
MC/DC0%0/1
$mot_mapping[$self->{"mot"}] // "sonstige"
$mot_mapping[$self->{"mot"}]
Truth table0%0/2
A
A= $mot_mapping[$self->{"mot"}]
Aresult
11
00
31 }
32  
33 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=1 SCAR=6.9
Pod documented
34 0 my ($self) = @_;
35  
36 0 return { %{$self} };
37 }
38  
39 2 1;
40  
41 __END__
« EFA/Info.pm ↑ Summary EFA/Services.pm »