Bot/Object/InlineQuery.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran n/a Conditioncond 0.0% 0 / 4 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 50.0% 1 / 2 totaltotal 69.2% 27 / 39 CC 3 SCAR 16.3
CC
3
Cov
72%
reply
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« Bot/Brain.pm ↑ Summary Bot/Object/ForceReplyMarkup.pm »
1 package Telegram::Bot::Object::InlineQuery;
2 6 $Telegram::Bot::Object::InlineQuery::VERSION = '0.029';
3 # ABSTRACT: The base class for Telegram 'Invoice' type objects
4  
5  
6 6 ▶use Mojo::Base 'Telegram::Bot::Object::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 6 ▶use Mojo::JSON ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 6 ▶use Telegram::Bot::Object::Location;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 6 ▶use Telegram::Bot::Object::User;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 6 has 'id';
12 6 has 'from'; # User
13 6 has 'query';
14 6 has 'offset';
15 6 has 'chat_type';
16 6 has 'location'; # Location
17  
18 4 ▶sub fields {
Subroutine fields: called CC=1 SCAR=0.0
Pod undocumented
19 return {
20 4 scalar => [qw/id query offset chat_type/],
21 'Telegram::Bot::Object::User' => [qw/from/],
22 'Telegram::Bot::Object::Location' => [qw/location/],
23 };
24 }
25  
26  
27 0 ▶sub reply {
Subroutine reply: not called CC=3 SCAR=24.8
Pod documented
28 0 my $self = shift;
29 0 ▶ my $results = shift // [];
Condition0%0/2
shift() // []
l!l
00
MC/DC0%0/1
shift() // []
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
30 0 ▶ my $args = shift // {};
Condition0%0/2
shift() // {}
l!l
00
MC/DC0%0/1
shift() // {}
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
31  
32 0 return $self->_brain->answerInlineQuery(
33 {
34 inline_query_id => $self->id,
35 results => Mojo::JSON::to_json($results),
36 %$args
37 }
38 );
39 }
40  
41 6 1;
42  
43 __END__
« Bot/Brain.pm ↑ Summary Bot/Object/ForceReplyMarkup.pm »