| 1 | package CSAF::Type::ProductTree; | ||||||||||||||||||||
| 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 | 1 | ▶ | use CSAF::Type::Branches; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | 1 | ▶ | use CSAF::Type::FullProductNames; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | 1 | ▶ | use CSAF::Type::ProductGroups; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 1 | ▶ | use CSAF::Type::Relationships; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 0 | ▶ | sub branches { | ||||||||||||||||||
|
Subroutine
branches: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 18 | 0 | my ($self, %params) = @_; | |||||||||||||||||||
| 19 | 0 | ▶ | $self->{branches} ||= CSAF::Type::Branches->new(%params); | ||||||||||||||||||
|
Condition0%0/3
$self->{"branches"} ||= "CSAF::Type::Branches"->new(%params)
MC/DC0%0/2
$self->{"branches"} ||= "CSAF::Type::Branches"->new(%params)
$self->{"branches"}
"CSAF::Type::Branches"->new(%params)
Truth table0%0/3
A ||= B
A= $self->{"branches"}B= "CSAF::Type::Branches"->new(%params)
| |||||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 0 | ▶ | sub full_product_names { | ||||||||||||||||||
|
Subroutine
full_product_names: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 23 | 0 | my ($self, %params) = @_; | |||||||||||||||||||
| 24 | 0 | ▶ | $self->{full_product_names} ||= CSAF::Type::FullProductNames->new(%params); | ||||||||||||||||||
|
Condition0%0/3
$self->{"full_product_names"} ||= "CSAF::Type::FullProductNames"->new(%params)
MC/DC0%0/2
$self->{"full_product_names"} ||= "CSAF::Type::FullProductNames"->new(%params)
$self->{"full_product_names"}
"CSAF::Type::FullProductNames"->new(%params)
Truth table0%0/3
A ||= B
A= $self->{"full_product_names"}B= "CSAF::Type::FullProductNames"->new(%params)
| |||||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 0 | ▶ | sub product_groups { | ||||||||||||||||||
|
Subroutine
product_groups: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 28 | 0 | my ($self, %params) = @_; | |||||||||||||||||||
| 29 | 0 | ▶ | $self->{product_groups} ||= CSAF::Type::ProductGroups->new(%params); | ||||||||||||||||||
|
Condition0%0/3
$self->{"product_groups"} ||= "CSAF::Type::ProductGroups"->new(%params)
MC/DC0%0/2
$self->{"product_groups"} ||= "CSAF::Type::ProductGroups"->new(%params)
$self->{"product_groups"}
"CSAF::Type::ProductGroups"->new(%params)
Truth table0%0/3
A ||= B
A= $self->{"product_groups"}B= "CSAF::Type::ProductGroups"->new(%params)
| |||||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 0 | ▶ | sub relationships { | ||||||||||||||||||
|
Subroutine
relationships: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 33 | 0 | my ($self, %params) = @_; | |||||||||||||||||||
| 34 | 0 | ▶ | $self->{relationships} ||= CSAF::Type::Relationships->new(%params); | ||||||||||||||||||
|
Condition0%0/3
$self->{"relationships"} ||= "CSAF::Type::Relationships"->new(%params)
MC/DC0%0/2
$self->{"relationships"} ||= "CSAF::Type::Relationships"->new(%params)
$self->{"relationships"}
"CSAF::Type::Relationships"->new(%params)
Truth table0%0/3
A ||= B
A= $self->{"relationships"}B= "CSAF::Type::Relationships"->new(%params)
| |||||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 0 | ▶ | sub TO_CSAF { | ||||||||||||||||||
|
Subroutine
TO_CSAF: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 0 | my $self = shift; | |||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | my $output = {}; | |||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 0 | ▶ | if (@{$self->branches->items}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 44 | 0 | $output->{branches} = $self->branches->TO_CSAF; | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 0 | ▶ | if (@{$self->relationships->items}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 48 | 0 | $output->{relationships} = $self->relationships->TO_CSAF; | |||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 0 | ▶ | if (@{$self->full_product_names->items}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 52 | 0 | $output->{full_product_names} = $self->full_product_names->TO_CSAF; | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 0 | ▶ | return if not keys %{$output}; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 0 | return $output; | |||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 1 | 1; | |||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | __END__ | ||||||||||||||||||||