lib/WWW/Shopify/Liquid/Filter/Last.pm

filter: Statementstmt 66.6% 10 / 15 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 36.1% 13 / 36 CC 5 SCAR 28.5
CC
5
Cov
40%
operate
30.0
transparent
2.0
BEGIN
1.0
CRAP 17.2
« lib/WWW/Shopify/Liquid/Filter/First.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Contains.pm »
1 #!/usr/bin/perl
2 38 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 38 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 38 ▶package WWW::Shopify::Liquid::Filter::Last; use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 0 ▶sub transparent { return 1; }
Subroutine transparent: not called CC=1 SCAR=6.9
Pod undocumented
7 0 ▶sub operate {
Subroutine operate: not called CC=5 SCAR=34.0
Pod undocumented
8 0 my ($self, $hash, $operand, @arguments) = @_;
9 0 ▶ return $operand->[-1] if $operand && ref($operand) eq "ARRAY";
Branch: 1 branch
BranchTrueFalseTotal
if $operand and ref $operand eq "ARRAY" 0 0 0
Condition0%0/3
$operand and ref $operand eq "ARRAY"
!ll&&!rl&&r
000
MC/DC0%0/2
$operand and ref $operand eq "ARRAY"
$operand ref $operand eq "ARRAY"
Truth table0%0/3
A and B
A= $operandB= ref $operand eq "ARRAY"
ABresult
0X0
100
111
10 0 ▶ return $operand->{last} if $operand && ref($operand) eq "HASH";
Branch: 1 branch
BranchTrueFalseTotal
if $operand and ref $operand eq "HASH" 0 0 0
Condition0%0/3
$operand and ref $operand eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
$operand and ref $operand eq "HASH"
$operand ref $operand eq "HASH"
Truth table0%0/3
A and B
A= $operandB= ref $operand eq "HASH"
ABresult
0X0
100
111
11 0 return undef;
12 }
13  
14 38 1;
« lib/WWW/Shopify/Liquid/Filter/First.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Contains.pm »