Bot/Object/Chat.pm

filter: Statementstmt 92.5% 25 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 66.6% 2 / 3 totaltotal 86.1% 31 / 36 CC 1 SCAR 2.9
CC
1
Cov
93%
is_user
2.0
is_group
2.0
BEGIN
1.0
CRAP 1.3
« Bot/Object/Video.pm ↑ Summary Bot/Object/Animation.pm »
1 package Telegram::Bot::Object::Chat;
2 5 $Telegram::Bot::Object::Chat::VERSION = '0.029';
3 # ABSTRACT: The base class for Telegram 'Chat' type objects
4  
5  
6 5 ▶use Mojo::Base 'Telegram::Bot::Object::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use Telegram::Bot::Object::ChatPhoto;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Telegram::Bot::Object::Message;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 5 has 'id';
11 5 has 'type';
12 5 has 'title';
13 5 has 'username';
14 5 has 'first_name';
15 5 has 'last_name';
16 5 has 'all_members_are_administrators';
17 5 has 'photo'; #ChatPhoto
18 5 has 'description';
19 5 has 'invite_link';
20 5 has 'pinned_message'; #Message
21 5 has 'sticker_set_name';
22 5 has 'can_set_sticker_set';
23  
24 12 ▶sub fields {
Subroutine fields: called CC=1 SCAR=0.0
Pod undocumented
25 return {
26 12 'scalar' => [qw/id type title username first_name
27 last_name all_members_are_administrators
28 description invite_link sticker_set_name
29 can_set_sticker_set/],
30 'Telegram::Bot::Object::ChatPhoto' => [qw/photo/],
31 'Telegram::Bot::Object::Message' => [qw/pinned_message/],
32 };
33 }
34  
35  
36 0 ▶sub is_user {
Subroutine is_user: not called CC=1 SCAR=6.9
Pod documented
37 0 shift->id > 0;
38 }
39  
40  
41 0 ▶sub is_group {
Subroutine is_group: not called CC=1 SCAR=6.9
Pod documented
42 0 shift->id < 0;
43 }
44  
45 5 1;
46  
47 __END__
« Bot/Object/Video.pm ↑ Summary Bot/Object/Animation.pm »