lib/WebService/Async/Onfido/Check.pm

filter: Statementstmt 88.0% 22 / 25 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 80.0% 8 / 10 Podpod 0.0% 0 / 5 totaltotal 69.7% 30 / 43 CC 2 SCAR 6.9
CC
2
Cov
81%
applicant
6.0
as_string
2.0
BEGIN
1.0
CRAP 2.0
« lib/WebService/Async/Onfido.pm ↑ Summary lib/WebService/Async/Onfido/Base/Applicant.pm »
1 package WebService::Async::Onfido::Check;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 ▶use parent qw(WebService::Async::Onfido::Base::Check);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 our $VERSION = '0.007'; # VERSION
9  
10 =head1 NAME
11  
12 WebService::Async::Onfido::Check - represents data for Onfido
13  
14 =head1 DESCRIPTION
15  
16 =cut
17  
18 4 ▶use Log::Any qw($log);
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶sub as_string {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod undocumented
21 0 my ($self) = @_;
22  
23 0 return sprintf 'Check %s, result was %s (created %s as ID %s)', $self->status, $self->result, $self->created_at, $self->id;
24 }
25  
26 0 ▶sub applicant { return shift->{applicant} // die 'no applicant defined' }
Subroutine applicant: not called CC=2 SCAR=17.9
Pod undocumented
Condition0%0/2
+(shift())->{"applicant"} // die("no applicant defined")
l!l
00
MC/DC0%0/1
+(shift())->{"applicant"} // die("no applicant defined")
+(shift())->{"applicant"}
Truth table0%0/2
A
A= +(shift())->{"applicant"}
Aresult
11
00
27  
28 3 ▶sub onfido { return shift->{onfido} }
Subroutine onfido: called CC=1 SCAR=0.0
Pod undocumented
29  
30 1 ▶sub reports {
Subroutine reports: called CC=1 SCAR=0.0
Pod undocumented
31 1 my ($self, %args) = @_;
32  
33 # return Ryu::Source->from($self->{reports}) if $self->{reports};
34 return $self->onfido->report_list(
35 check_id => $self->id,
36 %args
37 1 ▶ )->map(sub { $log->debugf('Have report %s', $_->as_string); $_->{check} = $self; $_ });
Subroutine __ANON__: called CC=1 SCAR=0.0
38 }
39  
40 1 ▶sub download {
Subroutine download: called CC=1 SCAR=0.0
Pod undocumented
41 1 my ($self) = @_;
42  
43 1 return $self->onfido->download_check(
44 check_id => $self->id,
45 );
46 }
47  
48 4 1;
49  
50 __END__
« lib/WebService/Async/Onfido.pm ↑ Summary lib/WebService/Async/Onfido/Base/Applicant.pm »