| 1 | #!/usr/bin/false | ||||||||||||
| 2 | # ABSTRACT: Bugzilla FlagActivity object and service | ||||||||||||
| 3 | # PODNAME: WebService::Bugzilla::FlagActivity | ||||||||||||
| 4 | |||||||||||||
| 5 | package WebService::Bugzilla::FlagActivity 0.001; | ||||||||||||
| 6 | 1 | ▶ | use strictures 2; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 1 | ▶ | use namespace::clean; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 1 | extends 'WebService::Bugzilla::Object'; | |||||||||||
| 11 | |||||||||||||
| 12 | 1 | has attachment_id => (is => 'ro'); | |||||||||||
| 13 | 1 | has bug_id => (is => 'ro'); | |||||||||||
| 14 | 1 | has creation_time => (is => 'ro'); | |||||||||||
| 15 | 1 | has flag_id => (is => 'ro'); | |||||||||||
| 16 | 1 | has requestee => (is => 'ro'); | |||||||||||
| 17 | 1 | has setter => (is => 'ro'); | |||||||||||
| 18 | 1 | has status => (is => 'ro'); | |||||||||||
| 19 | 1 | has type => (is => 'ro'); | |||||||||||
| 20 | |||||||||||||
| 21 | 0 | ▶ | sub _inflate { | ||||||||||
|
Subroutine
_inflate: not called CC=5 SCAR=34.0
| |||||||||||||
| 22 | 0 | my ($self, $raw_array) = @_; | |||||||||||
| 23 | 0 | require WebService::Bugzilla::FlagActivity::Type; | |||||||||||
| 24 | 0 | require WebService::Bugzilla::UserDetail; | |||||||||||
| 25 | return [ | ||||||||||||
| 26 | map { | ||||||||||||
| 27 | 0 | my $r = $_; | |||||||||||
| 28 | $self->new( | ||||||||||||
| 29 | client => $self->client, | ||||||||||||
| 30 | 0 | ▶ | %{ $r }, | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | requestee => ($r->{requestee} | ||||||||||||
| 32 | 0 | ▶ | ? WebService::Bugzilla::UserDetail->new(%{ $r->{requestee} }) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 33 | : undef), | ||||||||||||
| 34 | setter => ($r->{setter} | ||||||||||||
| 35 | 0 | ▶ | ? WebService::Bugzilla::UserDetail->new(%{ $r->{setter} }) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 36 | : undef), | ||||||||||||
| 37 | type => ($r->{type} | ||||||||||||
| 38 | 0 | ? WebService::Bugzilla::FlagActivity::Type->new(%{ $r->{type} }) | |||||||||||
| 39 | : undef), | ||||||||||||
| 40 | ) | ||||||||||||
| 41 | } | ||||||||||||
| 42 | 0 | ▶ | @{ $raw_array // [] } | ||||||||||
|
Condition0%0/2
$raw_array // []
MC/DC0%0/1
$raw_array // []
$raw_array
Truth table0%0/2
A
A= $raw_array
| |||||||||||||
| 43 | ]; | ||||||||||||
| 44 | } | ||||||||||||
| 45 | |||||||||||||
| 46 | 0 | ▶ | sub get { | ||||||||||
|
Subroutine
get: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 47 | 0 | my ($self, %params) = @_; | |||||||||||
| 48 | 0 | my $res = $self->client->get($self->_mkuri('review/flag_activity'), \%params); | |||||||||||
| 49 | 0 | return $self->_inflate($res); | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 0 | ▶ | sub get_by_flag_id { | ||||||||||
|
Subroutine
get_by_flag_id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 53 | 0 | my ($self, $flag_id, %params) = @_; | |||||||||||
| 54 | 0 | my $res = $self->client->get($self->_mkuri("review/flag_activity/$flag_id"), \%params); | |||||||||||
| 55 | 0 | return $self->_inflate($res); | |||||||||||
| 56 | } | ||||||||||||
| 57 | |||||||||||||
| 58 | 0 | ▶ | sub get_by_requestee { | ||||||||||
|
Subroutine
get_by_requestee: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 59 | 0 | my ($self, $requestee, %params) = @_; | |||||||||||
| 60 | 0 | my $res = $self->client->get($self->_mkuri("review/flag_activity/requestee/$requestee"), \%params); | |||||||||||
| 61 | 0 | return $self->_inflate($res); | |||||||||||
| 62 | } | ||||||||||||
| 63 | |||||||||||||
| 64 | 0 | ▶ | sub get_by_setter { | ||||||||||
|
Subroutine
get_by_setter: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 65 | 0 | my ($self, $setter, %params) = @_; | |||||||||||
| 66 | 0 | my $res = $self->client->get($self->_mkuri("review/flag_activity/setter/$setter"), \%params); | |||||||||||
| 67 | 0 | return $self->_inflate($res); | |||||||||||
| 68 | } | ||||||||||||
| 69 | |||||||||||||
| 70 | 0 | ▶ | sub get_by_type_id { | ||||||||||
|
Subroutine
get_by_type_id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 71 | 0 | my ($self, $type_id, %params) = @_; | |||||||||||
| 72 | 0 | my $res = $self->client->get($self->_mkuri("review/flag_activity/type_id/$type_id"), \%params); | |||||||||||
| 73 | 0 | return $self->_inflate($res); | |||||||||||
| 74 | } | ||||||||||||
| 75 | |||||||||||||
| 76 | 0 | ▶ | sub get_by_type_name { | ||||||||||
|
Subroutine
get_by_type_name: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 77 | 0 | my ($self, $type_name, %params) = @_; | |||||||||||
| 78 | 0 | my $res = $self->client->get($self->_mkuri("review/flag_activity/type_name/$type_name"), \%params); | |||||||||||
| 79 | 0 | return $self->_inflate($res); | |||||||||||
| 80 | } | ||||||||||||
| 81 | |||||||||||||
| 82 | 1 | 1; | |||||||||||
| 83 | |||||||||||||
| 84 | __END__ | ||||||||||||