Mattermost/V4/API/Object/User/Session.pm

filter: Statementstmt 76.4% 13 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod n/a totaltotal 60.0% 15 / 25 CC 2 SCAR 10.5
CC
2
Cov
68%
_build_is_oauth
6.0
_build_device_id
2.0
_build_team_members
2.0
CRAP 2.9
« Mattermost/V4/API/Object/Plugin.pm ↑ Summary Mattermost/V4/API/Object/Team.pm »
1 package WebService::Mattermost::V4::API::Object::User::Session;
2  
3 # ABSTRACT: A user session item.
4  
5 12 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use Types::Standard qw(ArrayRef Bool Maybe Str);
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 extends 'WebService::Mattermost::V4::API::Object';
9 12 with qw(
10 WebService::Mattermost::V4::API::Object::Role::BelongingToUser
11 WebService::Mattermost::V4::API::Object::Role::CreatedAt
12 WebService::Mattermost::V4::API::Object::Role::ExpiresAt
13 WebService::Mattermost::V4::API::Object::Role::ID
14 WebService::Mattermost::V4::API::Object::Role::LastActivityAt
15 WebService::Mattermost::V4::API::Object::Role::Props
16 WebService::Mattermost::V4::API::Object::Role::Roles
17 );
18  
19 ################################################################################
20  
21 12 has device_id => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
22 12 has is_oauth => (is => 'ro', isa => Maybe[Bool], lazy => 1, builder => 1);
23 12 has team_members => (is => 'ro', isa => Maybe[ArrayRef], lazy => 1, builder => 1);
24 12 has token => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
25  
26 ################################################################################
27  
28 0 ▶sub _build_device_id { shift->raw_data->{device_id} }
Subroutine _build_device_id: not called CC=1 SCAR=6.9
29 0 ▶sub _build_is_oauth { shift->raw_data->{is_oauth} ? 1 : 0 }
Subroutine _build_is_oauth: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
+(shift())->raw_data->{'is_oauth'} ? : 0 0 0
30 0 ▶sub _build_team_members { shift->raw_data->{team_members} }
Subroutine _build_team_members: not called CC=1 SCAR=6.9
31 0 ▶sub _build_token { shift->raw_data->{token} }
Subroutine _build_token: not called CC=1 SCAR=6.9
32  
33 ################################################################################
34  
35 12 1;
36  
37 __END__
38  
39 =pod
40  
41 =encoding UTF-8
42  
43 =head1 NAME
44  
45 WebService::Mattermost::V4::API::Object::User::Session - A user session item.
46  
47 =head1 VERSION
48  
49 version 0.28
50  
51 =head1 DESCRIPTION
52  
53 =head2 METHODS
54  
55 =over 4
56  
57 =item C<device_id>
58  
59 =item C<is_oauth>
60  
61 =item C<team_members>
62  
63 =item C<token>
64  
65 =back
66  
67 =head1 SEE ALSO
68  
69 =over 4
70  
71 =item L<WebService::Mattermost::V4::API::Object::Role::BelongingToUser>
72  
73 =item L<WebService::Mattermost::V4::API::Object::Role::CreatedAt>
74  
75 =item L<WebService::Mattermost::V4::API::Object::Role::ExpiresAt>
76  
77 =item L<WebService::Mattermost::V4::API::Object::Role::ID>
78  
79 =item L<WebService::Mattermost::V4::API::Object::Role::LastActivityAt>
80  
81 =item L<WebService::Mattermost::V4::API::Object::Role::Props>
82  
83 =back
84  
85 =head1 AUTHOR
86  
87 Mike Jones <mike@netsplit.org.uk>
88  
89 =head1 COPYRIGHT AND LICENSE
90  
91 This software is Copyright (c) 2020 by Mike Jones.
92  
93 This is free software, licensed under:
94  
95 The MIT (X11) License
96  
97 =cut
« Mattermost/V4/API/Object/Plugin.pm ↑ Summary Mattermost/V4/API/Object/Team.pm »