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

filter: Statementstmt 58.8% 10 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 43.3% 13 / 30 CC 2 SCAR 9.7
CC
2
Cov
53%
operate
6.0
min_arguments
2.0
max_arguments
2.0
CRAP 2.6
« lib/WWW/Shopify/Liquid/Operator/Divide.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/IsArray.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::IReplace;
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 0 ▶sub name { 'ireplace' }
Subroutine name: not called CC=1 SCAR=6.9
Pod undocumented
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]/gi;
15 0 return $str; }
16  
17 38 1;
« lib/WWW/Shopify/Liquid/Operator/Divide.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/IsArray.pm »