lib/WWW/Shopify/Liquid/Tag/RemoveKey.pm

filter: Statementstmt 62.5% 10 / 16 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 36.1% 13 / 36 CC 4 SCAR 22.7
CC
4
Cov
42%
process
20.0
min_arguments
2.0
max_arguments
2.0
CRAP 9.7
« lib/WWW/Shopify/Liquid/Filter/DateMath.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Regex.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::Tag::RemoveKey;
6 38 ▶use base 'WWW::Shopify::Liquid::Tag::Free';
Subroutine BEGIN: called CC=1 SCAR=0.0
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 0 ▶sub process {
Subroutine process: not called CC=4 SCAR=30.0
Pod undocumented
10 0 my ($self, $hash, $action, $pipeline) = @_;
11 0 my ($ref, $inner_hash, $key) = $pipeline->variable_reference($hash, $self->{arguments}->[0]);
12 0 ▶ delete $inner_hash->{$key} if $inner_hash && $key && exists $inner_hash->{$key};
Branch: 1 branch
BranchTrueFalseTotal
if $inner_hash and $key and exists $inner_hash->{$key} 0 0 0
Condition0%0/6
$inner_hash and $key and exists $inner_hash->{$key}
!ll&&!rl&&r
000
$inner_hash and $key
!ll&&!rl&&r
000
MC/DC0%0/3
$inner_hash and $key and exists $inner_hash->{$key}
$inner_hash $key exists $inner_hash->{$key}
Truth table0%0/4
A and B and C
A= $inner_hashB= $keyC= exists $inner_hash->{$key}
ABCresult
0XX0
10X0
1100
1111
13 0 return $self;
14 }
15  
16  
17  
18 38 1;
« lib/WWW/Shopify/Liquid/Filter/DateMath.pm ↑ Summary lib/WWW/Shopify/Liquid/Operator/Regex.pm »