Braintree/AdvancedSearch.pm

filter: Statementstmt 63.1% 12 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 57.6% 15 / 26 CC 3 SCAR 18.7
CC
3
Cov
57%
search_to_hash
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
« Braintree/MerchantAccount.pm ↑ Summary Braintree/PaymentMethodGateway.pm »
1 package Net::Braintree::AdvancedSearch;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use vars qw(@ISA @EXPORT_OK);
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 our @ISA = qw(Exporter);
7 1 our @EXPORT_OK = qw(search_to_hash);
8  
9 0 ▶sub search_to_hash {
Subroutine search_to_hash: not called CC=3 SCAR=24.8
Pod undocumented
10 0 my ($self,$search) = @_;
11 0 my $hash = {};
12 0 for my $attribute ($search->meta()->get_all_attributes) {
13 0 my $field = $attribute->name;
14 0 ▶ if ($search->$field->active()) {
Branch: 1 branch
BranchTrueFalseTotal
if ($search->$field->active) 0 0 0
15 0 $hash->{$field} = $search->$field->criteria;
16 }
17 }
18 0 return $hash;
19 }
20  
21 1 1;
« Braintree/MerchantAccount.pm ↑ Summary Braintree/PaymentMethodGateway.pm »