« blib/lib/JMAP/Validation/Generators/ContactGroup.pm
↑ Summary
lib/JMAP/Validation/Generators/ContactInformation.pm »
| 1 | package JMAP::Validation::Checks::Number; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use JMAP::Validation; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use JMAP::Validation::Tests::Number; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use Test2::Bundle::Extended; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 1 | ▶ | use JSON::Typist; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | our $is_number = validator(sub { | ||||||||||||
| 10 | 0 | ▶ | my (%params) = @_; | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 11 | |||||||||||||
| 12 | 0 | ▶ | return (ref($params{got}) || '') eq 'JSON::Typist::Number'; | ||||||||||
|
Condition0%0/2
ref $params{'got'} || ''
MC/DC0%0/1
ref $params{'got'} || ''
ref $params{'got'}
Truth table0%0/2
A
A= ref $params{'got'}
| |||||||||||||
| 13 | 1 | }); | |||||||||||
| 14 | |||||||||||||
| 15 | our $is_number_or_null = validator(sub { | ||||||||||||
| 16 | 0 | ▶ | my (%params) = @_; | ||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||
| 17 | |||||||||||||
| 18 | 0 | ▶ | if (defined $params{got}) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 19 | return unless JMAP::Validation::validate( | ||||||||||||
| 20 | $params{got}, | ||||||||||||
| 21 | 0 | ▶ | $is_number, | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 22 | ); | ||||||||||||
| 23 | } | ||||||||||||
| 24 | |||||||||||||
| 25 | 0 | return 1; | |||||||||||
| 26 | 1 | }); | |||||||||||
| 27 | |||||||||||||
| 28 | 1 | 1; | |||||||||||