Picnic/Result/Cart.pm

filter: Statementstmt 84.6% 22 / 26 Branchbran 25.0% 3 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 63.6% 7 / 11 Podpod n/a totaltotal 65.3% 32 / 49 CC 7 SCAR 11.7
CC
7
Cov
66%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.2
« Picnic.pm ↑ Summary Picnic/Result/Article.pm »
1 package WWW::Picnic::Result::Cart;
2 # ABSTRACT: Picnic shopping cart / order
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 2 ▶ default => sub { shift->_get('id') },
Subroutine __ANON__: called CC=1 SCAR=0.0
13 2 );
14  
15  
16 has type => (
17 is => 'ro',
18 lazy => 1,
19 1 ▶ default => sub { shift->_get('type') },
Subroutine __ANON__: called CC=1 SCAR=0.0
20 2 );
21  
22  
23 has status => (
24 is => 'ro',
25 lazy => 1,
26 1 ▶ default => sub { shift->_get('status') },
Subroutine __ANON__: called CC=1 SCAR=0.0
27 2 );
28  
29  
30 has items => (
31 is => 'ro',
32 lazy => 1,
33 1 ▶ default => sub { shift->_get('items') || [] },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("items") or [] 1 0 1
34 2 );
35  
36  
37 has total_count => (
38 is => 'ro',
39 lazy => 1,
40 2 ▶ default => sub { shift->_get('total_count') || 0 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("total_count") or 0 2 0 2
41 2 );
42  
43  
44 has total_price => (
45 is => 'ro',
46 lazy => 1,
47 1 ▶ default => sub { shift->_get('total_price') || 0 },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("total_price") or 0 1 0 1
48 2 );
49  
50  
51 has checkout_total_price => (
52 is => 'ro',
53 lazy => 1,
54 0 ▶ default => sub { shift->_get('checkout_total_price') || 0 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("checkout_total_price") or 0 0 0 0
55 2 );
56  
57  
58 has delivery_slots => (
59 is => 'ro',
60 lazy => 1,
61 0 ▶ default => sub { shift->_get('delivery_slots') || [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("delivery_slots") or [] 0 0 0
62 2 );
63  
64  
65 has selected_slot => (
66 is => 'ro',
67 lazy => 1,
68 0 ▶ default => sub { shift->_get('selected_slot') },
Subroutine __ANON__: not called CC=1 SCAR=6.9
69 2 );
70  
71  
72 has deposit_breakdown => (
73 is => 'ro',
74 lazy => 1,
75 0 ▶ default => sub { shift->_get('deposit_breakdown') || [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("deposit_breakdown") or [] 0 0 0
76 2 );
77  
78  
79 2 1;
80  
81 __END__
« Picnic.pm ↑ Summary Picnic/Result/Article.pm »