Twilio/Exceptions/RestExceptionV1.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 7 / 7 Podpod 100% 4 / 4 totaltotal 100% 34 / 34 CC 3 SCAR 5.1
CC
3
Cov
100%
new
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« Twilio/Exceptions/RestException.pm ↑ Summary Twilio/Http/Response.pm »
1 package Twilio::Exceptions::RestExceptionV1;
2  
3 7 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 # twilio-php has these two as siblings. Here this one inherits, so that code catching a
7 # RestException works with every API, and get_status_code answers on both.
8 7 ▶use parent 'Twilio::Exceptions::RestException';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 7 our $VERSION = '2.001';
11  
12 9 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
13 9 my ($class, $code, $message, $http_status_code, $params, $user_error) = @_;
14 9 my $self = $class->SUPER::new($message, $code, $http_status_code);
15 9 ▶ $self->{params} = $params // {};
Condition100%2/2
$params // {}
l!l
27
MC/DC100%1/1
$params // {}
$params
Truth table100%2/2
A
A= $params
Aresult
11
00
16 9 ▶ $self->{user_error} = $user_error ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$user_error ? : 3 6 9
17 9 return $self;
18 }
19  
20 3 ▶sub get_http_status_code { return $_[0]{status_code} }
Subroutine get_http_status_code: called CC=1 SCAR=0.0
Pod documented
21 2 ▶sub get_params { return $_[0]{params} }
Subroutine get_params: called CC=1 SCAR=0.0
Pod documented
22 3 ▶sub get_user_error { return $_[0]{user_error} }
Subroutine get_user_error: called CC=1 SCAR=0.0
Pod documented
23  
24 7 1;
25  
26 __END__
« Twilio/Exceptions/RestException.pm ↑ Summary Twilio/Http/Response.pm »