blib/lib/WWW/Shopify/Liquid/Operator/Array.pm

filter: Statementstmt 72.7% 16 / 22 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 55.5% 5 / 9 Podpod 0.0% 0 / 4 totaltotal 42.0% 21 / 50 CC 5 SCAR 25.2
CC
5
Cov
48%
operate
30.0
symbol
2.0
priority
2.0
CRAP 12.4
« blib/lib/WWW/Shopify/Liquid/Filter/Size.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter.pm »
1 #!/usr/bin/perl
2 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package WWW::Shopify::Liquid::Operator::Array;
6 30 ▶use base 'WWW::Shopify::Liquid::Operator';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 30 ▶use List::Util qw(first);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 30 ▶use Scalar::Util qw(looks_like_number);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 0 ▶sub symbol { return '..'; }
Subroutine symbol: not called CC=1 SCAR=6.9
Pod undocumented
10 0 ▶sub priority { return 7; }
Subroutine priority: not called CC=1 SCAR=6.9
Pod undocumented
11 sub operate {
12 0 ▶ my ($self, $hash, $type, $op1, $op2) = @_;
Subroutine operate: not called CC=5 SCAR=34.0
Pod undocumented
13 0 ▶ die new WWW::Shopify::Liquid::Exception::Renderer::Arguments($self, "Both operands must be integers.") unless defined $op1 && defined $op2 && looks_like_number($op1) && looks_like_number($op2);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $op1 and defined $op2 and &looks_like_number($op1) and &looks_like_number($op2) 0 0 0
Condition0%0/9
defined $op1 and defined $op2 and &looks_like_number($op1) and &looks_like_number($op2)
!ll&&!rl&&r
000
defined $op1 and defined $op2 and &looks_like_number($op1)
!ll&&!rl&&r
000
defined $op1 and defined $op2
!ll&&!rl&&r
000
MC/DC0%0/4
defined $op1 and defined $op2 and &looks_like_number($op1) and &looks_like_number($op2)
defined $op1 defined $op2 &looks_like_number($op1) &looks_like_number($op2)
Truth table0%0/5
A and B and C and D
A= defined $op1B= defined $op2C= &looks_like_number($op1)D= &looks_like_number($op2)
ABCDresult
0XXX0
10XX0
110X0
11100
11111
14 0 return [$op1..$op2];
15 }
16 0 ▶sub requires_grouping { return 1; }
Subroutine requires_grouping: not called CC=1 SCAR=6.9
Pod undocumented
17  
18 30 1;
« blib/lib/WWW/Shopify/Liquid/Filter/Size.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter.pm »