PivotalTracker/ProjectMembership.pm

filter: Statementstmt 87.1% 27 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod n/a totaltotal 85.0% 34 / 40 CC 1 SCAR 2.0
CC
1
Cov
87%
__ANON__
2.0
_self_uri
2.0
BEGIN
1.0
CRAP 1.2
« PivotalTracker/ProjectIteration.pm ↑ Summary PivotalTracker/Comment.pm »
1 package WebService::PivotalTracker::ProjectMembership;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.12';
8  
9 1 ▶use WebService::PivotalTracker::Person ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use WebService::PivotalTracker::PropertyAttributes;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use WebService::PivotalTracker::Types qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
12 Bool
13 DateTimeObject
14 NonEmptyStr
15 PersonObject
16 PositiveInt
17 1 );
18  
19 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 1 has( @{$_} ) for props_to_attributes(
22 kind => NonEmptyStr,
23 project_id => PositiveInt,
24 id => PositiveInt,
25 last_viewed_at => {
26 type => DateTimeObject,
27 inflator => '_inflate_iso8601_datetime',
28 },
29 created_at => {
30 type => DateTimeObject,
31 inflator => '_inflate_iso8601_datetime',
32 },
33 updated_at => {
34 type => DateTimeObject,
35 inflator => '_inflate_iso8601_datetime',
36 },
37 role => NonEmptyStr,
38 project_color => NonEmptyStr,
39 favorite => Bool,
40 wants_comment_notification_emails => Bool,
41 will_receive_mention_notifications_or_emails => Bool,
42 );
43  
44 has person => (
45 is => 'ro',
46 isa => PersonObject,
47 lazy => 1,
48 0 ▶ default => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 0 my $self = shift;
50 WebService::PivotalTracker::Person->new(
51 pt_api => $self->_pt_api,
52 raw_content => $self->raw_content->{person},
53 0 );
54 },
55 1 );
56  
57 1 with 'WebService::PivotalTracker::Entity';
58  
59 ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
60 0 ▶sub _self_uri {
Subroutine _self_uri: not called CC=1 SCAR=6.9
61 0 my $self = shift;
62  
63 0 return $self->_client->build_uri(
64 sprintf(
65 '/projects/%s/membership/%s',
66 $self->project_id,
67 $self->id,
68 )
69 );
70 }
71 ## use critic
72  
73 1 1;
74  
75 # ABSTRACT: A single project membership
76  
77 __END__
« PivotalTracker/ProjectIteration.pm ↑ Summary PivotalTracker/Comment.pm »