Lite/Types.pm

filter: Statementstmt 86.4% 32 / 37 Branchbran 20.0% 2 / 10 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 58.3% 7 / 12 Podpod n/a totaltotal 55.4% 41 / 74 CC 9 SCAR 15.7
CC
9
Cov
61%
__ANON__
8.7
__ANON__
8.7
__ANON__
8.7
CRAP 4.8
« Lite/RelyingParty/Discover/Method/URL.pm ↑ Summary Lite/RelyingParty/Associator/Base.pm »
1 package OpenID::Lite::Types;
2  
3 3 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Any::Moose (
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 'X::Types' => [ -declare => [
6 qw(
7 AssocHandle
8 AssocType
9 SessionType
10 AuthRequestMode
11 AuthResponseMode
12 ProviderResponseType
13 )
14 ] ],
15 'X::Types::'.any_moose(), [qw(Str)],
16 3 );
17  
18 3 ▶use OpenID::Lite::Constants::AssocType qw(HMAC_SHA1 HMAC_SHA256);
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶use OpenID::Lite::Constants::SessionType qw(NO_ENCRYPTION DH_SHA1 DH_SHA256);
Subroutine BEGIN: called CC=1 SCAR=0.0
20 use OpenID::Lite::Constants::ModeType
21 3 ▶ qw(CHECKID_SETUP CHECKID_IMMEDIATE ID_RES SETUP_NEEDED CANCEL);
Subroutine BEGIN: called CC=1 SCAR=0.0
22 3 ▶use OpenID::Lite::Constants::ProviderResponseType qw(DIRECT REDIRECT SETUP);
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 3 do {
25 subtype AssocHandle,
26 as Str,
27 0 ▶ where { $_ =~ /^[\x21-\x7e]{1,255}$/ };
Subroutine __ANON__: not called CC=1 SCAR=1.2
28 };
29  
30 3 do {
31 subtype AssocType,
32 as Str,
33 32 ▶ where { $_ eq HMAC_SHA1 || $_ eq HMAC_SHA256 };
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_ eq "HMAC-SHA1" or $_ eq "HMAC-SHA256" 24 8 32
34 };
35  
36 3 do {
37 subtype SessionType,
38 as Str,
39 0 ▶ where { $_ eq NO_ENCRYPTION || $_ eq DH_SHA1 || $_ eq DH_SHA256 };
Subroutine __ANON__: not called CC=3 SCAR=21.6
Branch: 1 branch
BranchTrueFalseTotal
$_ eq "no-encryption" or $_ eq "DH-SHA1" or $_ eq "DH-SHA256" 0 0 0
Condition0%0/3
$_ eq "no-encryption" or $_ eq "DH-SHA1"
l!l&&r!l&&!r
000
MC/DC0%0/2
$_ eq "no-encryption" or $_ eq "DH-SHA1"
$_ eq "no-encryption" $_ eq "DH-SHA1"
Truth table0%0/3
A or B
A= $_ eq "no-encryption"B= $_ eq "DH-SHA1"
ABresult
1X1
011
000
40 };
41  
42 3 do {
43 subtype AuthRequestMode,
44 as Str,
45 0 ▶ where { $_ eq CHECKID_SETUP || $_ eq CHECKID_IMMEDIATE };
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ eq "checkid_setup" or $_ eq "checkid_immediate" 0 0 0
46 };
47  
48 3 do {
49 subtype AuthResponseMode,
50 as Str,
51 0 ▶ where { $_ eq ID_RES || $_ eq SETUP_NEEDED || $_ eq CANCEL };
Subroutine __ANON__: not called CC=3 SCAR=21.6
Branch: 1 branch
BranchTrueFalseTotal
$_ eq "id_res" or $_ eq "setup_needed" or $_ eq "cancel" 0 0 0
Condition0%0/3
$_ eq "id_res" or $_ eq "setup_needed"
l!l&&r!l&&!r
000
MC/DC0%0/2
$_ eq "id_res" or $_ eq "setup_needed"
$_ eq "id_res" $_ eq "setup_needed"
Truth table0%0/3
A or B
A= $_ eq "id_res"B= $_ eq "setup_needed"
ABresult
1X1
011
000
52 };
53  
54 3 do {
55 subtype ProviderResponseType,
56 as Str,
57 0 ▶ where { $_ eq DIRECT || $_ eq REDIRECT || $_ eq SETUP };
Subroutine __ANON__: not called CC=3 SCAR=21.6
Branch: 1 branch
BranchTrueFalseTotal
$_ eq "direct" or $_ eq "redirect" or $_ eq "setup" 0 0 0
Condition0%0/3
$_ eq "direct" or $_ eq "redirect"
l!l&&r!l&&!r
000
MC/DC0%0/2
$_ eq "direct" or $_ eq "redirect"
$_ eq "direct" $_ eq "redirect"
Truth table0%0/3
A or B
A= $_ eq "direct"B= $_ eq "redirect"
ABresult
1X1
011
000
58 };
59  
60 3 1;
61  
« Lite/RelyingParty/Discover/Method/URL.pm ↑ Summary Lite/RelyingParty/Associator/Base.pm »