lib/Neo4j/Types/Node.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 4 / 4 totaltotal 100% 43 / 43 SCAR 16.1
CC
5
Cov
100%
labels
3.0
get
2.0
properties
2.0
CRAP 5.0
« blib/lib/Neo4j/Types/Relationship.pm ↑ Summary lib/Neo4j/Types/Path.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Neo4j::Types::Node;
5 # ABSTRACT: Describes a node from a Neo4j graph
6 2 $Neo4j::Types::Node::VERSION = '1.00';
7  
8 2 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 sub get {
12 6 ▶ my ($self, $property) = @_;
Subroutine get: called CC=2 SCAR=6.9
Pod documented
13
14 6 ▶ return unless defined $self->{properties};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"properties"} 1 5 6
15 5 return $self->{properties}->{$property};
16 }
17  
18  
19 sub id {
20 3 ▶ my ($self) = @_;
Subroutine id: called CC=1 SCAR=0.0
Pod documented
21
22 3 return $self->{id};
23 }
24  
25  
26 sub labels {
27 4 ▶ my ($self) = @_;
Subroutine labels: called CC=3 SCAR=11.0
Pod documented
28
29 4 ▶ croak 'labels() in scalar context not supported' unless wantarray;
Branch: 1 branch
BranchTrueFalseTotal
unless wantarray 2 2 4
30 2 ▶ return unless defined $self->{labels};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"labels"} 1 1 2
31 1 return @{$self->{labels}};
32 }
33  
34  
35 sub properties {
36 3 ▶ my ($self) = @_;
Subroutine properties: called CC=2 SCAR=6.9
Pod documented
37
38 3 ▶ return {} unless defined $self->{properties};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"properties"} 1 2 3
39 2 return $self->{properties};
40 }
41  
42  
43 2 1;
44  
45 __END__
« blib/lib/Neo4j/Types/Relationship.pm ↑ Summary lib/Neo4j/Types/Path.pm »