API/Notification.pm

filter: Statementstmt 72.2% 13 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 64.0% 16 / 25 CC 2 SCAR 11.0
CC
2
Cov
65%
by_code
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« API/Base.pm ↑ Summary API.pm »
1 package PagSeguro::API::Notification;
2 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 3 extends 'PagSeguro::API::Base';
5  
6 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use PagSeguro::API::Transaction;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # attributes
10 3 has code => (is => 'rw');
11 3 has transaction => (is => 'rw');
12  
13 0 ▶sub by_code {
Subroutine by_code: not called CC=2 SCAR=17.9
Pod undocumented
14 0 my $self = shift;
15  
16 0 my $code = shift;
17 0 ▶ croak "error: code cannot be null!" unless $code;
Branch: 1 branch
BranchTrueFalseTotal
unless $code 0 0 0
18  
19 0 my $transaction = PagSeguro::API::Transaction
20 ->new(
21 email => $self->email,
22 token => $self->token,
23 debug => $self->debug,
24 environment => $self->environment
25 );
26  
27 0 return $transaction->by_notification_code($code);
28 }
29  
30 3 1;
31 __END__
« API/Base.pm ↑ Summary API.pm »