Picnic/Result/Cart.pm

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