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/OneTimeToken.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Password/Choice.pm »
1 package Lemonldap::NG::Portal::UserDB::Choice;
2  
3 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 26 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 26 ▶use Lemonldap::NG::Portal::Main::Constants qw(PE_FIRSTACCESS);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 25 our $VERSION = '2.0.11';
8  
9 25 extends 'Lemonldap::NG::Portal::Lib::Choice';
10  
11 # INITIALIZATION
12  
13 sub init {
14 32 ▶ return $_[0]->SUPER::init(1);
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
15 }
16  
17 # RUNNING METHODS
18  
19 sub getUser {
20 5 ▶ my ( $self, $req, %args ) = @_;
Subroutine getUser: called CC=3 SCAR=11.0
Pod undocumented
21 5 ▶ $self->checkChoice($req) or return PE_FIRSTACCESS;
Branch: 1 branch
BranchTrueFalseTotal
$self->checkChoice($req) or return 9 0 5 5
22 5 my $res = $req->data->{enabledMods1}->[0]->getUser( $req, %args );
23 5 ▶ delete $req->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 1 4 5
24 5 return $res;
25 }
26  
27 sub findUser {
28 0 ▶ my ( $self, $req, %args ) = @_;
Subroutine findUser: not called CC=3 SCAR=24.8
Pod undocumented
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 sub setSessionInfo {
36 4 ▶ my $res = $_[1]->data->{enabledMods1}->[0]->setSessionInfo( $_[1] );
Subroutine setSessionInfo: called CC=2 SCAR=7.1
Pod undocumented
37 4 ▶ delete $_[1]->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 0 4 4
38 4 return $res;
39 }
40  
41 sub setGroups {
42 4 ▶ $_[0]->checkChoice( $_[1] );
Subroutine setGroups: called CC=2 SCAR=7.0
Pod undocumented
43 4 my $res = $_[1]->data->{enabledMods1}->[0]->setGroups( $_[1] );
44 4 ▶ delete $_[1]->pdata->{_choice} if ( $res > 0 );
Branch: 1 branch
BranchTrueFalseTotal
if $res > 0 0 4 4
45 4 return $res;
46 }
47  
48 25 1;
« blib/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Password/Choice.pm »