Khonsu/Text/H2.pm

filter: Statementstmt 100% 10 / 10 Branchbran 50.0% 1 / 2 Conditioncond 42.8% 3 / 7 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 61.5% 16 / 26 CC 5 SCAR 16.3
CC
5
Cov
74%
add
5.9
BEGIN
1.0
CRAP 5.1
« Khonsu/TOC.pm ↑ Summary Khonsu/Text/H3.pm »
1 package Khonsu::Text::H2;
2  
3 3 ▶use parent 'Khonsu::Text';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub add {
6 102 ▶ my ($self, $file, %attributes) = @_;
Subroutine add: called CC=5 SCAR=17.8
Pod undocumented
7 102 ▶ $attributes{font}->{size} ||= 40;
Condition50%1/2
$attributes{"font"}{"size"} ||= 40
l!l
0102
MC/DC0%0/1
$attributes{"font"}{"size"} ||= 40
$attributes{"font"}{"size"}
Truth table50%1/2
A
A= $attributes{"font"}{"size"}
Aresult
11
00
8 102 ▶ $attributes{font}->{line_height} ||= 30;
Condition50%1/2
$attributes{"font"}{"line_height"} ||= 30
l!l
0102
MC/DC0%0/1
$attributes{"font"}{"line_height"} ||= 30
$attributes{"font"}{"line_height"}
Truth table50%1/2
A
A= $attributes{"font"}{"line_height"}
Aresult
11
00
9 102 ▶ $attributes{h} ||= $attributes{font}->{line_height};
Condition33%1/3
$attributes{"h"} ||= $attributes{"font"}{"line_height"}
l!l&&r!l&&!r
01020
MC/DC0%0/2
$attributes{"h"} ||= $attributes{"font"}{"line_height"}
$attributes{"h"} $attributes{"font"}{"line_height"}
Truth table33%1/3
A ||= B
A= $attributes{"h"}B= $attributes{"font"}{"line_height"}
ABresult
1X1
011
000
10 102 ▶ $file->toc->outline($file, 'h2', %attributes) if $attributes{toc};
Branch: 1 branch
BranchTrueFalseTotal
if $attributes{"toc"} 102 0 102
11 102 return $self->SUPER::add($file, %attributes);
12 }
13  
14 3 1;
« Khonsu/TOC.pm ↑ Summary Khonsu/Text/H3.pm »