Twilio/Jwt/Grants/Grant.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 85.7% 6 / 7 Podpod 100% 4 / 4 totaltotal 94.4% 34 / 36 CC 4 SCAR 8.3
CC
4
Cov
96%
get_payload
4.0
payload_fields
2.0
BEGIN
1.0
CRAP 2.3
« Twilio/Jwt/ClientToken.pm ↑ Summary Twilio/InstanceResource.pm »
1 package Twilio::Jwt::Grants::Grant;
2  
3 2 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our $VERSION = '2.001';
9  
10 19 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
11 19 my ($class) = @_;
12 19 return bless {}, $class;
13 }
14  
15 1 ▶sub get_grant_key {
Subroutine get_grant_key: called CC=1 SCAR=0.0
Pod documented
16 1 my ($self) = @_;
17 1 croak ref($self) . ' must implement get_grant_key';
18 }
19  
20 22 ▶sub get_payload {
Subroutine get_payload: called CC=4 SCAR=13.9
Pod documented
21 22 my ($self) = @_;
22  
23 22 my %payload;
24 22 for my $field ($self->payload_fields) {
25 49 ▶ $payload{$field} = $self->{$field} if length($self->{$field} // q{});
Branch: 1 branch
BranchTrueFalseTotal
if length($self->{$field} // "") 26 23 49
Condition100%2/2
$self->{$field} // ""
l!l
2623
MC/DC100%1/1
$self->{$field} // ""
$self->{$field}
Truth table100%2/2
A
A= $self->{$field}
Aresult
11
00
26 }
27 22 return \%payload;
28 }
29  
30 0 ▶sub payload_fields { return }
Subroutine payload_fields: not called CC=1 SCAR=6.9
Pod documented
31  
32 2 1;
33  
34 __END__
« Twilio/Jwt/ClientToken.pm ↑ Summary Twilio/InstanceResource.pm »