CSAF/Type/ProductGroup.pm

filter: Statementstmt 76.0% 19 / 25 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 1 / 1 totaltotal 69.4% 25 / 36 CC 2 SCAR 8.0
CC
2
Cov
70%
TO_CSAF
6.0
_trigger_group_id
2.0
__ANON__
1.1
CRAP 2.2
« CSAF/Type/RestartRequired.pm ↑ Summary CSAF/Type/Hash.pm »
1 package CSAF::Type::ProductGroup;
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  
12 1 has group_id => (is => 'rw', required => 1, trigger => 1);
13 0 ▶has product_ids => (is => 'rw', required => 1, default => sub { [] });
Subroutine __ANON__: not called CC=1 SCAR=1.2
14 1 has summary => (is => 'rw');
15  
16 0 ▶sub _trigger_group_id {
Subroutine _trigger_group_id: not called CC=1 SCAR=6.9
17 0 $CSAF::CACHE->{groups}->{$_[0]->group_id} = $_[0]->product_ids;
18 }
19  
20 0 ▶sub TO_CSAF {
Subroutine TO_CSAF: not called CC=2 SCAR=17.9
Pod documented
21  
22 0 my $self = shift;
23  
24 0 my $output = {group_id => $self->group_id, product_ids => $self->product_ids};
25  
26 0 ▶ $output->{summary} = $self->summary if ($self->summary);
Branch: 1 branch
BranchTrueFalseTotal
if $self->summary 0 0 0
27  
28 0 return $output;
29  
30 }
31  
32 1 1;
33  
34 __END__
« CSAF/Type/RestartRequired.pm ↑ Summary CSAF/Type/Hash.pm »