Chart/Margin.pm

filter: Statementstmt 78.1% 25 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 1 totaltotal 71.4% 30 / 42 CC 2 SCAR 8.6
CC
2
Cov
74%
parameter_value
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.4
« Chart/Axis/Item.pm ↑ Summary Chart/Type/Simple.pm »
1 package Google::Chart::Margin;
2 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use constant parameter_name => 'chma';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 with 'Google::Chart::QueryComponent::Simple';
8  
9 coerce 'Google::Chart::Margin'
10 => from 'ArrayRef'
11 0 ▶ => via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
12 0 my $aref = $_;
13  
14 0 return Google::Chart::Margin->new(
15 left => $aref->[0],
16 right => $aref->[1],
17 top => $aref->[2],
18 bottom => $aref->[3],
19 legend_x => $aref->[4],
20 legend_y => $aref->[5],
21 );
22 }
23 1 ;
24  
25 1 has 'left' => (
26 is => 'rw',
27 isa => 'Int',
28 required => 1
29 );
30  
31 1 has 'right' => (
32 is => 'rw',
33 isa => 'Int',
34 required => 1
35 );
36  
37 1 has 'top' => (
38 is => 'rw',
39 isa => 'Int',
40 required => 1
41 );
42  
43 1 has 'bottom' => (
44 is => 'rw',
45 isa => 'Int',
46 required => 1
47 );
48  
49 1 has 'legend_x' => (
50 is => 'rw',
51 #isa => 'Int',
52 required => 0
53 );
54  
55 1 has 'legend_y' => (
56 is => 'rw',
57 #isa => 'Int',
58 required => 0
59 );
60  
61 1 __PACKAGE__->meta->make_immutable;
62  
63 1 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
64 1 ▶no Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
65  
66 0 ▶sub parameter_value {
Subroutine parameter_value: not called CC=2 SCAR=17.9
Pod undocumented
67 0 my $self = shift;
68  
69 0 my $str =
70 join(',', $self->left, $self->right, $self->top, $self->bottom );
71  
72 0 ▶ if($self->legend_x) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->legend_x) 0 0 0
73 0 $str .= "|" . $self->legend_x . "," . $self->legend_y;
74 }
75  
76 0 return $str;
77 }
78  
79 1 1;
80  
81 __END__
« Chart/Axis/Item.pm ↑ Summary Chart/Type/Simple.pm »