line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::File; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
84
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
87
|
|
4
|
4
|
|
|
4
|
|
10
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
68
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
13
|
use JMAP::Validation::Tests::Number; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
84
|
|
7
|
4
|
|
|
4
|
|
11
|
use JMAP::Validation::Tests::Object; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
54
|
|
8
|
4
|
|
|
4
|
|
10
|
use JMAP::Validation::Tests::String; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
397
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub is_File { |
11
|
221184
|
|
|
221184
|
0
|
155685
|
my ($value) = @_; |
12
|
|
|
|
|
|
|
|
13
|
221184
|
50
|
|
|
|
304495
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
14
|
221184
|
50
|
|
|
|
352372
|
return unless JMAP::Validation::Tests::String::is_id($value->{blobId}); |
15
|
|
|
|
|
|
|
|
16
|
221184
|
|
|
|
|
983215
|
foreach my $field (qw{type name}) { |
17
|
442368
|
100
|
|
|
|
682582
|
if (defined $value->{$field}) { |
18
|
221184
|
50
|
|
|
|
304238
|
return unless JMAP::Validation::Tests::String::is_string($value->{$field}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
221184
|
50
|
|
|
|
319635
|
if (defined $value->{number}) { |
23
|
0
|
0
|
|
|
|
0
|
return unless JMAP::Validation::Tests::Number::is_number($value->{number}); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
221184
|
|
|
|
|
420585
|
return 1; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |