Slack/Event/PresenceChange.pm

filter: Statementstmt 75.0% 12 / 16 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 50.0% 16 / 32 CC 2 SCAR 9.2
CC
2
Cov
63%
user
6.0
user_id
2.0
presence
2.0
CRAP 2.5
« Slack/Event/Message.pm ↑ Summary Slack/Event/ReconnectURL.pm »
1 package Net::Async::Slack::Event::PresenceChange;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 our $VERSION = '0.015'; # VERSION
7  
8 4 ▶use Net::Async::Slack::EventType;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 =head1 DESCRIPTION
11  
12 {
13 "type":"presence_change",
14 "presence":"active",
15 "user":"U5GSPCF1C"
16 }
17  
18 =cut
19  
20 0 ▶sub user {
Subroutine user: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my ($self) = @_;
22 0 ▶ $self->{user} //= $self->slack->user_info($self->user_id)
Condition0%0/3
$self->{"user"} //= $self->slack->user_info($self->user_id)
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{"user"} //= $self->slack->user_info($self->user_id)
$self->{"user"} $self->slack->user_info($self->user_id)
Truth table0%0/3
A //= B
A= $self->{"user"}B= $self->slack->user_info($self->user_id)
ABresult
1X1
011
000
23 }
24 0 ▶sub user_id { shift->{user_id} }
Subroutine user_id: not called CC=1 SCAR=6.9
Pod undocumented
25  
26 0 ▶sub presence { shift->{presence} }
Subroutine presence: not called CC=1 SCAR=6.9
Pod undocumented
27  
28 8 ▶sub type { 'presence_change' }
Subroutine type: called CC=1 SCAR=0.0
Pod undocumented
29  
30 4 1;
31  
« Slack/Event/Message.pm ↑ Summary Slack/Event/ReconnectURL.pm »