RST/Error.pm

filter: Statementstmt 43.7% 7 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 40.0% 2 / 5 Podpod 100% 3 / 3 totaltotal 38.7% 12 / 31 CC 5 SCAR 28.5
CC
5
Cov
33%
cases
30.0
severity
2.0
description
2.0
CRAP 17.3
↑ Summary RST/DataProvider.pm »
1 package ICANN::RST::Error;
2 # ABSTRACT: an object representing an RST error.
3 1 ▶use base qw(ICANN::RST::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub severity { $_[0]->{'Severity'} }
Subroutine severity: not called CC=1 SCAR=6.9
Pod documented
7 0 ▶sub description { ICANN::RST::Text->new($_[0]->{'Description'}) }
Subroutine description: not called CC=1 SCAR=6.9
Pod documented
8  
9 0 ▶sub cases {
Subroutine cases: not called CC=5 SCAR=34.0
Pod documented
10 0 my $self = shift;
11  
12 0 my %cases;
13  
14 0 foreach my $case ($self->spec->cases) {
15 0 foreach my $error ($case->errors) {
16 0 ▶ $cases{$case->id} = $case if ($error->id eq $self->id && !defined($cases{$case->id}));
Branch: 1 branch
BranchTrueFalseTotal
if $error->id eq $self->id and not defined $cases{$case->id} 0 0 0
Condition0%0/3
$error->id eq $self->id and not defined $cases{$case->id}
!ll&&!rl&&r
000
MC/DC0%0/2
$error->id eq $self->id and not defined $cases{$case->id}
$error->id eq $self->id not defined $cases{$case->id}
Truth table0%0/3
A and not(B)
A= $error->id eq $self->idB= not defined $cases{$case->id}
ABresult
0X0
100
111
17 }
18 }
19  
20 0 return sort { $a->id cmp $b->id } values(%cases);
21 }
22  
23 1 1;
24  
25 __END__
↑ Summary RST/DataProvider.pm »