Picnic/Result/Article.pm

filter: Statementstmt 86.8% 33 / 38 Branchbran 16.6% 2 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.5% 12 / 17 Podpod 100% 3 / 3 totaltotal 71.4% 50 / 70 CC 7 SCAR 10.9
CC
7
Cov
70%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.0
« Picnic/Result/Cart.pm ↑ Summary Picnic/Result/Login.pm »
1 package WWW::Picnic::Result::Article;
2 # ABSTRACT: Detailed Picnic product/article information
3 2 our $VERSION = '0.101';
4 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 extends 'WWW::Picnic::Result';
7  
8  
9 has id => (
10 is => 'ro',
11 lazy => 1,
12 1 ▶ default => sub { shift->_get('id') },
Subroutine __ANON__: called CC=1 SCAR=0.0
13 2 );
14  
15  
16 has name => (
17 is => 'ro',
18 lazy => 1,
19 1 ▶ default => sub { shift->_get('name') },
Subroutine __ANON__: called CC=1 SCAR=0.0
20 2 );
21  
22  
23 has description => (
24 is => 'ro',
25 lazy => 1,
26 1 ▶ default => sub { shift->_get('description') },
Subroutine __ANON__: called CC=1 SCAR=0.0
27 2 );
28  
29  
30 has type => (
31 is => 'ro',
32 lazy => 1,
33 0 ▶ default => sub { shift->_get('type') },
Subroutine __ANON__: not called CC=1 SCAR=6.9
34 2 );
35  
36  
37 has images => (
38 is => 'ro',
39 lazy => 1,
40 0 ▶ default => sub { shift->_get('images') || [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("images") or [] 0 0 0
41 2 );
42  
43  
44 has image_ids => (
45 is => 'ro',
46 lazy => 1,
47 0 ▶ default => sub { shift->_get('image_ids') || [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("image_ids") or [] 0 0 0
48 2 );
49  
50  
51 has price_info => (
52 is => 'ro',
53 lazy => 1,
54 1 ▶ default => sub { shift->_get('price_info') || {} },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("price_info") or {} 1 0 1
55 2 );
56  
57  
58 1 ▶sub price {
Subroutine price: called CC=1 SCAR=0.0
Pod documented
59 1 my ( $self ) = @_;
60 1 return $self->price_info->{price};
61 }
62  
63  
64 1 ▶sub original_price {
Subroutine original_price: called CC=1 SCAR=0.0
Pod documented
65 1 my ( $self ) = @_;
66 1 return $self->price_info->{original_price};
67 }
68  
69  
70 1 ▶sub deposit {
Subroutine deposit: called CC=1 SCAR=0.0
Pod documented
71 1 my ( $self ) = @_;
72 1 return $self->price_info->{deposit};
73 }
74  
75  
76 has unit_quantity => (
77 is => 'ro',
78 lazy => 1,
79 1 ▶ default => sub { shift->_get('unit_quantity') },
Subroutine __ANON__: called CC=1 SCAR=0.0
80 2 );
81  
82  
83 has max_order_quantity => (
84 is => 'ro',
85 lazy => 1,
86 1 ▶ default => sub { shift->_get('max_order_quantity') },
Subroutine __ANON__: called CC=1 SCAR=0.0
87 2 );
88  
89  
90 has labels => (
91 is => 'ro',
92 lazy => 1,
93 1 ▶ default => sub { shift->_get('labels') || [] },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("labels") or [] 1 0 1
94 2 );
95  
96  
97 has allergies => (
98 is => 'ro',
99 lazy => 1,
100 0 ▶ default => sub { shift->_get('allergies') || {} },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("allergies") or {} 0 0 0
101 2 );
102  
103  
104 has highlights => (
105 is => 'ro',
106 lazy => 1,
107 0 ▶ default => sub { shift->_get('highlights') || [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("highlights") or [] 0 0 0
108 2 );
109  
110  
111 has perishable => (
112 is => 'ro',
113 lazy => 1,
114 1 ▶ default => sub { shift->_get('perishable') },
Subroutine __ANON__: called CC=1 SCAR=0.0
115 2 );
116  
117  
118 2 1;
119  
120 __END__
« Picnic/Result/Cart.pm ↑ Summary Picnic/Result/Login.pm »