Gitea/Release.pm

filter: Statementstmt 32.3% 11 / 34 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 11.7% 2 / 17 Podpod 100% 15 / 15 totaltotal 41.1% 28 / 68 CC 2 SCAR 8.5
CC
2
Cov
31%
author_login
6.0
id
2.0
tag_name
2.0
CRAP 2.3
« Gitea/Org.pm ↑ Summary Gitea/Issue.pm »
1 package WWW::Gitea::Release;
2  
3 # ABSTRACT: Gitea release entity
4  
5 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 3 has _client => (
10 is => 'ro',
11 required => 1,
12 weak_ref => 1,
13 init_arg => 'client',
14 );
15  
16 3 has data => (
17 is => 'rw',
18 required => 1,
19 );
20  
21  
22 3 has owner => ( is => 'ro' );
23 3 has repo => ( is => 'ro' );
24  
25  
26 0 ▶sub id { $_[0]->data->{id} }
Subroutine id: not called CC=1 SCAR=6.9
Pod documented
27 0 ▶sub tag_name { $_[0]->data->{tag_name} }
Subroutine tag_name: not called CC=1 SCAR=6.9
Pod documented
28 0 ▶sub name { $_[0]->data->{name} }
Subroutine name: not called CC=1 SCAR=6.9
Pod documented
29 0 ▶sub body { $_[0]->data->{body} }
Subroutine body: not called CC=1 SCAR=6.9
Pod documented
30 0 ▶sub draft { $_[0]->data->{draft} }
Subroutine draft: not called CC=1 SCAR=6.9
Pod documented
31 0 ▶sub prerelease { $_[0]->data->{prerelease} }
Subroutine prerelease: not called CC=1 SCAR=6.9
Pod documented
32 0 ▶sub html_url { $_[0]->data->{html_url} }
Subroutine html_url: not called CC=1 SCAR=6.9
Pod documented
33 0 ▶sub tarball_url { $_[0]->data->{tarball_url} }
Subroutine tarball_url: not called CC=1 SCAR=6.9
Pod documented
34 0 ▶sub zipball_url { $_[0]->data->{zipball_url} }
Subroutine zipball_url: not called CC=1 SCAR=6.9
Pod documented
35 0 ▶sub created_at { $_[0]->data->{created_at} }
Subroutine created_at: not called CC=1 SCAR=6.9
Pod documented
36 0 ▶sub published_at { $_[0]->data->{published_at} }
Subroutine published_at: not called CC=1 SCAR=6.9
Pod documented
37 0 ▶sub author_login { my $a = $_[0]->data->{author}; $a ? $a->{login} : undef }
Subroutine author_login: not called CC=2 SCAR=17.9
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
$a ? : 0 0 0
38  
39  
40 sub refresh {
41 0 ▶ my ($self) = @_;
Subroutine refresh: not called CC=1 SCAR=6.9
Pod documented
42 0 my $fresh = $self->_client->releases->get($self->owner, $self->repo, $self->id);
43 0 $self->data($fresh->data);
44 0 return $self;
45 }
46  
47  
48 sub edit {
49 0 ▶ my ($self, %args) = @_;
Subroutine edit: not called CC=1 SCAR=6.9
Pod documented
50 0 my $fresh = $self->_client->releases->edit(
51 $self->owner, $self->repo, $self->id, %args);
52 0 $self->data($fresh->data);
53 0 return $self;
54 }
55  
56  
57 sub delete {
58 0 ▶ my ($self) = @_;
Subroutine delete: not called CC=1 SCAR=6.9
Pod documented
59 0 return $self->_client->releases->delete($self->owner, $self->repo, $self->id);
60 }
61  
62  
63  
64 3 1;
65  
66 __END__
« Gitea/Org.pm ↑ Summary Gitea/Issue.pm »