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

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 38.2% 13 / 34 CC 4 SCAR 22.7
CC
4
Cov
43%
operate
20.0
min_arguments
2.0
max_arguments
2.0
CRAP 9.7
« blib/lib/WWW/Shopify/Liquid/Operator/Regex.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Round.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::Date; use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 0 ▶sub min_arguments { return 1; }
Subroutine min_arguments: not called CC=1 SCAR=6.9
Pod undocumented
7 0 ▶sub max_arguments { return 1; }
Subroutine max_arguments: not called CC=1 SCAR=6.9
Pod undocumented
8 sub operate {
9 0 ▶ my ($self, $hash, $operand, @arguments) = @_;
Subroutine operate: not called CC=4 SCAR=30.0
Pod undocumented
10 0 ▶ return '' unless $operand;
Branch: 1 branch
BranchTrueFalseTotal
unless $operand 0 0 0
11 0 ▶ return DateTime->from_epoch( epoch => $operand )->strftime(@arguments) if $operand && !ref($operand);
Branch: 1 branch
BranchTrueFalseTotal
if $operand and not ref $operand 0 0 0
Condition0%0/3
$operand and not ref $operand
!ll&&!rl&&r
000
MC/DC0%0/2
$operand and not ref $operand
$operand not ref $operand
Truth table0%0/3
A and not(B)
A= $operandB= not ref $operand
ABresult
0X0
100
111
12 0 return $operand->strftime(@arguments);
13 }
14  
15 30 1;
« blib/lib/WWW/Shopify/Liquid/Operator/Regex.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Round.pm »