blib/lib/Rose/HTML/Form/Field/Date.pm

filter: Statementstmt 100% 15 / 15 Branchbran 75.0% 3 / 4 Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 4 / 4 Podpod 50.0% 1 / 2 totaltotal 73.5% 25 / 34 CC 5 SCAR 13.8
CC
5
Cov
80%
inflate_value
5.8
BEGIN
1.0
BEGIN
1.0
CRAP 4.0
« blib/lib/Rose/HTML/Form/Field/PhoneNumber/US/Split.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/CheckboxGroup.pm »
1 package Rose::HTML::Form::Field::Date;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use base 'Rose::HTML::Form::Field::DateTime';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION = '0.606';
8  
9 sub inflate_value
10 9 ▶{
Subroutine inflate_value: called CC=5 SCAR=17.5
Pod documented
11 9 my($self, $date) = @_;
12 9 ▶ return undef unless(ref $date || (defined $date && length $date));
Branch: 1 branch
BranchTrueFalseTotal
unless ref $date or defined $date and length $date 0 9 9
Condition33%2/6
ref $date or defined $date and length $date
l!l&&r!l&&!r
090
defined $date and length $date
!ll&&!rl&&r
009
MC/DC0%0/3
ref $date or defined $date and length $date
ref $date defined $date length $date
Truth table25%1/4
A or B and C
A= ref $dateB= defined $dateC= length $date
ABCresult
1XX1
0111
00X0
0100
13 9 $date = $self->date_parser->parse_datetime($date);
14 9 ▶ return $date unless(UNIVERSAL::isa($date, 'DateTime'));
Branch: 1 branch
BranchTrueFalseTotal
unless UNIVERSAL::isa($date, "DateTime") 5 4 9
15 4 $date->set(hour => 0, minute => 0, second => 0, nanosecond => 0);
16 4 return $date;
17 }
18  
19 1 ▶sub init_output_format { '%Y-%m-%d' }
Subroutine init_output_format: called CC=1 SCAR=0.0
Pod undocumented
20  
21 2 1;
22  
23 __END__
« blib/lib/Rose/HTML/Form/Field/PhoneNumber/US/Split.pm ↑ Summary blib/lib/Rose/HTML/Form/Field/CheckboxGroup.pm »