Asana/Project.pm

filter: Statementstmt 65.6% 21 / 32 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 20.0% 2 / 10 Podpod 0.0% 0 / 5 totaltotal 40.3% 23 / 57 CC 6 SCAR 17.0
CC
6
Cov
50%
value_args
12.0
__ANON__
6.0
__ANON__
6.0
CRAP 5.5
« Asana/User.pm ↑ Summary Asana/Tag.pm »
1 package WWW::Asana::Project;
2 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 $WWW::Asana::Project::AUTHORITY = 'cpan:GETTY';
4 }
5 {
6 1 $WWW::Asana::Project::VERSION = '0.003';
7 }
8 # ABSTRACT: Asana Project Class
9  
10 1 ▶use MooX;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 with 'WWW::Asana::Role::HasClient';
13 1 with 'WWW::Asana::Role::HasResponse';
14 1 with 'WWW::Asana::Role::NewFromResponse';
15  
16 1 with 'WWW::Asana::Role::HasFollowers';
17 1 with 'WWW::Asana::Role::HasStories';
18  
19 1 with 'WWW::Asana::Role::CanReload';
20 1 with 'WWW::Asana::Role::CanUpdate';
21  
22 0 ▶sub own_base_args { 'projects', shift->id }
Subroutine own_base_args: not called CC=1 SCAR=6.9
Pod undocumented
23  
24 0 ▶sub reload_base_args { 'Project', 'GET' }
Subroutine reload_base_args: not called CC=1 SCAR=6.9
Pod undocumented
25 0 ▶sub update_args {
Subroutine update_args: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ( $self ) = @_;
27 0 'Project', 'PUT', $self->own_base_args, $self->value_args;
28 }
29 0 ▶sub create_args {
Subroutine create_args: not called CC=1 SCAR=6.9
Pod undocumented
30 0 my ( $self ) = @_;
31 0 'Project', 'POST', 'projects', $self->value_args;
32 }
33 0 ▶sub value_args {
Subroutine value_args: not called CC=3 SCAR=24.8
Pod undocumented
34 0 my ( $self ) = @_;
35 return {
36 0 ▶ workspace => $self->workspace->id,
Branch: 2 branches
BranchTrueFalseTotal
$self->has_name ? : 0 0 0
$self->has_notes ? : 0 0 0
37 $self->has_name ? ( name => $self->name ) : (),
38 $self->has_notes ? ( notes => $self->notes ) : (),
39 };
40 }
41  
42 1 has id => (
43 is => 'ro',
44 predicate => 1,
45 );
46  
47 1 has name => (
48 is => 'ro',
49 predicate => 1,
50 );
51  
52 1 has notes => (
53 is => 'ro',
54 predicate => 1,
55 );
56  
57 1 has archived => (
58 is => 'ro',
59 predicate => 1,
60 );
61  
62 has created_at => (
63 is => 'ro',
64 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
65 0 ▶ die "created_at must be a DateTime" unless ref $_[0] eq 'DateTime';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] eq "DateTime" 0 0 0
66 },
67 1 predicate => 1,
68 );
69  
70 has modified_at => (
71 is => 'ro',
72 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
73 0 ▶ die "modified_at must be a DateTime" unless ref $_[0] eq 'DateTime';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] eq "DateTime" 0 0 0
74 },
75 1 predicate => 1,
76 );
77  
78 has workspace => (
79 is => 'ro',
80 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
81 0 ▶ die "workspace must be a WWW::Asana::Workspace" unless ref $_[0] eq 'WWW::Asana::Workspace';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] eq "WWW::Asana::Workspace" 0 0 0
82 },
83 1 predicate => 1,
84 );
85  
86 1 1;
87  
88 __END__
« Asana/User.pm ↑ Summary Asana/Tag.pm »