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

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 44.8% 13 / 29 CC 3 SCAR 16.8
CC
3
Cov
50%
operate
12.0
min_arguments
2.0
max_arguments
2.0
CRAP 5.4
« blib/lib/WWW/Shopify/Liquid/Filter/Map.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/MD5.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::LinkTo; use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
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, $link) = @_;
Subroutine operate: not called CC=3 SCAR=24.8
Pod undocumented
12 0 ▶ $operand = '' unless defined $operand;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $operand 0 0 0
13 0 ▶ $link = '' unless defined $link;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $link 0 0 0
14 0 return "<a href='" . $link . "'>" . $operand . "</a>";
15 }
16  
17 30 1;
« blib/lib/WWW/Shopify/Liquid/Filter/Map.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/MD5.pm »