Wrapper/Statuses.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 4 / 4 totaltotal 85.0% 34 / 40 SCAR 11.2
CC
3
Cov
82%
get
6.0
is_dirty
2.0
BEGIN
1.0
CRAP 3.1
« Wrapper/Log.pm ↑ Summary Wrapper/File/RawModification.pm »
1 package Git::Wrapper::Statuses;
2 # ABSTRACT: Multiple git statuses information
3 5 $Git::Wrapper::Statuses::VERSION = '0.047_090'; # TRIAL
4  
5 5 ▶$Git::Wrapper::Statuses::VERSION = '0.047090';use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 ▶use Git::Wrapper::Status;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶sub new { return bless {} => shift }
Subroutine new: called CC=1 SCAR=0.0
Pod documented
12  
13 sub add {
14 1 ▶ my ($self, $type, $mode, $from, $to) = @_;
Subroutine add: called CC=1 SCAR=0.0
Pod documented
15  
16 1 my $status = Git::Wrapper::Status->new($mode, $from, $to);
17  
18 1 push @{ $self->{ $type } }, $status;
19 }
20  
21 sub get {
22 0 ▶ my ($self, $type) = @_;
Subroutine get: not called CC=2 SCAR=17.9
Pod documented
23  
24 0 ▶ return @{ defined $self->{$type} ? $self->{$type} : [] };
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{$type} ? : 0 0 0
25 }
26  
27 sub is_dirty {
28 2 ▶ my( $self ) = @_;
Subroutine is_dirty: called CC=2 SCAR=6.9
Pod documented
29  
30 2 ▶ return keys %$self ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
keys %$self ? : 1 1 2
31 }
32  
33 5 1;
34  
35 __END__
« Wrapper/Log.pm ↑ Summary Wrapper/File/RawModification.pm »