blib/lib/GraphQL/Houtou/Runtime/SchemaBlock.pm

filter: Statementstmt 94.7% 18 / 19 Branchbran n/a Conditioncond 50.0% 3 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 6 totaltotal 67.4% 29 / 43 CC 4 SCAR 6.1
CC
4
Cov
84%
new
3.3
to_struct
2.0
family
2.0
CRAP 1.8
« blib/lib/GraphQL/Houtou/Introspection.pm ↑ Summary blib/lib/GraphQL/Houtou/Error.pm »
1 package GraphQL::Houtou::Runtime::SchemaBlock;
2  
3 62 ▶use 5.014;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 62 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 62 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1745 ▶sub new {
Subroutine new: called CC=3 SCAR=12.0
Pod undocumented
8 1745 my ($class, %args) = @_;
9 return bless {
10 name => $args{name},
11 family => $args{family} || 'ROOT',
12 root_type_name => $args{root_type_name},
13 1745 ▶ slots => $args{slots} || [],
Condition50%2/4
$args{'family'} || 'ROOT'
l!l
17450
$args{'slots'} || []
l!l
17450
MC/DC0%0/1
$args{'family'} || 'ROOT'
$args{'family'}
MC/DC0%0/1
$args{'slots'} || []
$args{'slots'}
Truth table50%1/2
A
A= $args{'family'}
Aresult
11
00
Truth table50%1/2
A
A= $args{'slots'}
Aresult
11
00
14 }, $class;
15 }
16  
17 42 ▶sub name { return $_[0]{name} }
Subroutine name: called CC=1 SCAR=0.0
Pod undocumented
18 0 ▶sub family { return $_[0]{family} }
Subroutine family: not called CC=1 SCAR=6.9
Pod undocumented
19 9350 ▶sub root_type_name { return $_[0]{root_type_name} }
Subroutine root_type_name: called CC=1 SCAR=0.0
Pod undocumented
20 2819 ▶sub slots { return $_[0]{slots} }
Subroutine slots: called CC=1 SCAR=0.0
Pod undocumented
21  
22 64 ▶sub to_struct {
Subroutine to_struct: called CC=2 SCAR=7.0
Pod undocumented
23 64 my ($self) = @_;
24 return {
25 name => $self->{name},
26 family => $self->{family},
27 root_type_name => $self->{root_type_name},
28 64 ▶ slots => [ map { $_->to_struct } @{ $self->{slots} || [] } ],
Condition50%1/2
$self->{'slots'} || []
l!l
640
MC/DC0%0/1
$self->{'slots'} || []
$self->{'slots'}
Truth table50%1/2
A
A= $self->{'slots'}
Aresult
11
00
29 };
30 }
31  
32 62 1;
« blib/lib/GraphQL/Houtou/Introspection.pm ↑ Summary blib/lib/GraphQL/Houtou/Error.pm »