CSAF/Type/Acknowledgment.pm

filter: Statementstmt 71.8% 23 / 32 Branchbran 10.0% 1 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 100% 1 / 1 totaltotal 63.4% 33 / 52 CC 6 SCAR 24.4
CC
6
Cov
57%
TO_CSAF
30.0
_check_isa_array
2.1
BEGIN
1.0
CRAP 11.5
« CSAF/Validator/InformativeTests.pm ↑ Summary CSAF/Util/CVSS.pm »
1 package CSAF::Type::Acknowledgment;
2  
3 1 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 extends 'CSAF::Type::Base';
10  
11 2 ▶has names => (is => 'rw', isa => \&_check_isa_array, default => sub { [] });
Subroutine __ANON__: called CC=1 SCAR=0.0
12 2 ▶has urls => (is => 'rw', isa => \&_check_isa_array, default => sub { [] });
Subroutine __ANON__: called CC=1 SCAR=0.0
13 1 has summary => (is => 'rw');
14 1 has organization => (is => 'rw');
15  
16 4 ▶sub _check_isa_array {
Subroutine _check_isa_array: called CC=2 SCAR=7.6
17 4 ▶ Carp::croak 'must be an array' if (ref $_[0] ne 'ARRAY');
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[0] ne "ARRAY" 0 4 4
18 }
19  
20 0 ▶sub TO_CSAF {
Subroutine TO_CSAF: not called CC=5 SCAR=34.0
Pod documented
21  
22 0 my $self = shift;
23  
24 0 my $output = {};
25  
26 0 ▶ $output->{summary} = $self->summary if ($self->summary);
Branch: 1 branch
BranchTrueFalseTotal
if $self->summary 0 0 0
27 0 ▶ $output->{organization} = $self->organization if ($self->organization);
Branch: 1 branch
BranchTrueFalseTotal
if $self->organization 0 0 0
28  
29 0 ▶ $output->{names} = $self->names if (@{$self->names});
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->names;} 0 0 0
30 0 ▶ $output->{urls} = $self->urls if (@{$self->urls});
Branch: 1 branch
BranchTrueFalseTotal
if @{$self->urls;} 0 0 0
31  
32 0 return $output;
33  
34 }
35  
36 1 1;
37  
38 __END__
« CSAF/Validator/InformativeTests.pm ↑ Summary CSAF/Util/CVSS.pm »