lib/Bb/Collaborate/Ultra/Session/Enrollment.pm

filter: Statementstmt 72.2% 13 / 18 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 11 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 41.4% 17 / 41 CC 6 SCAR 33.4
CC
6
Cov
42%
enrol
42.0
BEGIN
1.0
BEGIN
1.0
CRAP 28.3
↑ Summary lib/Bb/Collaborate/Ultra/DAO.pm »
1 package Bb::Collaborate::Ultra::Session::Enrollment;
2 1 ▶use warnings; use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 extends 'Bb::Collaborate::Ultra::DAO';
5 1 __PACKAGE__->resource('enrollments');
6 1 __PACKAGE__->load_schema(<DATA>);
7  
8 =head1 NAME
9  
10 Bb::Collaborate::Ultra::Session::Enrollment - Session enrollments
11  
12 =head2 METHODS
13  
14 See L<https://xx-csa.bbcollab.com/documentation#Session::Enrollment>
15  
16 =cut
17  
18 =head2 enrol
19  
20 Enrols a given user a session
21  
22 =cut
23  
24 sub enrol {
25 0 ▶ my $self = shift;
Subroutine enrol: not called CC=6 SCAR=37.4
Pod documented
26 0 ▶ my $session = shift || $self->parent
Condition0%0/5
shift() || $self->parent || die('no sesson to enrol in')
l!l
00
shift() or $self->parent
l!l&&r!l&&!r
000
MC/DC0%0/2
shift() || $self->parent || die('no sesson to enrol in')
shift() $self->parent
Truth table0%0/3
A or B
A= shift()B= $self->parent
ABresult
1X1
011
000
27 || die "no sesson to enrol in";
28 0 ▶ my $connection = shift
Branch: 1 branch
BranchTrueFalseTotal
my $connection = shift() || $self->connection || $session->connection or die "not connected" 0 0 0
Condition0%0/6
shift() || $self->connection || $session->connection
l!l&&r!l&&!r
000
shift() or $self->connection
l!l&&r!l&&!r
000
MC/DC0%0/3
shift() || $self->connection || $session->connection
shift() $self->connection $session->connection
Truth table0%0/4
A or B || C
A= shift()B= $self->connectionC= $session->connection
ABCresult
1XX1
01X1
0011
0000
29 || $self->connection
30 || $session->connection
31 or die "not connected";
32 0 my $path = $self->path(parent => $session);
33 0 my $enrolment = $self->post($connection, $self->_raw_data, path => $path);
34 }
35  
36 # downloaded from https://xx-csa.bbcollab.com/documentation
37 1 1;
38 __DATA__
↑ Summary lib/Bb/Collaborate/Ultra/DAO.pm »