lib/Test2/Harness/UI/Schema/Overlay/Coverage.pm

filter: Statementstmt 41.0% 16 / 39 Branchbran 16.6% 1 / 6 Conditioncond 0.0% 0 / 23 MC/DCmcdc 0.0% 0 / 15 Subroutinesub 44.4% 4 / 9 Podpod 0.0% 0 / 5 totaltotal 21.6% 21 / 97 CC 11 SCAR 28.5
CC
11
Cov
25%
human_fields
42.0
manager_package
12.0
test_filename
6.0
CRAP 17.3
« lib/Test2/Harness/UI/Controller/View.pm ↑ Summary lib/Test2/Harness/UI/Util/DateTimeFormat.pm »
1 package Test2::Harness::UI::Schema::Result::Coverage;
2 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Carp qw/confess/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶confess "You must first load a Test2::Harness::UI::Schema::NAME module"
Branch: 1 branch
BranchTrueFalseTotal
unless $Test2::Harness::UI::Schema::LOADED 0 2 2
8 unless $Test2::Harness::UI::Schema::LOADED;
9  
10 2 our $VERSION = '0.000150';
11  
12 2 __PACKAGE__->inflate_column(
13 metadata => {
14 inflate => DBIx::Class::InflateColumn::Serializer::JSON->get_unfreezer('metadata', {}),
15 deflate => DBIx::Class::InflateColumn::Serializer::JSON->get_freezer('metadata', {}),
16 },
17 );
18  
19 0 ▶sub human_fields {
Subroutine human_fields: not called CC=6 SCAR=37.4
Pod undocumented
20 0 my $self = shift;
21  
22 0 my %cols = $self->get_all_fields;
23  
24 0 ▶ $cols{test_file} //= $self->test_filename;
Condition0%0/3
$cols{"test_file"} //= $self->test_filename
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"test_file"} //= $self->test_filename
$cols{"test_file"} $self->test_filename
Truth table0%0/3
A //= B
A= $cols{"test_file"}B= $self->test_filename
ABresult
1X1
011
000
25 0 ▶ $cols{source_file} //= $self->source_filename;
Condition0%0/3
$cols{"source_file"} //= $self->source_filename
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"source_file"} //= $self->source_filename
$cols{"source_file"} $self->source_filename
Truth table0%0/3
A //= B
A= $cols{"source_file"}B= $self->source_filename
ABresult
1X1
011
000
26 0 ▶ $cols{source_sub} //= $self->source_subname;
Condition0%0/3
$cols{"source_sub"} //= $self->source_subname
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"source_sub"} //= $self->source_subname
$cols{"source_sub"} $self->source_subname
Truth table0%0/3
A //= B
A= $cols{"source_sub"}B= $self->source_subname
ABresult
1X1
011
000
27 0 ▶ $cols{manager} //= $self->manager_package;
Condition0%0/3
$cols{"manager"} //= $self->manager_package
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"manager"} //= $self->manager_package
$cols{"manager"} $self->manager_package
Truth table0%0/3
A //= B
A= $cols{"manager"}B= $self->manager_package
ABresult
1X1
011
000
28  
29 0 ▶ $cols{metadata} = $self->metadata // ['*'];
Condition0%0/2
$self->metadata // ["*"]
l!l
00
MC/DC0%0/1
$self->metadata // ["*"]
$self->metadata
Truth table0%0/2
A
A= $self->metadata
Aresult
11
00
30  
31 0 return {map { $_ => $cols{$_} } qw/test_file source_file source_sub manager metadata/};
32 }
33  
34 0 ▶sub test_filename {
Subroutine test_filename: not called CC=2 SCAR=17.9
Pod undocumented
35 0 my $self = shift;
36 0 my %cols = $self->get_all_fields;
37  
38 0 ▶ return $cols{test_file} // $self->test_file->filename;
Condition0%0/3
$cols{"test_file"} // $self->test_file->filename
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"test_file"} // $self->test_file->filename
$cols{"test_file"} $self->test_file->filename
Truth table0%0/3
A // B
A= $cols{"test_file"}B= $self->test_file->filename
ABresult
1X1
011
000
39 }
40  
41 0 ▶sub source_filename {
Subroutine source_filename: not called CC=2 SCAR=17.9
Pod undocumented
42 0 my $self = shift;
43 0 my %cols = $self->get_all_fields;
44  
45 0 ▶ return $cols{source_file} // $self->source_file->filename;
Condition0%0/3
$cols{"source_file"} // $self->source_file->filename
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"source_file"} // $self->source_file->filename
$cols{"source_file"} $self->source_file->filename
Truth table0%0/3
A // B
A= $cols{"source_file"}B= $self->source_file->filename
ABresult
1X1
011
000
46 }
47  
48 0 ▶sub source_subname {
Subroutine source_subname: not called CC=2 SCAR=17.9
Pod undocumented
49 0 my $self = shift;
50 0 my %cols = $self->get_all_fields;
51  
52 0 ▶ return $cols{source_sub} // $self->source_sub->subname;
Condition0%0/3
$cols{"source_sub"} // $self->source_sub->subname
l!l&&r!l&&!r
000
MC/DC0%0/2
$cols{"source_sub"} // $self->source_sub->subname
$cols{"source_sub"} $self->source_sub->subname
Truth table0%0/3
A // B
A= $cols{"source_sub"}B= $self->source_sub->subname
ABresult
1X1
011
000
53 }
54  
55 0 ▶sub manager_package {
Subroutine manager_package: not called CC=3 SCAR=24.8
Pod undocumented
56 0 my $self = shift;
57 0 my %cols = $self->get_all_fields;
58  
59 0 ▶ return $cols{manager} if $cols{manager};
Branch: 1 branch
BranchTrueFalseTotal
if $cols{"manager"} 0 0 0
60 0 ▶ my $manager = $self->coverage_manager or return undef;
Branch: 1 branch
BranchTrueFalseTotal
my $manager = $self->coverage_manager or return undef 0 0 0
61 0 return $manager->package;
62 }
63  
64 2 1;
« lib/Test2/Harness/UI/Controller/View.pm ↑ Summary lib/Test2/Harness/UI/Util/DateTimeFormat.pm »