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

filter: Statementstmt 50.0% 10 / 20 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 0.0% 0 / 4 totaltotal 35.1% 13 / 37 CC 4 SCAR 17.0
CC
4
Cov
38%
render
12.0
optimize
6.0
min_arguments
2.0
CRAP 5.5
« lib/WWW/Shopify/Liquid/Filter/Grep.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/DateSetTimeZone.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::Map;
6 38 ▶use base 'WWW::Shopify::Liquid::Filter';
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  
10  
11 0 ▶sub render {
Subroutine render: not called CC=3 SCAR=24.8
Pod undocumented
12 0 my ($self, $renderer, $hash) = @_;
13 0 ▶ my $operand = !$self->is_processed($self->{operand}) ? $self->{operand}->render($renderer, $hash) : $self->{operand};
Branch: 1 branch
BranchTrueFalseTotal
!$self->is_processed($self->{'operand'}) ? : 0 0 0
14 0 ▶ my @results = map { $self->{arguments}->[0]->render($renderer, { %$hash, op => $_ }) } (ref($operand) ? @$operand : $operand);
Branch: 1 branch
BranchTrueFalseTotal
ref $operand ? : 0 0 0
15 0 return [@results];
16 }
17  
18 0 ▶sub optimize {
Subroutine optimize: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my ($self, $optimizer, $hash) = @_;
20 0 ▶ $self->{operand} = $self->{operand}->optimize($optimizer, $hash) unless $self->is_processed($self->{operand});
Branch: 1 branch
BranchTrueFalseTotal
unless $self->is_processed($self->{"operand"}) 0 0 0
21 0 return $self;
22 }
23  
24 38 1;
« lib/WWW/Shopify/Liquid/Filter/Grep.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/DateSetTimeZone.pm »