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

filter: Statementstmt 32.2% 10 / 31 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 23.0% 3 / 13 Podpod 0.0% 0 / 10 totaltotal 18.8% 13 / 69 CC 7 SCAR 16.3
CC
7
Cov
23%
process
12.0
abstract
6.0
new
6.0
CRAP 5.1
« lib/WWW/Shopify/Liquid/Filter/DateSetTimeZone.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/MD5.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::Enclosing;
6 38 ▶use base 'WWW::Shopify::Liquid::Tag';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 0 ▶sub abstract { my $package = ref($_[0]) ? ref($_[0]) : $_[0]; return ($package eq __PACKAGE__); }
Subroutine abstract: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] ? : 0 0 0
8 0 ▶sub is_enclosing { return 1; }
Subroutine is_enclosing: not called CC=1 SCAR=6.9
Pod undocumented
9 0 ▶sub inner_tags { return (); }
Subroutine inner_tags: not called CC=1 SCAR=6.9
Pod undocumented
10 0 ▶sub inner_ignore_whitespace { return 0; }
Subroutine inner_ignore_whitespace: not called CC=1 SCAR=6.9
Pod undocumented
11 # Interprets the inner of this tag as being completely text. Used for comments and raws.
12 0 ▶sub inner_halt_lexing { return 0; }
Subroutine inner_halt_lexing: not called CC=1 SCAR=6.9
Pod undocumented
13 0 ▶sub subelements { qw(contents arguments) }
Subroutine subelements: not called CC=1 SCAR=6.9
Pod undocumented
14  
15 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
16 0 my ($package, $line, $tag, $arguments, $contents) = @_;
17 0 my $self = { line => $line, core => $tag, arguments => $arguments, contents => @{$contents->[0]} };
18 0 ▶ die new WWW::Shopify::Liquid::Exception::Parser($self, "Uncustomized tags can only have one element following their contents.") unless int(@$contents) == 1;
Branch: 1 branch
BranchTrueFalseTotal
unless int @$contents == 1 0 0 0
19 0 return bless $self, $package;
20 }
21  
22 0 ▶sub strip_left_end { $_[0]->{strip_left_end} = $_[1] if @_ > 1; return $_[0]->{strip_left_end}; }
Subroutine strip_left_end: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
23 0 ▶sub strip_right_end { $_[0]->{strip_right_end} = $_[1] if @_ > 1; return $_[0]->{strip_right_end}; }
Subroutine strip_right_end: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 0 0
24  
25  
26 0 ▶sub process {
Subroutine process: not called CC=3 SCAR=24.8
Pod undocumented
27 0 my ($self, $hash, $action, $pipeline) = @_;
28 0 my ($contents, $arguments) = $self->process_subelements($hash, $action, $pipeline);
29 0 ▶ return $self unless $self->is_processed($contents) && int(grep { !$self->is_processed($_) } @$arguments) == 0;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->is_processed($contents) and int grep({not $self->is_processed($_);} @$arguments) == 0 0 0 0
Condition0%0/3
$self->is_processed($contents) and int grep({not $self->is_processed($_);} @$arguments) == 0
!ll&&!rl&&r
000
MC/DC0%0/2
$self->is_processed($contents) and int grep({not $self->is_processed($_);} @$arguments) == 0
$self->is_processed($contents) int grep({not $self->is_processed($_);} @$arguments) == 0
Truth table0%0/3
A and B
A= $self->is_processed($contents)B= int grep({not $self->is_processed($_);} @$arguments) == 0
ABresult
0X0
100
111
30 0 return $self->operate($hash, $contents, @$arguments);
31 }
32  
33 37 1;
« lib/WWW/Shopify/Liquid/Filter/DateSetTimeZone.pm ↑ Summary lib/WWW/Shopify/Liquid/Filter/MD5.pm »