blib/lib/WWW/Shopify/Liquid/Filter/Map.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 40.6% 13 / 32 CC 3 SCAR 16.8
CC
3
Cov
48%
operate
12.0
min_arguments
2.0
max_arguments
2.0
CRAP 5.4
« blib/lib/WWW/Shopify/Liquid/Filter/Grep.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/LinkTo.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::Filter::Map;
6 30 ▶use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 0 ▶sub min_arguments { return 1; }
Subroutine min_arguments: not called CC=1 SCAR=6.9
Pod undocumented
8 0 ▶sub max_arguments { return 1; }
Subroutine max_arguments: not called CC=1 SCAR=6.9
Pod undocumented
9  
10 sub operate {
11 0 ▶ my ($self, $hash, $operand, @arguments) = @_;
Subroutine operate: not called CC=3 SCAR=24.8
Pod undocumented
12 0 ▶ return undef unless ref($operand) && ref($operand) eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $operand and ref $operand eq "ARRAY" 0 0 0
Condition0%0/3
ref $operand and ref $operand eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
ref $operand and ref $operand eq "ARRAY"
ref $operand ref $operand eq "ARRAY"
Truth table0%0/3
A and B
A= ref $operandB= ref $operand eq "ARRAY"
ABresult
0X0
100
111
13 0 return [map { $_->{$operand} } @$operand];
14 }
15  
16 30 1;
« blib/lib/WWW/Shopify/Liquid/Filter/Grep.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/LinkTo.pm »