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

filter: Statementstmt 71.4% 15 / 21 Branchbran 16.6% 1 / 6 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 3 totaltotal 51.2% 21 / 41 CC 5 SCAR 13.2
CC
5
Cov
57%
confirm
6.0
modifyPassword
6.0
init
3.5
CRAP 3.7
« blib/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/CertificateResetByMail/Custom.pm »
1 package Lemonldap::NG::Portal::Password::Choice;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Lemonldap::NG::Portal::Main::Constants 'PE_ERROR';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 extends qw(
8 Lemonldap::NG::Portal::Lib::Choice
9 Lemonldap::NG::Portal::Password::Base
10 );
11  
12 2 our $VERSION = '2.0.16';
13  
14 6 ▶sub init {
Subroutine init: called CC=3 SCAR=12.5
Pod undocumented
15 6 my ($self) = @_;
16 6 ▶ return 0
Branch: 1 branch
BranchTrueFalseTotal
unless $self->Lemonldap::NG::Portal::Password::Base::init and $self->Lemonldap::NG::Portal::Lib::Choice::init(2) 0 6 6
Condition33%1/3
$self->Lemonldap::NG::Portal::Password::Base::init and $self->Lemonldap::NG::Portal::Lib::Choice::init(2)
!ll&&!rl&&r
006
MC/DC0%0/2
$self->Lemonldap::NG::Portal::Password::Base::init and $self->Lemonldap::NG::Portal::Lib::Choice::init(2)
$self->Lemonldap::NG::Portal::Password::Base::init $self->Lemonldap::NG::Portal::Lib::Choice::init(2)
Truth table33%1/3
A and B
A= $self->Lemonldap::NG::Portal::Password::Base::initB= $self->Lemonldap::NG::Portal::Lib::Choice::init(2)
ABresult
0X0
100
111
17 unless ( $self->Lemonldap::NG::Portal::Password::Base::init()
18 and $self->Lemonldap::NG::Portal::Lib::Choice::init(2) );
19 6 $self->p->{_passwordDB} = $self;
20 }
21  
22 0 ▶sub confirm {
Subroutine confirm: not called CC=2 SCAR=17.9
Pod undocumented
23 0 my ( $self, $req, $pwd ) = @_;
24 0 ▶ $self->checkChoice($req) or return PE_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
$self->checkChoice($req) or return 24 0 0 0
25 0 return $req->data->{enabledMods2}->[0]->confirm( $req, $pwd );
26 }
27  
28 0 ▶sub modifyPassword {
Subroutine modifyPassword: not called CC=2 SCAR=17.9
Pod undocumented
29 0 my ( $self, $req, $pwd, %args ) = @_;
30 0 ▶ $self->checkChoice($req) or return PE_ERROR;
Branch: 1 branch
BranchTrueFalseTotal
$self->checkChoice($req) or return 24 0 0 0
31 0 return $req->data->{enabledMods2}->[0]->modifyPassword( $req, $pwd, %args );
32 }
33  
34 2 1;
« blib/lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/CertificateResetByMail/Custom.pm »