Khonsu/Text/H1.pm

filter: Statementstmt 100% 10 / 10 Branchbran 100% 2 / 2 Conditioncond 42.8% 3 / 7 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 65.3% 17 / 26 CC 5 SCAR 15.5
CC
5
Cov
79%
add
5.5
BEGIN
1.0
CRAP 4.7
« Khonsu/Page.pm ↑ Summary Khonsu/Shape/Line.pm »
1 package Khonsu::Text::H1;
2  
3 3 ▶use parent 'Khonsu::Text';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub add {
6 104 ▶ my ($self, $file, %attributes) = @_;
Subroutine add: called CC=5 SCAR=17.0
Pod undocumented
7 104 ▶ $attributes{font}->{size} ||= 50;
Condition50%1/2
$attributes{"font"}{"size"} ||= 50
l!l
0104
MC/DC0%0/1
$attributes{"font"}{"size"} ||= 50
$attributes{"font"}{"size"}
Truth table50%1/2
A
A= $attributes{"font"}{"size"}
Aresult
11
00
8 104 ▶ $attributes{font}->{line_height} ||= 30;
Condition50%1/2
$attributes{"font"}{"line_height"} ||= 30
l!l
0104
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 104 ▶ $attributes{h} ||= $attributes{font}->{line_height};
Condition33%1/3
$attributes{"h"} ||= $attributes{"font"}{"line_height"}
l!l&&r!l&&!r
01040
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 104 ▶ $file->toc->outline($file, 'h1', %attributes) if $attributes{toc};
Branch: 1 branch
BranchTrueFalseTotal
if $attributes{"toc"} 102 2 104
11 104 return $self->SUPER::add($file, %attributes);
12 }
13  
14 3 1;
« Khonsu/Page.pm ↑ Summary Khonsu/Shape/Line.pm »