blib/lib/WWW/Shopify/Liquid/Filter/First.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
« blib/lib/WWW/Shopify/Liquid/Tag.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Last.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 30 ▶package WWW::Shopify::Liquid::Filter::First; 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 sub operate {
8 0 ▶ my ($self, $hash, $operand, @arguments) = @_;
Subroutine operate: not called CC=5 SCAR=34.0
Pod undocumented
9 0 ▶ return $operand->[0] 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->{first} 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 30 1;
« blib/lib/WWW/Shopify/Liquid/Tag.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Last.pm »