Wikibase/Datatype/Value/Time.pm

filter: Statementstmt 100% 27 / 27 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 97.3% 36 / 37 CC 2 SCAR 2.5
CC
2
Cov
100%
BUILD
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Wikibase/Datatype/Term.pm ↑ Summary Wikibase/Datatype/Property.pm »
1 package Wikibase::Datatype::Value::Time;
2  
3 61 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 61 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 61 ▶use Mo qw(build default is);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 61 ▶use Wikibase::Datatype::Utils qw(check_datetime check_entity);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 61 our $VERSION = 0.40;
10  
11 61 extends 'Wikibase::Datatype::Value';
12  
13 61 has after => (
14 is => 'ro',
15 default => 0,
16 );
17  
18 61 has before => (
19 is => 'ro',
20 default => 0,
21 );
22  
23 61 has calendarmodel => (
24 is => 'ro',
25 );
26  
27 61 has precision => (
28 is => 'ro',
29 default => 11,
30 );
31  
32 61 has timezone => (
33 is => 'ro',
34 default => 0,
35 );
36  
37 1 ▶sub type {
Subroutine type: called CC=1 SCAR=0.0
Pod documented
38 1 return 'time';
39 }
40  
41 45 ▶sub BUILD {
Subroutine BUILD: called CC=2 SCAR=6.9
Pod undocumented
42 45 my $self = shift;
43  
44 45 ▶ if (! defined $self->{'calendarmodel'}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->{"calendarmodel"}) 43 2 45
45 43 $self->{'calendarmodel'} = 'Q1985727';
46 }
47  
48 45 check_entity($self, 'calendarmodel');
49  
50 44 check_datetime($self, 'value');
51  
52 43 return;
53 }
54  
55 61 1;
56  
57 __END__
« Wikibase/Datatype/Term.pm ↑ Summary Wikibase/Datatype/Property.pm »