blib/lib/Lemonldap/NG/Portal/UserDB/Choice.pm

filter: Statementstmt 83.3% 25 / 30 Branchbran 41.6% 5 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 5 totaltotal 67.2% 37 / 55 CC 7 SCAR 14.1
CC
7
Cov
71%
findUser
12.0
getUser
3.0
setSessionInfo
2.0
CRAP 4.1
« blib/lib/Lemonldap/NG/Portal/Lib/Okta.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm »
1 package Lemonldap::NG::Portal::UserDB::Choice;
2  
3 28 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 28 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 28 ▶use Lemonldap::NG::Portal::Main::Constants qw(PE_FIRSTACCESS);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 27 our $VERSION = '2.0.11';
8  
9 27 extends 'Lemonldap::NG::Portal::Lib::Choice';
10  
11 # INITIALIZATION
12  
13 58 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
14 58 return $_[0]->SUPER::init(1);
15 }
16  
17 # RUNNING METHODS
18  
19 24 ▶sub getUser {
Subroutine getUser: called CC=3 SCAR=11.0
Pod undocumented
20 24 my ( $self, $req, %args ) = @_;
21 24 ▶ $self->checkChoice($req) or return PE_FIRSTACCESS;
Branch: 1 branch
BranchTrueFalseTotal
$self->checkChoice($req) or return 9 24 0 24
22 24 my $res = $req->data->{enabledMods1}->[0]->getUser( $req, %args );
23 24 ▶ delete $req->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 4 20 24
24 24 return $res;
25 }
26  
27 0 ▶sub findUser {
Subroutine findUser: not called CC=3 SCAR=24.8
Pod undocumented
28 0 my ( $self, $req, %args ) = @_;
29 0 ▶ $self->checkChoice($req) or return PE_FIRSTACCESS;
Branch: 1 branch
BranchTrueFalseTotal
$self->checkChoice($req) or return 9 0 0 0
30 0 my $res = $req->data->{enabledMods1}->[0]->findUser( $req, %args );
31 0 ▶ delete $req->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 0 0 0
32 0 return $res;
33 }
34  
35 16 ▶sub setSessionInfo {
Subroutine setSessionInfo: called CC=2 SCAR=7.1
Pod undocumented
36 16 my $res = $_[1]->data->{enabledMods1}->[0]->setSessionInfo( $_[1] );
37 16 ▶ delete $_[1]->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 0 16 16
38 16 return $res;
39 }
40  
41 15 ▶sub setGroups {
Subroutine setGroups: called CC=2 SCAR=7.0
Pod undocumented
42 15 $_[0]->checkChoice( $_[1] );
43 15 my $res = $_[1]->data->{enabledMods1}->[0]->setGroups( $_[1] );
44 15 ▶ delete $_[1]->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 0 15 15
45 15 return $res;
46 }
47  
48 27 1;
« blib/lib/Lemonldap/NG/Portal/Lib/Okta.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm »