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

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 48.1% 13 / 27 CC 2 SCAR 10.0
CC
2
Cov
56%
operate
6.0
min_arguments
2.0
max_arguments
2.0
CRAP 2.7
« lib/WWW/Shopify/Liquid/Tag/Whitespace.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Divide.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 package WWW::Shopify::Liquid::Filter::Replace;
6 38 ▶use base 'WWW::Shopify::Liquid::Filter';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 0 ▶sub min_arguments { return 2; }
Subroutine min_arguments: not called CC=1 SCAR=6.9
Pod undocumented
9 0 ▶sub max_arguments { return 2; }
Subroutine max_arguments: not called CC=1 SCAR=6.9
Pod undocumented
10  
11 0 ▶sub operate {
Subroutine operate: not called CC=2 SCAR=17.9
Pod undocumented
12 0 my $str = $_[2];
13 0 ▶ return undef unless defined $str;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $str 0 0 0
14 0 $str =~ s/$_[3]/$_[4]/g;
15 0 return $str; }
16  
17 38 1;
« lib/WWW/Shopify/Liquid/Tag/Whitespace.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Divide.pm »