Twilio/Base/PhoneNumberCapabilities.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 6 / 6 totaltotal 100% 35 / 35 CC 2 SCAR 2.0
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Twilio/Rest/Numbers/V2/BulkHostedNumberOrder.pm ↑ Summary Twilio/Rest/Voice/V1/DialingPermissions.pm »
1 package Twilio::Base::PhoneNumberCapabilities;
2  
3 14 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 14 our $VERSION = '2.001';
7  
8 14 my @CAPABILITIES = qw(fax mms sms voice);
9  
10 43 ▶sub capabilities {
Subroutine capabilities: called CC=1 SCAR=0.0
Pod documented
11 43 return @CAPABILITIES;
12 }
13  
14 42 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
15 42 my ($class, $capabilities) = @_;
16  
17 # Available numbers send MMS and SMS in upper case, and the numbers you own send them in
18 # lower case.
19 42 my %lower_case = map { lc $_ => $capabilities->{$_} } keys %{$capabilities};
20 42 ▶ return bless { map { $_ => $lower_case{$_} ? 1 : 0 } @CAPABILITIES }, $class;
Branch: 1 branch
BranchTrueFalseTotal
$lower_case{$_} ? : 79 89 168
21 }
22  
23 3 ▶sub fax { return $_[0]{fax} }
Subroutine fax: called CC=1 SCAR=0.0
Pod documented
24 4 ▶sub mms { return $_[0]{mms} }
Subroutine mms: called CC=1 SCAR=0.0
Pod documented
25 6 ▶sub sms { return $_[0]{sms} }
Subroutine sms: called CC=1 SCAR=0.0
Pod documented
26 4 ▶sub voice { return $_[0]{voice} }
Subroutine voice: called CC=1 SCAR=0.0
Pod documented
27  
28 14 1;
29  
30 __END__
« Twilio/Rest/Numbers/V2/BulkHostedNumberOrder.pm ↑ Summary Twilio/Rest/Voice/V1/DialingPermissions.pm »