WebApi/Users/Profile.pm

filter: Statementstmt 100% 27 / 27 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 2 totaltotal 92.5% 37 / 40 CC 2 SCAR 1.9
CC
2
Cov
97%
set
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« WebApi/Generator.pm ↑ Summary WebApi/Base.pm »
1 package WebService::Slack::WebApi::Users::Profile;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use feature qw/state/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use parent 'WebService::Slack::WebApi::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 ▶use JSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 3 ▶use WebService::Slack::WebApi::Generator (
Subroutine BEGIN: called CC=1 SCAR=0.0
12 3 get => {
13 include_labels => { isa => 'Bool', optional => 1 },
14 user => { isa => 'Str', optional => 1 },
15 },
16 3 );
17  
18 # override
19 2 ▶sub base_name { 'users.profile' }
Subroutine base_name: called CC=1 SCAR=0.0
Pod undocumented
20  
21 1 ▶sub set {
Subroutine set: called CC=2 SCAR=7.0
Pod undocumented
22 1 state $rule = Data::Validator->new(
23 name => { isa => 'Str', optional => 1 },
24 profile => { isa => 'HashRef', optional => 1 },
25 user => { isa => 'Str', optional => 1 },
26 value => { isa => 'Str', optional => 1 },
27 )->with('Method', 'AllowExtra');
28 1 my ($self, $args, %extra) = $rule->validate(@_);
29  
30 1 ▶ $args->{profile} = encode_json $args->{profile} if exists $args->{profile};
Branch: 1 branch
BranchTrueFalseTotal
if exists $args->{"profile"} 1 0 1
31 1 return $self->request('set', { %$args, %extra });
32 }
33  
34 3 1;
35  
« WebApi/Generator.pm ↑ Summary WebApi/Base.pm »