Asana/Story.pm

filter: Statementstmt 66.6% 18 / 27 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 22.2% 2 / 9 Podpod 0.0% 0 / 2 totaltotal 37.7% 20 / 53 CC 7 SCAR 17.9
CC
7
Cov
45%
__ANON__
12.0
__ANON__
6.0
__ANON__
6.0
CRAP 6.0
« Asana/Role/HasFollowers.pm ↑ Summary Asana/User.pm »
1 package WWW::Asana::Story;
2 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 $WWW::Asana::Story::AUTHORITY = 'cpan:GETTY';
4 }
5 {
6 1 $WWW::Asana::Story::VERSION = '0.003';
7 }
8 # ABSTRACT: Asana Story 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::CanReload';
17  
18 0 ▶sub own_base_args { 'tags', shift->id }
Subroutine own_base_args: not called CC=1 SCAR=6.9
Pod undocumented
19  
20 0 ▶sub reload_base_args { 'Tag', 'GET' }
Subroutine reload_base_args: not called CC=1 SCAR=6.9
Pod undocumented
21  
22 1 has id => (
23 is => 'ro',
24 predicate => 1,
25 );
26  
27 1 has text => (
28 is => 'ro',
29 predicate => 1,
30 );
31  
32 has type => (
33 is => 'ro',
34 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
35 0 ▶ die "type must be 'comment' or 'system'" unless grep { $_[0] eq $_ } qw( comment system );
Branch: 1 branch
BranchTrueFalseTotal
unless grep {$_[0] eq $_;} "comment", "system" 0 0 0
36 },
37 1 predicate => 1,
38 );
39  
40 has source => (
41 is => 'ro',
42 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
43 die "source must be web, email, mobile, api or unknown"
44 0 ▶ unless grep { $_[0] eq $_ } qw( web email mobile api unknown );
Branch: 1 branch
BranchTrueFalseTotal
unless grep {$_[0] eq $_;} "web", "email", "mobile", "api", "unknown" 0 0 0
45 },
46 1 predicate => 1,
47 );
48  
49 has target => (
50 is => 'ro',
51 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
52 0 ▶ die "target must be a WWW::Asana::Task or WWW::Asana::Project"
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] eq "WWW::Asana::Task" or ref $_[0] eq "WWW::Asana::Project" 0 0 0
Condition0%0/3
ref $_[0] eq "WWW::Asana::Task" or ref $_[0] eq "WWW::Asana::Project"
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] eq "WWW::Asana::Task" or ref $_[0] eq "WWW::Asana::Project"
ref $_[0] eq "WWW::Asana::Task" ref $_[0] eq "WWW::Asana::Project"
Truth table0%0/3
A or B
A= ref $_[0] eq "WWW::Asana::Task"B= ref $_[0] eq "WWW::Asana::Project"
ABresult
1X1
011
000
53 unless ref $_[0] eq 'WWW::Asana::Task' or ref $_[0] eq 'WWW::Asana::Project';
54 },
55 1 required => 1,
56 );
57  
58 has created_by => (
59 is => 'ro',
60 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
61 0 ▶ die "created_by must be a WWW::Asana::User" unless ref $_[0] eq 'WWW::Asana::User';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] eq "WWW::Asana::User" 0 0 0
62 },
63 1 predicate => 1,
64 );
65  
66 has created_at => (
67 is => 'ro',
68 0 ▶ isa => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
69 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
70 },
71 1 predicate => 1,
72 );
73  
74 1 1;
75  
76 __END__
« Asana/Role/HasFollowers.pm ↑ Summary Asana/User.pm »