blib/lib/WWW/Shopify/Model/Comment.pm

filter: Statementstmt 30.4% 21 / 69 Branchbran 2.5% 1 / 40 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 27.2% 9 / 33 Podpod 23.0% 6 / 26 totaltotal 22.0% 37 / 168 CC 20 SCAR 16.8
CC
20
Cov
20%
__ANON__
20.0
approve
5.5
article_id
5.5
CRAP 5.4
« blib/lib/WWW/Shopify/Model/Locale.pm ↑ Summary blib/lib/WWW/Shopify/Model/Transaction/Receipt.pm »
1 #!/usr/bin/perl
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  
6 1 ▶use WWW::Shopify;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 package WWW::Shopify::Model::Comment;
9 1 ▶use parent 'WWW::Shopify::Model::Item';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 43 ▶my $fields; sub fields { return $fields; }
Subroutine fields: called CC=1 SCAR=0.0
Pod documented
12 1 ▶BEGIN { $fields = {
Subroutine BEGIN: called CC=1 SCAR=0.0
13 "article_id" => new WWW::Shopify::Field::Relation::Parent("WWW::Shopify::Model::Article"),
14 "blog_id" => new WWW::Shopify::Field::Relation::ReferenceOne("WWW::Shopify::Model::Blog"),
15 "body" => new WWW::Shopify::Field::Text(),
16 "body_html" => new WWW::Shopify::Field::Text::HTML(),
17 "created_at" => new WWW::Shopify::Field::Date(min => '2010-01-01 00:00:00'),
18 "email" => new WWW::Shopify::Field::String::Email(),
19 "id" => new WWW::Shopify::Field::Identifier(),
20 "ip" => new WWW::Shopify::Field::String::IPAddress(),
21 "published_at" => new WWW::Shopify::Field::Date(min => '2010-01-01 00:00:00'),
22 "status" => new WWW::Shopify::Field::String::Enum([qw(removed unapproved published spam)]),
23 "updated_at" => new WWW::Shopify::Field::Date(min => '2010-01-01 00:00:00'),
24 "user_agent" => new WWW::Shopify::Field::String::Enum(["Mozilla/5.0"]),
25  
26 }; }
27  
28 12 ▶my $queries; sub queries { return $queries; }
Subroutine queries: called CC=1 SCAR=0.0
Pod documented
29 BEGIN { $queries = {
30 article_id => new WWW::Shopify::Query::Match('article_id'),
31 blog_id => new WWW::Shopify::Query::Match('blog_id'),
32 since_id => new WWW::Shopify::Query::LowerBound('id'),
33 published_status => new WWW::Shopify::Query::Custom("published_status", sub {
34 0 ▶ my ($rs, $value) = @_;
Subroutine __ANON__: not called CC=4 SCAR=30.0
35 0 ▶ return $rs->search({ 'status' => 'published' }) if $value eq "published";
Branch: 1 branch
BranchTrueFalseTotal
if $value eq "published" 0 0 0
36 0 ▶ return $rs->search({ 'status' => { '!=' => 'published' } }) if $value eq "unpublished";
Branch: 1 branch
BranchTrueFalseTotal
if $value eq "unpublished" 0 0 0
37 0 ▶ return $rs if $value eq "any";
Branch: 1 branch
BranchTrueFalseTotal
if $value eq "any" 0 0 0
38 0 die new WWW::Shopify::Exception("Unknown published status: $value.");
39 1 ▶ }),
Subroutine BEGIN: called CC=1 SCAR=0.0
40 status => new WWW::Shopify::Query::Match('status'),
41 created_at_min => new WWW::Shopify::Query::LowerBound('created_at'),
42 created_at_max => new WWW::Shopify::Query::UpperBound('created_at'),
43 updated_at_min => new WWW::Shopify::Query::LowerBound('updated_at'),
44 updated_at_max => new WWW::Shopify::Query::UpperBound('updated_at'),
45 published_at_min => new WWW::Shopify::Query::LowerBound('published_at'),
46 published_at_max => new WWW::Shopify::Query::UpperBound('published_at'),
47 }; }
48  
49 0 ▶sub updatable { return undef; }
Subroutine updatable: not called CC=1 SCAR=6.9
Pod documented
50 0 ▶sub deletable { return undef; }
Subroutine deletable: not called CC=1 SCAR=6.9
Pod documented
51 0 ▶sub parent { return "WWW::Shopify::Model::Article" }
Subroutine parent: not called CC=1 SCAR=6.9
Pod documented
52 1 ▶sub actions { return qw(remove approve not_spam spam); }
Subroutine actions: called CC=1 SCAR=0.0
Pod documented
53 0 ▶sub create_minimal { return qw(body author email ip blog_id article_id); }
Subroutine create_minimal: not called CC=1 SCAR=6.9
Pod undocumented
54 0 ▶sub create_filled { return qw(body_html created_at id published_at status updated_at user_agent); }
Subroutine create_filled: not called CC=1 SCAR=6.9
Pod undocumented
55  
56 0 ▶sub read_scope { return "read_content"; }
Subroutine read_scope: not called CC=1 SCAR=6.9
Pod undocumented
57 0 ▶sub write_scope { return "write_content"; }
Subroutine write_scope: not called CC=1 SCAR=6.9
Pod undocumented
58  
59 0 ▶eval(__PACKAGE__->generate_accessors); die $@ if $@;
Subroutine approve: not called CC=2 SCAR=17.1
Subroutine article_id: not called CC=2 SCAR=17.1
Subroutine blog_id: not called CC=2 SCAR=17.1
Subroutine body: not called CC=2 SCAR=17.1
Subroutine body_html: not called CC=2 SCAR=17.1
Subroutine created_at: not called CC=2 SCAR=17.1
Subroutine email: not called CC=2 SCAR=17.1
Subroutine id: not called CC=2 SCAR=17.1
Subroutine ip: not called CC=2 SCAR=17.1
Subroutine not_spam: not called CC=2 SCAR=17.1
Subroutine published_at: not called CC=2 SCAR=17.1
Subroutine remove: not called CC=2 SCAR=17.1
Subroutine spam: not called CC=2 SCAR=17.1
Subroutine status: not called CC=2 SCAR=17.1
Subroutine updated_at: not called CC=2 SCAR=17.1
Subroutine user_agent: not called CC=2 SCAR=17.1
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 17 branches
BranchTrueFalseTotal
unless $sa 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
unless $sa 0 0 0
if defined $_[1] 0 0 0
unless $sa 0 0 0
unless $sa 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if defined $_[1] 0 0 0
if $@ 0 1 1
60  
61 1 1
« blib/lib/WWW/Shopify/Model/Locale.pm ↑ Summary blib/lib/WWW/Shopify/Model/Transaction/Receipt.pm »